wildstar84 / fauxdacious

Audacious Audioplayer FORK, adds DVD & video play, and much more!
https://wildstar84.wordpress.com/fauxdacious
Other
9 stars 4 forks source link

LyricWiki plugin support for Vorbis comment LYRICS tag #6

Closed Orthestral closed 2 years ago

Orthestral commented 2 years ago

For files in OGG, FLAC, and OPUS format, the standard for embedded lyrics is to use a "LYRICS=" Vorbis comment. I'd like to see support for this so embedded lyrics work on more than just MP3

wildstar84 commented 2 years ago

This is an excellent idea (I did not know lyrics were supported by Vorbis comments)! I've now added reading and saving embedded lyrics for Vorbis & Flac (files) (.ogg,.ogm,.oga,.flac,.fla) and also Wavpack (.wv) (ape tags). I assume Opus uses vorbis comments, but is currently handled by the ffaudio (ffmpeg) catchall plugin which only supports ape tags and I do not have any .opus files to test with. Perhaps, if you can attach or email me an opus file with embedded lyrics, I can work on that (my email is in my github profile).

You'll need to apply the latest "tags" commits (one each from both fauxdacious & fauxdacious-plugins git) to try this out.

Orthestral commented 2 years ago

The new commits don't seem to work for me in terms of lyrics (Tested FLAC, OGG, and OPUS; all three files' lyrics read correctly with Strawberry music player) I emailed you an OPUS file to tinker around with

wildstar84 commented 2 years ago

Sorry to hear that it's not working for you. Can you also send me one of your ogg and flac files too (that both have some embedded lyrics and do not work for you (all the ones I tested here seem to work here)? I'm going to assume that you're running Linux (what version?), and downloaded and recompiled the latest GIT vsn.s of both Fauxdacious and Fauxdacious-plugins so that you're running v4.1.3-beta1, just to make sure we're on the same page.

Also, thank you for the test opus file, when I get a good chance to look at this (which will definittly involve a bit more work make possible), it wil for sure speed up the work! I took a brief look at it this morning and it appears to be in embedded ogg format, but as I mentioned earlier, uses the ffaudio plugin to play (which doesn't support anything but APE tags at the moment), whereas genuine .ogg and .flac files use vorbis and flac plugins respectively which handle vorbis comments (which is where we were easily able to make the changes in the commit).

Orthestral commented 2 years ago

I've sent you the OGG and FLAC files. I use EndeavourOS (Arch-based) The OGG should be a series of numbers.

The plugin isn't reading the lyrics of the flac I sent you, even though the save embedded button does say "Save Embedded" rather than "Save ID3", meaning I'm on the tags commit image image

wildstar84 commented 2 years ago

Thanks, but you only attached the ogg file (forgot the flac one)? Anyway, I see the pbm with the ogg file: The extension is ogV (which, along w/ogg & oga ARE valid ogg formats, but back when I first added video to Audacious (Fauxdacous) I left ogv off from vorbis plugin to force it thru ffaudio plugin b/c it supports video in ogg/vorbis (ogv) & requires ffaudio to display the video part. In your case there's no video, so you can just rename it to .ogg and it will work (using vorbis plugin) for the moment (I tried it)!

I also noticed, however that the embedded "lyrics" vorbis comment contained just a looooong list of comma-separated numbers ("KEY=LYRICS= VAL=0,522,1043,1565,2087,2609,3130,3652,4174,4696,5217,5739,6261,...) instead of readable lyrics, so I'm not sure why, as it appears to be that way in the file, perhaps you can shed some light on that?

ffaudio still seems to be finding some of the tags (Title, Artist, album-cover, etc.), so I'm going to continue looking into it (along w/opus), and until you also send me a flac.

Orthestral commented 2 years ago

I told you in my previous post the ogg should be a series of numbers.

The flac is in a dropbox link in the email, as it's too large to send over email.

My file extension is an ogv on your end? Strange, it's an ogg on mine, and downloading from my sent email still gives me an ogg as well

wildstar84 commented 2 years ago

Oookaay then - it's working correctly here (embedded lyrics for the "ogg" file IS the series of numbers & displayed in the lyricwiki plugin (when invoking the file with a .ogg extension)! I don't know what one does with those numbers, but it IS displaying what is in the LYRICS comment for me. You might try running Fauxdacious with a -V argument, which will dump a bunch of debug output, looking for lines like: "[aud_file_find_decoder]: Matched ** Plugin..." and "[lyricwiki_playback]..." and report what you're getting for this file. If Matched ***** is FFmpeg, then the extension is not being picked up by Vorbis and is something other than ".ogg", ".ogm" or ".oga", and the embedded lyrics will not be found. Currently the flac plugin handles .flac and .fla. Embedded lyrics are currently supported for these + ".mp3" and ".wv". Any other extension or no extension will not work at the moment. You can also send me the debug output here or in an email, if that doesn't help explain the issue.

As far as dropbox goes, I do not have a Google account, and have no plans to sign up for one.

Orthestral commented 2 years ago

You can download without an account, just close out of the prompt and click download

I have found out, by accident (clicking one of the file links in the debug output), that the files in custom playlists don't display lyrics, but the files played directly from the filesystem do. Apart from "No Local lyric file found"/"Lyrics came from embedded tag!" and VFSFile running twice for playlists/once for direct playing, the outputs of both are the same.

wildstar84 commented 2 years ago

Thanks! I just had to accept cookies & downloaded it (Sorry, guess I need to get out more - lol), tried it & it works perfectly (debug says: "Matched FLAC Decoder by extension." and "[lyricwiki_playback]: i:Lyrics came from embedded tag!", and the lyrics came up instantly (no searching) saying "Veil New Paradigm

By the pale illumination of the waning crescent moon..."

Yow do you create ur "custom playlists"? I never noticed lyrics not working in files in playlists! Perhaps check the filename and extension in ~/.config/fauxdacious/playlists/###.audpl (currently playing) and/or wherever you keep them. Even though I created Fauxdacious (from Audacious) years ago it's huge & there are lots of things about Audacous and ways that people use it that I'm still learning about! ;)

Orthestral commented 2 years ago

Exporting, deleting, and then re-importing the playlist worked! Apparently lyrics are stored in the playlist file and, in my case, it didn't re-scan for any new lyrics if the entry is missing.

And yes, I'm weird. I have most of my songs in one huge custom playlist with very specific positions for each song, where I know the exact position of every one of them and I can scroll to them freely.

wildstar84 commented 2 years ago

Well well well, I just may be able to get this working soon for FFaudio too (ogv, opus, et. al.), at least read-only (Currently vorbis, flac, & mp3 plugins support both fetching and saving embedded tag data)! I'll have to do alot of testing, etc, so stay tuned!...

Oh btw, I should mention that when playing streaming Youtube, etc. videos, and supported (by StreamFinder - see the FAQ) podcasts, the Fauxdacious Lyricwiki plugin will display the video/podcast "Description" - very handy, imo.

Orthestral commented 2 years ago

Interesting fact, thanks for the help!