How to play YouTube video with MPV with subtitles?
Asked
Active
Viewed 7,121 times
2 Answers
3
Add the following to ~/.config/mpv/mpv.conf
sub-auto=fuzzy
ytdl-raw-options=ignore-config=,sub-format=en,write-sub=
- Note: You can change the sub-format to other language.
Porcupine
- 513
0
I just followed this Reddit Link and it works for me. See if it works for you.
Modify ~/.config/mpv/mpv.conf and add the following line
slang=en,eng,enUS,en-US
sub-auto=fuzzy
ytdl-raw-options=ignore-config=,sub-lang="en,eng,enUS,en-US",write-sub=,write-auto-sub=
Open a Youtube video
$ mpv 'https://youtu.be/hexfXc7-SsU'
(+) Video --vid=1 (*) (vp9 3840x2160 24.000fps)
(+) Audio --aid=1 (aac 2ch 44100Hz)
(+) Subs --sid=1 --slang=en 'English' (webvtt) (external)
File tags:
Uploader: Travis Media
Channel_URL: https://www.youtube.com/channel/UCGPGirOab9EGy7VH4IwmWVQ
AO: [pulse] 44100Hz stereo 2ch float
VO: [gpu] 3840x2160 yuv420p
AV: 00:00:02 / 00:19:52 (0%) A-V: 0.000 Cache: 2.5s/1MB
It works on the auto-generated subtitle too. When the subtitle don't show up I may need to press j button to change subtitle language and use v button to toggle the subtitle visibility.
Winston
- 111
- 4