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

[YouTube] Format misdetection? Cannot download video #7499

Closed
joepie91 opened this issue Nov 14, 2015 · 4 comments
Closed

[YouTube] Format misdetection? Cannot download video #7499

joepie91 opened this issue Nov 14, 2015 · 4 comments

Comments

@joepie91
Copy link

@joepie91 joepie91 commented Nov 14, 2015

Likely a similar issue to #6341. Video doesn't download when using bestvideo+bestaudio (using an alias), likely because no separate audio track is available:

sven@linux-etoq:~/ytdl-test> ytdl -v https://www.youtube.com/watch?v=8kK4nhVMUC8
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--title', u'--continue', u'--retries', u'4', u'--write-info-json', u'--write-description', u'--write-thumbnail', u'--write-annotations', u'--all-subs', u'--ignore-errors', u'--merge-output-format', u'mkv', u'-f', u'bestvideo+bestaudio', u'-v', u'https://www.youtube.com/watch?v=8kK4nhVMUC8']
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2015.11.13
[debug] Python version 2.7.6 - Linux-3.11.10-29-desktop-x86_64-with-SuSE-13.1-x86_64
[debug] exe versions: ffmpeg 2.8.1, ffprobe 2.8.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 8kK4nhVMUC8: Downloading webpage
[youtube] 8kK4nhVMUC8: Downloading video info webpage
[youtube] 8kK4nhVMUC8: Extracting video information
WARNING: video doesn't have subtitles
[youtube] 8kK4nhVMUC8: Searching for annotations.
ERROR: requested format not available
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 672, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 718, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1328, in process_video_result
    expected=True)
ExtractorError: requested format not available

Format list according to -F:

sven@linux-etoq:~/ytdl-test> ytdl -v -F https://www.youtube.com/watch?v=8kK4nhVMUC8
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--title', u'--continue', u'--retries', u'4', u'--write-info-json', u'--write-description', u'--write-thumbnail', u'--write-annotations', u'--all-subs', u'--ignore-errors', u'--merge-output-format', u'mkv', u'-f', u'bestvideo+bestaudio', u'-v', u'-F', u'https://www.youtube.com/watch?v=8kK4nhVMUC8']
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2015.11.13
[debug] Python version 2.7.6 - Linux-3.11.10-29-desktop-x86_64-with-SuSE-13.1-x86_64
[debug] exe versions: ffmpeg 2.8.1, ffprobe 2.8.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] 8kK4nhVMUC8: Downloading webpage
[youtube] 8kK4nhVMUC8: Downloading video info webpage
[youtube] 8kK4nhVMUC8: Extracting video information
WARNING: video doesn't have subtitles
[youtube] 8kK4nhVMUC8: Searching for annotations.
[info] Available formats for 8kK4nhVMUC8:
format code  extension  resolution note
17           3gp        176x144    small ,  mp4a.40.2, mp4v.20.3
36           3gp        320x240    small ,  mp4a.40.2, mp4v.20.3
5            flv        400x240    small 
18           mp4        640x360    medium ,  mp4a.40.2, avc1.42001E (best)

In this case, the download only works correctly when specifying -f 18 without an audio format.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 14, 2015

You're right this video does not provide audio or video only formats. -f bestvideo+bestaudio/best fits your need.

@yan12125 yan12125 closed this Nov 14, 2015
@joepie91
Copy link
Author

@joepie91 joepie91 commented Nov 14, 2015

Can you clarify a bit more on what -f bestvideo+bestaudio/best does? Am I correct in understanding that it basically means "try bestvideo+bestaudio first, and if that isn't available, just try the best combined format"?

Or, worded differently: Can I use this by default, without reducing the quality of videos that do have a separate audio and video format?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 14, 2015

try bestvideo+bestaudio first, and if that isn't available, just try the best combined format

Yes you're right.

Can I use this by default, without reducing the quality of videos that do have a separate audio and video format?

For YouTube, it's the usual case that bestvideo+bestaudio results in equal or better quality than best, with some exceptions. Cases can be found in #7034. Current youtube-dl can't handle such cases correctly, so there's no guarantee.

@joepie91
Copy link
Author

@joepie91 joepie91 commented Nov 14, 2015

I see, thanks. I'm going to track #7034 - I use youtube-dl primarily for archival purposes, so such an issue is pretty critical to me.

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.