Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overwritten subtitles #1224

Closed
iemejia opened this issue Aug 10, 2013 · 7 comments
Closed

overwritten subtitles #1224

iemejia opened this issue Aug 10, 2013 · 7 comments
Labels
bug

Comments

@iemejia
Copy link
Contributor

@iemejia iemejia commented Aug 10, 2013

When you use at the same time the options --write-sub and --write-auto-sub only one of them is downloaded.
$ youtube-dl --write-sub --write-auto-sub --sub-lang en http://www.youtube.com/watch?v=cuKmcq6pu9s

@iemejia
Copy link
Contributor Author

@iemejia iemejia commented Aug 10, 2013

One easy fix is to add an extra extention to the sub e.g. video.auto.en.srt to avoid the overwriting, however internally both kind of subtitles use the same key in the info_dict.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 6, 2013

Now the problem is that if --write-sub is given it doesn't check for automatic captions.

@iemejia
Copy link
Contributor Author

@iemejia iemejia commented Sep 6, 2013

Yes indeed, I got this reported in the #youtube-dl channel in IRC, so I noted it here, what do you think it's the best thing to do in this case?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 6, 2013

I have think about it and the easiest solution I have is to first get the dictionary with the automatic captions and then update it with the normal subtitles, that way, normal subtitles override the automatic caption which is the best behaviour, pseudo code:

subs = {}
if write_automatic:
    subs = extract_automatic_captions()
if write_subtitles:
    subs.update(extract_subtitles())

Giving different names to each type may not work, some players may not detect video.auto.en.srt as the subtitles file for video.mp4.
Thanks for taking the time to report the issues from IRC.

I'd wait to get your subtitles rework merged, so that the fix applies to all IEs.

@iemejia
Copy link
Contributor Author

@iemejia iemejia commented Sep 7, 2013

I'm not so sure if that's a good idea for two reasons:

  1. somebody who explicitly asks for both subtitle options probably wants both subtitles, not that we choose which one for him/her.
  2. I don't think that the lack of support of the players is a sufficient reason since people can themselves rename the files, it must not be youtube-dl's issue.
@iemejia
Copy link
Contributor Author

@iemejia iemejia commented Sep 11, 2013

Another interesting question is if the semantics of --all-subs should include auto-captions or not. I think in principle not, but well it can be an option at least for the english ones.

@jaimeMF jaimeMF closed this in 6bc520c Sep 12, 2013
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 12, 2013

For the --all-subs semantic I've opened a new issue: #1412.
Feel free to open a new issue for handling differently automatic captions and subtitles.
Thanks again for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.