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

Download fails when using --write-srt without subtitles #901

Closed
cryzed opened this issue Jun 21, 2013 · 7 comments
Closed

Download fails when using --write-srt without subtitles #901

cryzed opened this issue Jun 21, 2013 · 7 comments
Labels
bug

Comments

@cryzed
Copy link
Contributor

@cryzed cryzed commented Jun 21, 2013

The video download fails entirely when there are no subtitles to be downloaded while using the "--write-srt" command-line option. Usually I use the following options by default to retrieve all the video's metadata if available:

--write-description
--write-info-json
--write-srt

This new behavior makes this impossible. I get the following error message:

[download] Downloading video #22 of 39
[youtube] Setting language
[youtube] bHPlnNNMCj8: Downloading video webpage
[youtube] bHPlnNNMCj8: Downloading video info webpage
[youtube] bHPlnNNMCj8: Extracting video information
[youtube] bHPlnNNMCj8: Checking available subtitles
[youtube] bHPlnNNMCj8: Looking for automatic captions
[youtube] bHPlnNNMCj8: Downloading automatic captions
ERROR: Unable to download webpage: HTTP Error 404: Not Found; please report this issue on GitHub.
jaimeMF added a commit that referenced this issue Jun 22, 2013
…automatic captions (related #901)
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 22, 2013

Ok, the problem is that we didn't set a default language for automatic capitons.
Apart from that, there are two things that I'd like to know:

  1. Would you prefer not to download the automatic captions?, we could add an option for disabling them.
  2. Do you expect youtube-dl to fail if there are no subtitles or automatic captions?, with the current behaviour unless you pass the --ignore-errors it will if stops if they aren't available.
    Thanks for reporting it and sorry for the problem.
@cryzed
Copy link
Contributor Author

@cryzed cryzed commented Jun 22, 2013

Regarding the first question: Yes definitely, I think the best method would be to have another command-line option for the automatic subtitles if people really want them, i.e. "--write-automatic-srt", because let's be honest, most of the time they are less than inadequate.

Regarding the second question, no, I don't really, since the version of youtube-dl I had been using until now didn't do that either. In my opinion a simple warning output would be ideal since it certainly isn't a "fatal error" that prevents the actual file (the video) from being downloaded, a bit of the metadata will simply be missing. The "--ignore-errors" option should be used to actively ignore failed video downloads in my opinion.

Thank you, and absolutely no problem.

jaimeMF added a commit that referenced this issue Jun 22, 2013
… found (related #901)

For example when downloading a playlist some videos may not have subtitles but the download shouldn't stop.
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 22, 2013

You are right, now it just reports warnings.
About the automatic captions, I understand your opinion, I have opened a new issue (#903) for discussion.

@jaimeMF jaimeMF closed this Jun 22, 2013
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jun 23, 2013

@cryzed BTW --write-srt is deprecated, use --write-sub instead ( it will download them to .srt files by default)

@cryzed
Copy link
Contributor Author

@cryzed cryzed commented Jun 23, 2013

Thanks for the heads up, Jaime. I haven't been really paying attention to changing command-line arguments, I've been using youtube-dl in combination with batch-youtube-dl.py, it basically allows me to just create a batch-file.txt with the URLs to download (e.g. a playlist) and the appropriate command-line arguments, seems like I need to update some of those.

@phihag
Copy link
Contributor

@phihag phihag commented Jun 23, 2013

@cryzed That script is only useful if you have multiple batch files. In all other instances, simply calling

youtube-dl --batch-file batch-file.txt

should suffice.

@cryzed
Copy link
Contributor Author

@cryzed cryzed commented Jun 23, 2013

That is exactly what I wrote it for actually -- being able to use multiple batch-files. I have the following folder structure:

Videos/YouTube/<artist>/<playlist>/batch-file.txt

I execute the batch-youtube-dl.py script in the YouTube root folder and all my playlists will be updated. I know that I can use youtube-dl like that, thank you though.

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
3 participants
You can’t perform that action at this time.