mhogomchungu / media-downloader

Media Downloader is a Qt/C++ front end to yt-dlp, youtube-dl, gallery-dl, lux, you-get, svtplay-dl, aria2c, wget and safari books..
GNU General Public License v2.0
1.34k stars 102 forks source link

how do I hard add subtitles to a playlist of videos from youtube? #322

Closed hiakuryu closed 9 months ago

hiakuryu commented 9 months ago

So I'm really grateful for this program it's fantastic. So I have a few questions.

Is there a way for me to

A. Easily specifiy with Media Downloader to download and name the English subtitles correctly for a video? B. Have them as .srt files? or C. Hardcode them in the video?

I've been asked to help her acquire a giant playlist of Kpop stuff for my niece on Youtube but like it's obviously all in Korean they do have English subtitles. But I'm at a loss on how to do this. Any help would be GREATLY appreciated.

mhogomchungu commented 9 months ago

In the "Download Options" text field, add the following line:-

--write-auto-subs --sub-langs en* --sub-format srt/best
hiakuryu commented 9 months ago

Thanks for the help!

--write-sub --write-auto-sub --sub-lang "en.*" --sub-format srt/best

Would that be right in telling media downloader to prefer creator subtitles?

Currently the download options line looks like this because I don't want auto-generated subs

-f bestvideo[ext=mp4][vcodec^=avc]+bestaudio[ext=m4a]/bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio/--write-sub --sub-lang "en.*" --sub-format srt/best

Is that the correct syntax/format?

I also accidentally discovered this alternative sorta ish solution workaround...

So you save the playlist as a file then open it in batch downloader tab and then you can select each entry right click and choose the correct subs, of course this is kinda painful to do on a long long long playlist but it does work!

mhogomchungu commented 9 months ago
  1. It is --write-subs and there should be space before and after it in the list of options.
  2. Below yt-dlp options says there is also --embed-sub and you can use it with or in place of --write-subs to get different outcomes.
When --embed-subs and --write-subs are used together, 
the subtitles are written to disk and also embedded in the
 media file. You can use just --embed-subs to embed the 
subs and automatically delete the separate file.

So you save the playlist as a file then open it in batch downloader tab and then you can select each entry right click and choose the correct subs, of course this is kinda painful to do on a long long long playlist but it does work!

Yes, this works but very tedious with a long playlist.

Marking this one as solved but feel free to comment if you have anything,