emms-info-native

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

emms-info-native

Petteri Hintsanen-2
Dear list,

I just pushed a new branch ‘info-native’ into emms repo.  It implements
a new info method ‘emms-info-native’ for Vorbis, Opus and FLAC files.
This method is "native" in the sense that it implemented in plain Emacs
Lisp and hence does not require any external programs or libraries.  The
naming is perhaps a bit misleading, but I couldn’t figure out a better
one, sorry.  Suggestions welcome.

Please give it a try, especially with Opus files (which I do not have)
and also with files that have big metadata chunks like cover art (which
I also don’t have).  There are rudimentary protections against malicious
inputs that may get triggered in these cases.  Please let me know of any
issues you encounter.

I’m planning to add support for ID3v2 (MP3s) later.

Thanks and season’s greetings to everyone,
Petteri

Reply | Threaded
Open this post in threaded view
|

Re: emms-info-native

David Engster
> I’m planning to add support for ID3v2 (MP3s) later.

Take a look at

https://github.com/larsmagne/id3.el

It's by Lars, one of the Emacs maintainers. It worked very well last
time I tried it, and it's pretty fast, too.

-David

Reply | Threaded
Open this post in threaded view
|

Re: emms-info-native

Yoni Rabkin-2
In reply to this post by Petteri Hintsanen-2
Petteri Hintsanen <[hidden email]> writes:

> Dear list,
>
> I just pushed a new branch ‘info-native’ into emms repo.  It implements
> a new info method ‘emms-info-native’ for Vorbis, Opus and FLAC files.
> This method is "native" in the sense that it implemented in plain Emacs
> Lisp and hence does not require any external programs or libraries.  The
> naming is perhaps a bit misleading, but I couldn’t figure out a better
> one, sorry.  Suggestions welcome.
>
> Please give it a try, especially with Opus files (which I do not have)
> and also with files that have big metadata chunks like cover art (which
> I also don’t have).  There are rudimentary protections against malicious
> inputs that may get triggered in these cases.  Please let me know of any
> issues you encounter.
>
> I’m planning to add support for ID3v2 (MP3s) later.

I'm a bit behind on my email, but I'm looking forward to trying this
out.

Thank you.

--
   "Cut your own wood and it will warm you twice"

Reply | Threaded
Open this post in threaded view
|

Re: emms-info-native

Yoni Rabkin-2
In reply to this post by David Engster
David Engster <[hidden email]> writes:

>> I’m planning to add support for ID3v2 (MP3s) later.
>
> Take a look at
>
> https://github.com/larsmagne/id3.el
>
> It's by Lars, one of the Emacs maintainers. It worked very well last
> time I tried it, and it's pretty fast, too.


I wrote to Lars and asked about it. Below the line is what I got back:
----------------------------------------------------------------------

> Yoni Rabkin <[hidden email]> writes:

> > id3.el (https://github.com/larsmagne/id3.el/blob/master/id3.el) came
> > up. How stable is it in reading (writing tags isn't a priority)? Any
> > catches in using it or comments about us taking it and adding it to
> > Emms?

> I've used id3.el extensively on my music collection without any
> problems, but the caveat there is that virtually all of it is
> hand-ripped by myself, so it's not a very diverse source of mp3s.

> > Like, for instance, do you have a shiny new version hidden on some
> > floppy disks you haven't released?

> Nope.  :-)  What's on github is the latest version, I think.

> I guess I should pack it up as an ELPA package or something.


--
   "Cut your own wood and it will warm you twice"

Reply | Threaded
Open this post in threaded view
|

Re: emms-info-native

Yoni Rabkin-2
In reply to this post by Petteri Hintsanen-2

Petteri Hintsanen <[hidden email]> writes:

> Dear list,
>
> I just pushed a new branch ‘info-native’ into emms repo.  It implements
> a new info method ‘emms-info-native’ for Vorbis, Opus and FLAC files.
> This method is "native" in the sense that it implemented in plain Emacs
> Lisp and hence does not require any external programs or libraries.  The
> naming is perhaps a bit misleading, but I couldn’t figure out a better
> one, sorry.  Suggestions welcome.
>
> Please give it a try, especially with Opus files (which I do not have)
> and also with files that have big metadata chunks like cover art (which
> I also don’t have).  There are rudimentary protections against malicious
> inputs that may get triggered in these cases.  Please let me know of any
> issues you encounter.
>
> I’m planning to add support for ID3v2 (MP3s) later.
>
> Thanks and season’s greetings to everyone,
> Petteri

A preliminary test with the limited files I have here looks good.

Since the diff between the main and info-native branches is only
emms-info-native (and version numbers), can you please merge the work
you have done so far in info-native into the main branch?

We can keep info-native for you to continue development, but I want
everyone who gets a copy of the main branch to also have
emms-info-native.el.

Thanks!

--
   "Cut your own wood and it will warm you twice"

Reply | Threaded
Open this post in threaded view
|

Re: emms-info-native

Petteri Hintsanen-2
Yoni Rabkin <[hidden email]> writes:

> Since the diff between the main and info-native branches is only
> emms-info-native (and version numbers), can you please merge the work
> you have done so far in info-native into the main branch?

Sure, but should we update the manual first?  I can do that.

> We can keep info-native for you to continue development, but I want
> everyone who gets a copy of the main branch to also have
> emms-info-native.el.

Ok, sounds good.

Thanks,
Petteri

Reply | Threaded
Open this post in threaded view
|

Re: emms-info-native

Yoni Rabkin-2
Petteri Hintsanen <[hidden email]> writes:

> Yoni Rabkin <[hidden email]> writes:
>
>> Since the diff between the main and info-native branches is only
>> emms-info-native (and version numbers), can you please merge the work
>> you have done so far in info-native into the main branch?
>
> Sure, but should we update the manual first?  I can do that.

I'm always glad when someone gives the manual some attention (few
developers want to write documentation). But I wouldn't worry about
updating the manual until there is an ELPA release with that code. When
we do that, we will also update the online version of the manual for Web
searches to find.

--
   "Cut your own wood and it will warm you twice"

Reply | Threaded
Open this post in threaded view
|

Re: emms-info-native

Petteri Hintsanen-2
Yoni Rabkin <[hidden email]> writes:

> I'm always glad when someone gives the manual some attention (few
> developers want to write documentation). But I wouldn't worry about
> updating the manual until there is an ELPA release with that code.

Ok, fair enough.  I will update the manual later then.
emms-info-native is now merged and pushed to master.


Thanks,
Petteri

Reply | Threaded
Open this post in threaded view
|

Re: emms-info-native

Gnu - Emms mailing list

fwiw i just tried importing my Music directory with emms-info-native as
my only info function. it reported ~4200 tracks to go and it took
several minutes to finish. unfortnately i didn't time it. i'll include
here a few samples of metadata that was extracted

FLAC

Chopin, Fr?d?ric - Pr?ludes op. 28 - Nr. 1 C-dur - Agitato
name             = /Music/Chopin - Etudes, Preludes, Polonaises/Preludes/01 Pr�ludes op. 28 - Nr. 1 C-dur - Agitato.flac
info-artist      = Chopin, Fr?d?ric
info-albumartist =
info-composer    =
info-performer   =
info-title       = Pr?ludes op. 28 - Nr. 1 C-dur - Agitato
info-album       = Pr?ludes (Maurizio Pollini)
info-tracknumber = 01
info-genre       = Klavierwerk
info-date        = 1975
info-note        =

the bad encoded characters were already present in this file just fyi

OGG

Leanne Betasamosake Simpson - Solidification
name             = /Music/Leanne Betasamosake Simpson - Noopiming Sessions/Leanne Betasamosake Simpson - Noopiming Sessions - 01 Solidification.ogg
info-artist      = Leanne Betasamosake Simpson
info-albumartist = Leanne Betasamosake Simpson
info-composer    =
info-performer   =
info-title       = Solidification
info-album       = Noopiming Sessions
info-tracknumber = 1
info-genre       =
info-date        = 2020
info-note        =

OPUS

Xerf Xpec - (1976) Haruomi Hosono - Bon Voyage Co. (Full Album)
name             = /home/shoshin/Music/yt-dl/(1976) Haruomi Hosono - Bon Voyage Co. (Full Album)-34drVIEX2wg.opus
info-artist      = Xerf Xpec
info-albumartist =
info-composer    =
info-performer   =
info-title       = (1976) Haruomi Hosono - Bon Voyage Co. (Full Album)

unfortunately i don't have a lot of album audio in opus format, and the
one i do have is messed up by my experiments with tracktag :P

but, so far so good, the flac, ogg, and opus files in my collection seem
to have processed without error, it just took a while :).

thanks for the work!
Grant

Reply | Threaded
Open this post in threaded view
|

Re: emms-info-native

Grant Shoshin Shangreaux

Grant Shoshin Shangreaux via writes:

> fwiw i just tried importing my Music directory with emms-info-native

i cant tell if this is user error or something with the info-native
function, but i just noticed that the tracks i already had loaded in the
cache db are now "doubled". if i enter one from the smart browser, it
ends up putting two entries in the playlist.

im thinking it is unrelated to emms-info-native. i did something like
this:

  - emms-cache-clear to remove the tracks i'd already loaded
  - emms-add-directory-tree

now that i'm going through it again, it seems to only be a some of the
tracks i already had. i'll try to recreate again and open a new thread
if i uncover an issue.

-Grant


Reply | Threaded
Open this post in threaded view
|

Re: emms-info-native

Petteri Hintsanen-2
In reply to this post by Gnu - Emms mailing list
Grant Shoshin Shangreaux via <[hidden email]> writes:

> fwiw i just tried importing my Music directory with emms-info-native as
> my only info function. it reported ~4200 tracks to go and it took
> several minutes to finish. unfortnately i didn't time it. i'll include
[...]
> but, so far so good, the flac, ogg, and opus files in my collection seem
> to have processed without error, it just took a while :).

The bottleneck here is likely emms-later-do which throttles the parsing
so that it would not eat all CPU.  Without it, Emacs would become
completely stuck when going through a large number of tracks.

You can tune emms-later-do-interval and emms-later-do-batch variables to
get faster response at the expense of more sluggish Emacs.

Petteri

Reply | Threaded
Open this post in threaded view
|

Re: emms-info-native

Petteri Hintsanen-2
In reply to this post by Grant Shoshin Shangreaux
Grant Shoshin Shangreaux <[hidden email]> writes:

> i cant tell if this is user error or something with the info-native
> function, but i just noticed that the tracks i already had loaded in the
> cache db are now "doubled". if i enter one from the smart browser, it
> ends up putting two entries in the playlist.
>
> im thinking it is unrelated to emms-info-native.

I think I’ve seen the same issue sometimes.  It is not related to
info-methods, but probably a bug in the browser.

Because it is so rare and cache reset and re-population is enough to fix
it, I’ve not bothered to look at it.  Of course it would be good to get
this fixed though.

Another possible reason for "doubled" tracks is if you have two separate
files, eg. FLAC and Ogg, for the same track.  In this case it is a
"feature", albeit a confusing one.


Petteri