question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Requested format not available, but it is

See original GitHub issue

Checklist

  • I’m asking a question
  • I’ve looked through the README and FAQ for similar questions
  • I’ve searched the bugtracker for similar questions including closed ones

Question

I went through related issues, through the examples, through the whole documentation and yet I can’t find an answer as to why this isn’t working.

The video I want to download has the following formats:

$ youtube-dl https://www.youtube.com/watch?v=SWymfnI1SHI -F
[youtube] SWymfnI1SHI: Downloading webpage                                                                                                                                                                                                                                                                                                                                                          
[youtube] SWymfnI1SHI: Downloading video info webpage                                                                                                                                                                                                                                                                                                                                               
[youtube] SWymfnI1SHI: Downloading MPD manifest                                                                                                                                                                                                                                                                                                                                                     
[info] Available formats for SWymfnI1SHI:                                                                                                                                                                                                                                                                                                                                                           
format code  extension  resolution note                                                                                                                                                                                                                                                                                                                                                             
139          m4a        audio only DASH audio   49k , m4a_dash container, mp4a.40.5@ 48k (22050Hz)                                                                                                                                                                                                                                                                                                  
140          m4a        audio only DASH audio  130k , m4a_dash container, mp4a.40.2@128k (44100Hz)                                                                                                                                                                                                                                                                                                  
278          webm       256x144    DASH video   95k , webm_dash container, vp9, 30fps, video only                                                                                                                                                                                                                                                                                                   
160          mp4        256x144    DASH video  108k , mp4_dash container, avc1.4d400b, 30fps, video only                                                                                                                                                                                                                                                                                            
242          webm       426x240    DASH video  220k , webm_dash container, vp9, 30fps, video only                                                                                                                                                                                                                                                                                                   
133          mp4        426x240    DASH video  242k , mp4_dash container, avc1.4d400c, 30fps, video only                                                                                                                                                                                                                                                                                            
134          mp4        640x360    DASH video  360k , mp4_dash container, avc1.4d401e, 30fps, video only                                                                                                                                                                                                                                                                                            
243          webm       640x360    DASH video  405k , webm_dash container, vp9, 30fps, video only                                                                                                                                                                                                                                                                                                   
244          webm       854x480    DASH video  752k , webm_dash container, vp9, 30fps, video only                                                                                                                                                                                                                                                                                                   
135          mp4        854x480    DASH video 1155k , mp4_dash container, avc1.4d4014, 30fps, video only                                                                                                                                                                                                                                                                                            
247          webm       1280x720   DASH video 1505k , webm_dash container, vp9, 30fps, video only                                                                                                                                                                                                                                                                                                   
136          mp4        1280x720   DASH video 2310k , mp4_dash container, avc1.4d4016, 30fps, video only                                                                                                                                                                                                                                                                                            
137          mp4        1920x1080  DASH video 2358k , mp4_dash container, avc1.640028, 30fps, video only                                                                                                                                                                                                                                                                                            
248          webm       1920x1080  DASH video 2646k , webm_dash container, vp9, 30fps, video only                                                                                                                                                                                                                                                                                                   
18           mp4        640x360    medium , avc1.42001E, mp4a.40.2@ 96k, 10.34MiB (best) 

The following filter (that should download the best mp4 video less than 2GB and <=1080p):

youtube-dl https://www.youtube.com/watch?v=SWymfnI1SHI -f "(bestvideo[ext=mp4,height<=1080,filesize<2000M])+(bestaudio)" --merge-output-format mp4 -v

returns:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://www.youtube.com/watch?v=SWymfnI1SHI', u'-f', u'(bestvideo[ext=mp4,height<=1080,filesize<2000M])+(bestaudio)', u'--merge-output-format', u'mp4', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.06.27
[debug] Python version 2.7.15+ (CPython) - Linux-4.20.17-042017-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.6, ffprobe 3.4.6
[debug] Proxy map: {}
[youtube] SWymfnI1SHI: Downloading webpage
[youtube] SWymfnI1SHI: Downloading video info webpage
[youtube] {18} signature length 107, html5 player vflPG2SAp
[youtube] {137} signature length 103, html5 player vflPG2SAp
[youtube] {134} signature length 107, html5 player vflPG2SAp
[youtube] {140} signature length 103, html5 player vflPG2SAp
[youtube] SWymfnI1SHI: Downloading MPD manifest
ERROR: requested format not available
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 807, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 861, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1634, in process_video_result
    expected=True)
ExtractorError: requested format not available

while the following works:

$ youtube-dl https://www.youtube.com/watch?v=SWymfnI1SHI -f "137+140" --merge-output-format mp4 -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://www.youtube.com/watch?v=SWymfnI1SHI', u'-f', u'137+140', u'--merge-output-format', u'mp4', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.06.27
[debug] Python version 2.7.15+ (CPython) - Linux-4.20.17-042017-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.6, ffprobe 3.4.6
[debug] Proxy map: {}
[youtube] SWymfnI1SHI: Downloading webpage
[youtube] SWymfnI1SHI: Downloading video info webpage
[youtube] {18} signature length 107, html5 player vflPG2SAp
[youtube] {137} signature length 107, html5 player vflPG2SAp
[youtube] {134} signature length 107, html5 player vflPG2SAp
[youtube] {140} signature length 107, html5 player vflPG2SAp
[youtube] SWymfnI1SHI: Downloading MPD manifest
[debug] Invoking downloader on u'https://manifest.googlevideo.com/api/manifest/dash/expire/1562889698/ei/gnknXbbpConhhwaMyLOgCw/ip/46.126.78.23/id/496ca67e72354872/source/youtube/requiressl/yes/playback_host/r4---sn-1gieen7e.googlevideo.com/mm/31%2C26/mn/sn-1gieen7e%2Csn-4g5ednsd/ms/au%2Conr/mv/m/mvi/3/pl/16/hfr/all/as/fmp4_audio_clear%2Cwebm_audio_clear%2Cwebm2_audio_clear%2Cfmp4_sd_hd_clear%2Cwebm2_sd_hd_clear/initcwndbps/1842500/mt/1562868021/fvip/4/itag/0/sparams/expire%2Cei%2Cip%2Cid%2Csource%2Crequiressl%2Chfr%2Cas%2Citag/sig/ALgxI2wwQwIfZzdVJdv9QWzedHj-WHXIn68pQ9vEYw0ipBc7mJT3bwIgSocTN3uBT4Tal7Spugjiy8KNexZztOWnJCnT38SdJso%3D/lsparams/playback_host%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps/lsig/AHylml4wRQIgGnZ16fWmZL8oEU4qLoS2AY4dKGwF9FXEMHNGROn3PZ8CIQDMtmYPg9pTsOY4nah-dIiq84cf2XH-98CTJXMFO6MYXg%3D%3D'
[dashsegments] Total fragments: 46
[download] Destination: The Rachmaninoff Diet-SWymfnI1SHI.f137.mp4
[download] 100% of 49.28MiB in 00:32
[debug] Invoking downloader on u'https://manifest.googlevideo.com/api/manifest/dash/expire/1562889698/ei/gnknXbbpConhhwaMyLOgCw/ip/46.126.78.23/id/496ca67e72354872/source/youtube/requiressl/yes/playback_host/r4---sn-1gieen7e.googlevideo.com/mm/31%2C26/mn/sn-1gieen7e%2Csn-4g5ednsd/ms/au%2Conr/mv/m/mvi/3/pl/16/hfr/all/as/fmp4_audio_clear%2Cwebm_audio_clear%2Cwebm2_audio_clear%2Cfmp4_sd_hd_clear%2Cwebm2_sd_hd_clear/initcwndbps/1842500/mt/1562868021/fvip/4/itag/0/sparams/expire%2Cei%2Cip%2Cid%2Csource%2Crequiressl%2Chfr%2Cas%2Citag/sig/ALgxI2wwQwIfZzdVJdv9QWzedHj-WHXIn68pQ9vEYw0ipBc7mJT3bwIgSocTN3uBT4Tal7Spugjiy8KNexZztOWnJCnT38SdJso%3D/lsparams/playback_host%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps/lsig/AHylml4wRQIgGnZ16fWmZL8oEU4qLoS2AY4dKGwF9FXEMHNGROn3PZ8CIQDMtmYPg9pTsOY4nah-dIiq84cf2XH-98CTJXMFO6MYXg%3D%3D'
[dashsegments] Total fragments: 25
[download] Destination: The Rachmaninoff Diet-SWymfnI1SHI.f140.m4a
[download] 100% of 3.70MiB in 00:10
[ffmpeg] Merging formats into "The Rachmaninoff Diet-SWymfnI1SHI.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:The Rachmaninoff Diet-SWymfnI1SHI.f137.mp4' -i 'file:The Rachmaninoff Diet-SWymfnI1SHI.f140.m4a' -c copy -map '0:v:0' -map '1:a:0' 'file:The Rachmaninoff Diet-SWymfnI1SHI.temp.mp4'
Deleting original file The Rachmaninoff Diet-SWymfnI1SHI.f137.mp4 (pass -k to keep)
Deleting original file The Rachmaninoff Diet-SWymfnI1SHI.f140.m4a (pass -k to keep)

any clues as to why this happens?

Thank you for your kind help.

Possibly related to https://github.com/ytdl-org/youtube-dl/issues/14814

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
nikooo777commented, Jul 11, 2019

Thanks, I read the documentation all over again, line by line and I realized that filters are separated using their own brackets. I went ahead and corrected my example but I still end up with the same result. I really don’t know what I’m doing wrong at this point:

$ youtube-dl https://www.youtube.com/watch?v=SWymfnI1SHI -f "bestvideo[ext=mp4][height<=1080][filesize<2000M]+bestaudio" --merge-output-format mp4 -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://www.youtube.com/watch?v=SWymfnI1SHI', u'-f', u'bestvideo[ext=mp4][height<=1080][filesize<2000M]+bestaudio', u'--merge-output-format', u'mp4', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.06.27
[debug] Python version 2.7.15+ (CPython) - Linux-4.20.17-042017-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.6, ffprobe 3.4.6
[debug] Proxy map: {}
[youtube] SWymfnI1SHI: Downloading webpage
[youtube] SWymfnI1SHI: Downloading video info webpage
[youtube] {18} signature length 107, html5 player vflPG2SAp
[youtube] {137} signature length 107, html5 player vflPG2SAp
[youtube] {134} signature length 107, html5 player vflPG2SAp
[youtube] {140} signature length 107, html5 player vflPG2SAp
[youtube] SWymfnI1SHI: Downloading MPD manifest
ERROR: requested format not available
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 807, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 861, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1634, in process_video_result
    expected=True)
ExtractorError: requested format not available

I also attempted using --match-filter (which I guess is not the right way to do it) and I didn’t get any results either:

youtube-dl https://www.youtube.com/watch?v=SWymfnI1SHI --merge-output-format mp4 --match-filter "ext='mp4' & height<=1080 & filesize<2147483648" -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://www.youtube.com/watch?v=SWymfnI1SHI', u'--merge-output-format', u'mp4', u'--match-filter', u"ext='mp4' & height<=1080 & filesize<2147483648", u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.06.27
[debug] Python version 2.7.15+ (CPython) - Linux-4.20.17-042017-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.6, ffprobe 3.4.6
[debug] Proxy map: {}
[youtube] SWymfnI1SHI: Downloading webpage
[youtube] SWymfnI1SHI: Downloading video info webpage
[youtube] {18} signature length 107, html5 player vflPG2SAp
[youtube] {137} signature length 107, html5 player vflPG2SAp
[youtube] {134} signature length 107, html5 player vflPG2SAp
[youtube] {140} signature length 107, html5 player vflPG2SAp
[youtube] SWymfnI1SHI: Downloading MPD manifest
[debug] Default format spec: bestvideo+bestaudio/best
[download] The Rachmaninoff Diet does not pass filter ext='mp4' & height<=1080 & filesize<2147483648, skipping ..

I know I might be very frustrating at this point, but would you mind giving me a pointer so that I can achieve what I’m trying to do? Thank you and best regards

0reactions
nikooo777commented, Jul 12, 2019

That was the culprit! Thank you very much for your patience with me tonight.

Best regards

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get past "ERROR: requested format not available ...
I'm using this command to download the audio from a playlist of 322 videos: youtube-dl -f bestaudio[ext=webm] -x -k -o…
Read more >
python 3.x - youtube_dl ERROR: requested format not available
From my understanding, the reason for the error is to do with the link (URL) than the video format. The URL does not...
Read more >
youtube dl - specifying video-format(s) for downloading playlist
I'm trying to download youtube playlist in bestaudo+bestvideo quality. It downloaded the first video but for second video it throwing error ...
Read more >
Youtube-dl Tutorial With Examples For Beginners - OSTechNix
This tutorial explains the list of most commonly used Youtube-dl commands to download videos from Youtube and hundreds of websites in Linux.
Read more >
yt-dlp will not download in ts format - VideoHelp Forum
6 LTS based system. i tried "yt-dlp --format ts ${URL}" and got the message "Requested format is not available" and exits with status...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found