StefanLobbenmeier / youtube-dl-gui

A cross-platform GUI for youtube-dl made in Electron and node.js
GNU Affero General Public License v3.0
1.24k stars 46 forks source link

Batch download does not include subtitles #16

Open venkat2305 opened 1 year ago

venkat2305 commented 1 year ago

Describe the bug The video meta data shows it has a sub file but when selected in the player there are no subtitles

To Reproduce Steps to reproduce the behavior: Keep the output format to auto and enable subtitle Download this video

Expected behavior When selected, we should see subtitles on the player

Screenshots

Additional info (please complete the following information):

Additional context The problem is that when the we enable subtitle option, the output format it not changing from MP4 and as we know we cannot pass-through subtitles files to MP4.

Fix: if the user enables subtitle option , change the output format

venkat2305 commented 1 year ago

update: I forced the format to MKV. Now there's no subtitle in the video.

StefanLobbenmeier commented 1 year ago

Reproducing now, I enabled subtitles like this: image

And clicked on download.

After the download the subtitles are in the same folder: image

I can select the subtitle file in the video player: image

But you are asking if we can embed subtitles into the video file itself? We would have to check if yt-dlp supports that

StefanLobbenmeier commented 1 year ago

Those are the options we can pass for subtitles: https://github.com/yt-dlp/yt-dlp#subtitle-options

At the moment open video downloader is passing those options:

--write-sub
--write-auto-sub
--embed-subs
--sub-lang [all the subLanguages separated by comma]
StefanLobbenmeier commented 1 year ago

Also tried with another video player (mpv.io), where it somehow finds an additional "en" and "unknown" subtitle track in addition to the .vtt files.

It keeps showing those 2 even when the .vtt files are no longer in the same folder. So I am assuming this actually worked on my machine. Can you also try with that video player?

image

venkat2305 commented 1 year ago

I enabled subtitles in a different way. please check this video. there are no subtitles on the video.

https://user-images.githubusercontent.com/55329452/212500984-924f9ac5-c946-4170-a43e-490cd7187bad.mp4

I enabled subtitles option but didn't select which subtitles to select and there is no default selection. I thought subtitles are embeded in the video. does this make sense?

I tried mpv player. and it couldn't show the subtitles aswell. can you please look into this? also, when possible , can you please add an option to embed subtitles?

venkat2305 commented 1 year ago

Suggestions:

  1. there should be a default selection when the user enables subtitle option. right now, I think it's not selecting anything.
  2. an option to enable subtitles by default in the settings and add our preferred languages for subtitles.
  3. an option to embed subtitles into the video. its less clunky and we can move the video file around without having to worry about the subtitle files.
StefanLobbenmeier commented 1 year ago

I see, I was not even aware of that button down there, haha 😄

Will leave this in the backlog for now since that is a lot more work than just a simple bugfix.

StefanLobbenmeier commented 1 year ago

Can you just confirm that subtitles work on your machine via this subtitles button? image

venkat2305 commented 1 year ago

I selected three languages with that option, and three subtitles' files were downloaded. but there are 7 tracks of subtitles in the video. image

in this image track 1,2,3 are the selected subtitles. I think track 4 has chapter information. please check why there are other subitiles files and they don't have anything in them.

venkat2305 commented 1 year ago

there should be a default selection when the user enables subtitle option. right now, I think it's not selecting anything. an option to enable subtitles by default in the settings and add our preferred languages for subtitles. an option to embed subtitles into the video. its less clunky and we can move the video file around without having to worry about the subtitle files.

should I make a new issue for this feature request.

StefanLobbenmeier commented 1 year ago

No need to create a separate issue, but for now I am not going to prioritize this, since I never use the download method you showed in your video. Feel free to implement this yourself and add a PR though.

Hannah-GBS commented 3 months ago

+1 to this. I'm planning on archiving some playlists and I'd much rather not have to select subtitles on every video.

shanedk commented 1 month ago

+1 as well. It's annoying having to go through long playlists and set this one by one.