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 ERROR: requested format not available.

QUESTION:

How to make youtube-dl to fetch the 2nd video in some other quality if the passed quality is not available?

First I've issued this command

youtube-dl -f bestaudio+bestvideo ""
[youtube:playlist] PLvwB65U8V0HHCEyW2UTyOJym5FsdqfbHQ: Downloading webpage
[download] Downloading playlist: OpenCV Tutorials
[youtube:playlist] playlist OpenCV Tutorials: Downloading 11 videos
[download] Downloading video 1 of 11
[youtube] cgo0UitHfp8: Downloading webpage
[youtube] cgo0UitHfp8: Downloading video info webpage
[youtube] cgo0UitHfp8: Extracting video information
[youtube] cgo0UitHfp8: Downloading MPD manifest
ERROR: The first format must contain the video, try using "-f 136+141"

Then

OpenCV Tutorials [Kyle Hounslow] youtube-dl -f 136+141 ""
[youtube:playlist] PLvwB65U8V0HHCEyW2UTyOJym5FsdqfbHQ: Downloading webpage
[download] Downloading playlist: OpenCV Tutorials
[youtube:playlist] playlist OpenCV Tutorials: Downloading 11 videos
[download] Downloading video 1 of 11
[youtube] cgo0UitHfp8: Downloading webpage
[youtube] cgo0UitHfp8: Downloading video info webpage
[youtube] cgo0UitHfp8: Extracting video information
[youtube] cgo0UitHfp8: Downloading MPD manifest
[download] OpenCV (All Versions) - Easy Installation Guide and Sample Project (VS 2010 C++)-cgo0UitHfp8.mp4 has already been downloaded and merged
[download] Downloading video 2 of 11
[youtube] OjNClUIDgt8: Downloading webpage
[youtube] OjNClUIDgt8: Downloading video info webpage
[youtube] OjNClUIDgt8: Extracting video information
[youtube] OjNClUIDgt8: Downloading MPD manifest
ERROR: requested format not available

1 Answer

As stated in the first error message:

ERROR: The first format must contain the video

So it should be -f bestvideo+bestaudio not -f bestaudio+bestvideo. Moreover you don't need to specify any format at all - best possible quality will be downloaded by default automatically.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest