mpv-player / mpv

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

Changes in how Youtube handles automatic captions #13461

Open AlifianK opened 6 months ago

AlifianK commented 6 months ago

Youtube used to lump automatic captions together with provided subtitles. Now it's under the automatic_captions in the video's json metadata, making mpv unable to retrieve the auto captions.

https://0x0.st/HdeQ.json

christoph-heinrich commented 6 months ago

I don't think we should automatically add all automatic captions as subtitle tracks, but if you want everything to be listed, you could use this in your config.

ytdl-raw-options-append=write-subs=
ytdl-raw-options-append=write-auto-subs=
ytdl-raw-options-append=sub-langs=.*
AlifianK commented 6 months ago

I'm not suggesting we should include all of them but can't the correct auto captions be inferred from slang config? For example, slang = 'eng,en,enUS' will load the English auto caption? I'm just wondering since mpv used to load auto captions before, if this is the intended behavior from now on then I'll close the issue.

christoph-heinrich commented 6 months ago

We could pass sub-langs with whatever was set in slang, unless explicitly set otherwise. Personally I don't really care either way.