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

Format unavailable cause a error #1005

Closed
vgrimmer opened this issue Jul 8, 2013 · 3 comments
Closed

Format unavailable cause a error #1005

vgrimmer opened this issue Jul 8, 2013 · 3 comments
Labels

Comments

@vgrimmer
Copy link

@vgrimmer vgrimmer commented Jul 8, 2013

IMHO, the preferable format not found should jump to the default format if they are available, otherwise return with en error info.

$ youtube-dl -f 22 --verbose http://www.youtube.com/watch?v=zut2NLMVL_k
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-f', '22', '--verbose', 'http://www.youtube.com/watch?v=zut2NLMVL_k']
[debug] youtube-dl version 2013.07.05
[debug] Python version 2.7.3 - CYGWIN_NT-6.2-WOW64-1.7.18-0.263-5-3-i686-32bit
[debug] Proxy map: {}
[youtube] Setting language
[youtube] zut2NLMVL_k: Downloading video webpage
[youtube] zut2NLMVL_k: Downloading video info webpage
[youtube] zut2NLMVL_k: Extracting video information
ERROR: requested format not available; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbo se flag and include its complete output.
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 312, in extract_info
ie_result = ie.extract(url)
File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 92, in extract
return self._real_extract(url)
File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/youtube.py", line 601, in _real_extract
raise ExtractorError(u'requested format not available')
ExtractorError: requested format not available; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with th e --verbose flag and include its complete output.

@alphapapa
Copy link
Contributor

@alphapapa alphapapa commented Jul 19, 2013

Yes please, and a good way to handle this is with -i, --ignore-errors. Using that in combination with -f should get the next-best format if the requested one is not available. As it is now, to make sure a download works without having to babysit it, I have to do, e.g.:

$ youtube-dl -t -f 22 URL || youtube-dl -t URL

@vgrimmer
Copy link
Author

@vgrimmer vgrimmer commented Jul 23, 2013

That does work. Thanks!

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 24, 2016

Format preference can now be specified with slash in order to jump to first available format, e.g. -f 22/best. See format selection.

@dstftw dstftw closed this Jan 24, 2016
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.