2

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 "https://www.youtube.com/playlist?list=PLvwB65U8V0HHCEyW2UTyOJym5FsdqfbHQ"
[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 "https://www.youtube.com/playlist?list=PLvwB65U8V0HHCEyW2UTyOJym5FsdqfbHQ"
[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 1

5

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
  • Thanks for pointing out the mistake. Just for clarification is audio is taking precedence over video? Commented Feb 25, 2016 at 8:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .