mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.58k stars 2.92k forks source link

About embedded lyrics in music files #11845

Closed liJie-wk closed 1 year ago

liJie-wk commented 1 year ago

I want to be able to display the embedded lyrics as subtitles when playing music files

llyyr commented 1 year ago

invoke mpv with --force-window=yes when opening your music file, assuming the lyrics are embedded in a format mpv understands and they have timestamps, it'll be rendered

krackers commented 1 year ago

assuming the lyrics are embedded in a format mpv understands

I know that mpv supports external lrc files, but based on https://github.com/mpv-player/mpv/issues/1404 neither mpv nor ffmpeg support support lyrics embedded in id3 tag (SYLT)? Apparently some apps also just shove LRC text into USLT tag.

So I guess unless someone wants to add support to ffmpeg to parse the SYLT text and treat it as a sub track, then the easiest option is probably creating an mpv plugin which will do the parsing and overlay for you. Probably could even just shell out to some other parser like eyeD3 instead of trying to implement an id3 parser in lua/js.

liJie-wk commented 1 year ago

assuming the lyrics are embedded in a format mpv understands

I know that mpv supports external lrc files, but based on #1404 neither mpv nor ffmpeg support support lyrics embedded in id3 tag (SYLT)? Apparently some apps also just shove LRC text into USLT tag.

So I guess unless someone wants to add support to ffmpeg to parse the SYLT text and treat it as a sub track, then the easiest option is probably creating an mpv plugin which will do the parsing and overlay for you. Probably could even just shell out to some other parser like eyeD3 instead of trying to implement an id3 parser in lua/js.

I see, thanks for the answer, this issue I don't know if to close or continue to keep open

Dudemanguy commented 1 year ago

Question was answered so I'll close this. If a particular format is not understood, that would be a separate issue.