Print a list of available formats #44

Closed
opened 2026-02-20 22:24:01 -05:00 by deekerman · 7 comments
Owner

Originally created by @dd1 on GitHub (Jan 23, 2011).

It would be nice to have a CL option enabling one to obtain a list of all available formats for a specific video (URL). In other words, how can I know what to specify as FORMAT for -f? Thanks in advance.

Originally created by @dd1 on GitHub (Jan 23, 2011). It would be nice to have a CL option enabling one to obtain a list of all available formats for a specific video (URL). In other words, how can I know what to specify as FORMAT for -f? Thanks in advance.
deekerman 2026-02-20 22:24:01 -05:00
  • closed this issue
  • added the
    request
    label
Author
Owner

@devconsole commented on GitHub (Apr 11, 2011):

Here's what I do, but maybe there's a better way:

./youtube-dl --all-formats --get-filename http://www.youtube.com/watch?v=dQw4w9WgXcQ

That gives you a list of file names like so:
dQw4w9WgXcQ-35.flv
dQw4w9WgXcQ-34.flv
dQw4w9WgXcQ-18.mp4
dQw4w9WgXcQ-5.flv

The numbers next to the dashes are the video formats (35, 34, 18, 5). The list of formats is documented here: http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs

@devconsole commented on GitHub (Apr 11, 2011): Here's what I do, but maybe there's a better way: ./youtube-dl --all-formats --get-filename http://www.youtube.com/watch?v=dQw4w9WgXcQ That gives you a list of file names like so: dQw4w9WgXcQ-35.flv dQw4w9WgXcQ-34.flv dQw4w9WgXcQ-18.mp4 dQw4w9WgXcQ-5.flv The numbers next to the dashes are the video formats (35, 34, 18, 5). The list of formats is documented here: http://en.wikipedia.org/wiki/YouTube#Quality_and_codecs
Author
Owner

@shirishag75 commented on GitHub (Apr 14, 2011):

At the extent of being an idiot, can somebody explain me how can I make sure that I get the format. While the above works, I do have an issue with downloading a specific version. I have seen this happen with few other videos as well.

This is on a friend's window machine.

C:\Documents and Settings\Admin\Commands>youtube-dl.py --all-formats --get-file
name "http://www.youtube.com/watch?v=ssxB0a3Js7I"
ssxB0a3Js7I-22.mp4
ssxB0a3Js7I-35.flv
ssxB0a3Js7I-34.flv
ssxB0a3Js7I-18.mp4
ssxB0a3Js7I-5.flv

C:\Documents and Settings\Admin\Commands>youtube-dl.py --format=mp4 "http://www.
youtube.com/watch?v=ssxB0a3Js7I"
[youtube] Setting language
[youtube] ssxB0a3Js7I: Downloading video webpage
[youtube] ssxB0a3Js7I: Downloading video info webpage
[youtube] ssxB0a3Js7I: Extracting video information
ERROR: requested format not available

Can somebody explain that to me.

@shirishag75 commented on GitHub (Apr 14, 2011): At the extent of being an idiot, can somebody explain me how can I make sure that I get the format. While the above works, I do have an issue with downloading a specific version. I have seen this happen with few other videos as well. This is on a friend's window machine. C:\Documents and Settings\Admin\Commands>youtube-dl.py --all-formats --get-file name "http://www.youtube.com/watch?v=ssxB0a3Js7I" ssxB0a3Js7I-22.mp4 ssxB0a3Js7I-35.flv ssxB0a3Js7I-34.flv ssxB0a3Js7I-18.mp4 ssxB0a3Js7I-5.flv C:\Documents and Settings\Admin\Commands>youtube-dl.py --format=mp4 "http://www. youtube.com/watch?v=ssxB0a3Js7I" [youtube] Setting language [youtube] ssxB0a3Js7I: Downloading video webpage [youtube] ssxB0a3Js7I: Downloading video info webpage [youtube] ssxB0a3Js7I: Extracting video information ERROR: requested format not available Can somebody explain that to me.
Author
Owner

@dd1 commented on GitHub (Apr 14, 2011):

ssxB0a3Js7I-22.mp4
[...]
ssxB0a3Js7I-18.mp4

Which of the above do you mean?

youtube-dl.py --format=mp4 "..."
[...]
ERROR: requested format not available

I guess you should probably try --format=22 or --format=18.

Dmitry Chistikov

@dd1 commented on GitHub (Apr 14, 2011): > ssxB0a3Js7I-22.mp4 > [...] > ssxB0a3Js7I-18.mp4 Which of the above do you mean? > youtube-dl.py --format=mp4 "..." > [...] > ERROR: requested format not available I guess you should probably try --format=22 or --format=18. ## Dmitry Chistikov
Author
Owner

@nirbheek commented on GitHub (Jan 13, 2012):

Isn't this solved with the "-F" option now?

@nirbheek commented on GitHub (Jan 13, 2012): Isn't this solved with the "-F" option now?
Author
Owner

@andrew-aladev commented on GitHub (Jun 14, 2012):

yes. "-F" works perfect

@andrew-aladev commented on GitHub (Jun 14, 2012): yes. "-F" works perfect
Author
Owner

@Sepero commented on GitHub (Oct 31, 2012):

I think this issue can be marked as closed also. Cheers

@Sepero commented on GitHub (Oct 31, 2012): I think this issue can be marked as closed also. Cheers
Author
Owner

@viliyam2811 commented on GitHub (Feb 5, 2019):

It's not youtube-dl.py --format=mp4.... it's youtube-dl.py --format mp4

@viliyam2811 commented on GitHub (Feb 5, 2019): It's not youtube-dl.py --format=mp4.... it's youtube-dl.py --format mp4
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#44
No description provided.