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

Default options (bestvideo+bestaudio) does not consider downloading a higher-resolution video #7034

Open
tbu- opened this issue Oct 1, 2015 · 7 comments
Labels

Comments

@tbu-
Copy link

@tbu- tbu- commented Oct 1, 2015

$ youtube-dl --get-format https://www.youtube.com/watch?v=X7pzGyfRx9A
WARNING: Could not download DASH manifest: HTTP Error 403: Forbidden
136 - 900x720 (DASH video)+141 - audio only (DASH audio)
$ youtube-dl -F https://www.youtube.com/watch?v=X7pzGyfRx9A
[youtube] X7pzGyfRx9A: Downloading webpage
[youtube] X7pzGyfRx9A: Downloading video info webpage
[youtube] X7pzGyfRx9A: Extracting video information
[youtube] X7pzGyfRx9A: Downloading DASH manifest
[youtube] X7pzGyfRx9A: Downloading js player new-en_US-vflJLt_ns
[youtube] X7pzGyfRx9A: Downloading DASH manifest
WARNING: Could not download DASH manifest: HTTP Error 403: Forbidden
[info] Available formats for X7pzGyfRx9A:
format code  extension  resolution note
171          webm       audio only DASH audio   94k , vorbis@128k (44100Hz), 7.20MiB
140          m4a        audio only DASH audio  129k , m4a_dash container, aac  @128k (44100Hz), 10.15MiB
141          m4a        audio only DASH audio  256k , m4a_dash container, aac  @256k (44100Hz), 20.16MiB
160          mp4        180x144    DASH video  114k , avc1.4d400c, 15fps, video only, 8.63MiB
242          webm       300x240    DASH video  148k , vp9, 1fps, video only, 6.92MiB
243          webm       450x360    DASH video  255k , vp9, 1fps, video only, 12.07MiB
133          mp4        300x240    DASH video  262k , avc1.4d400d, 15fps, video only, 19.29MiB
134          mp4        450x360    DASH video  403k , avc1.4d4015, 15fps, video only, 17.30MiB
244          webm       600x480    DASH video  467k , vp9, 1fps, video only, 22.22MiB
135          mp4        600x480    DASH video  698k , avc1.4d4016, 15fps, video only, 36.07MiB
247          webm       900x720    DASH video  786k , vp9, 1fps, video only, 40.29MiB
136          mp4        900x720    DASH video 1183k , avc1.4d401f, 15fps, video only, 71.93MiB
17           3gp        176x144    
36           3gp        320x240    
5            flv        400x240    
43           webm       640x360    
18           mp4        640x360    
22           mp4        1280x720   (best)

The format specification mp4+bestaudio downloads the higher quality combination:

$ youtube-dl --get-format --format mp4+bestaudio https://www.youtube.com/watch?v=X7pzGyfRx9A
WARNING: Could not download DASH manifest: HTTP Error 403: Forbidden
22 - 1280x720+141 - audio only (DASH audio)
@Hrxn
Copy link

@Hrxn Hrxn commented Oct 1, 2015

List formats:

-F, --list-formats

Get specific format:

-f, --format FORMAT

Probably your --get-format that's causing problems..

@tbu-
Copy link
Author

@tbu- tbu- commented Oct 1, 2015

I only used this to show which formats youtube-dl downloads. When executing without -F, youtube-dl actually downloads the displayed formats.

@jaimeMF jaimeMF added the request label Oct 2, 2015
@Hrxn
Copy link

@Hrxn Hrxn commented Oct 5, 2015

Could you provide an example link, where you don't end up with the desired resolution?

Because it all seems to work for me here..

@tbu-
Copy link
Author

@tbu- tbu- commented Oct 9, 2015

One example of the problem can be found in the original post: There is a video file for 1280x720, yet bestvideo+bestaudio downloads 900x720.

@Hrxn
Copy link

@Hrxn Hrxn commented Nov 7, 2015

Okay, I see what you mean..

I guess the selection is based on video bitrate then..

@joepie91
Copy link

@joepie91 joepie91 commented Nov 14, 2015

Subscribing to this thread - this can be a significant issue when using youtube-dl for archival purposes (where obtaining the absolute highest-quality material available is of critical importance).

Wouldn't it be a relatively quick fix to consider video+audio formats as well, and then simply only use the video track? Assuming it's not possible to determine the bitrate of the video+audio format.

@RektDefy
Copy link

@RektDefy RektDefy commented Jan 17, 2016

This is my first post here, but I've been using the program for quite a while now. So first I just want to say Thank You all for your work on this project!

I've had this problem for a while, but I think I've finally developed a pretty good workaround, perhaps it might work as a solution.

The recommended solution is 1), the other two might be helpful for some users who want either 60fps or MP4 format.
(Note: This will not grab 3D streams.)

  1. Highest Resolution (Use non-DASH equivalents over DASH (Only when beneficial.)/Prefer .MP4 (if available) over .FLV on non-YouTube sites/Get best (Whatever it is.))
-f "bestvideo[width>=1280]+bestaudio/22/bestvideo[height>360]+bestaudio/18/43/bestvideo[width>450]+bestaudio/6/bestvideo[height>=240]+bestaudio/5/36/bestvideo[height>=144]+bestaudio/17/best[ext=mp4]/best"
  1. (1)Highest Framerate/(2)Highest Resolution (Potentially prefers a higher framerate video over a higher resolution video.)
-f "bestvideo[fps>30]+bestaudio/bestvideo[width>=1280]+bestaudio/22/bestvideo[height>360]+bestaudio/18/43/bestvideo[width>450]+bestaudio/6/bestvideo[height>=240]+bestaudio/5/36/bestvideo[height>=144]+bestaudio/17/best[ext=mp4]/best"
  1. .MP4/.FLV/.3GP Only (No WebM/.MKV) (Quality loss (likely) for a more widely supported container.) (.FLV can usually be converted to .MP4.)
-f "bestvideo[width>1280&ext=mp4]+bestaudio[ext=m4a]/22/bestvideo[height>360&ext=mp4]+bestaudio[ext=m4a]/18/bestvideo[width>450&ext=mp4]+bestaudio[ext=m4a]/6/bestvideo[height>=240&ext=mp4]+bestaudio[ext=m4a]/5/36/bestvideo[height>=144&ext=mp4]+bestaudio[ext=m4a]/17/best[ext=mp4]/best"
Test Cases: Video ID Resolution Default New
1. dxpmyYpjRIQ 4k(ish) PASS PASS
2. -Hw8aZncbBI 1080p PASS PASS
3. vsK0FLsJMpo 720p FAIL PASS
4. D6lS97HBaKM 480p PASS PASS
5. 3SVG4wjDMu0 360p FAIL PASS
6. fBQ5i_F0YA0 240p FAIL PASS

(1)

>youtube-dl https://www.youtube.com/watch?v=dxpmyYpjRIQ -F
[youtube] dxpmyYpjRIQ: Downloading webpage
[youtube] dxpmyYpjRIQ: Downloading video info webpage
[youtube] dxpmyYpjRIQ: Extracting video information
[youtube] dxpmyYpjRIQ: Downloading DASH manifest
[youtube] dxpmyYpjRIQ: Downloading DASH manifest
[info] Available formats for dxpmyYpjRIQ:
format code  extension  resolution note
249          webm       audio only DASH audio   56k , opus @ 50k, 4.87MiB
250          webm       audio only DASH audio   81k , opus @ 70k, 6.35MiB
171          webm       audio only DASH audio  128k , vorbis@128k (44100Hz), 10.62MiB
140          m4a        audio only DASH audio  129k , m4a_dash container, aac  @128k (44100Hz), 12.60MiB
251          webm       audio only DASH audio  202k , opus @160k, 15.73MiB
141          m4a        audio only DASH audio  256k , m4a_dash container, aac  @256k (44100Hz), 25.02MiB
160          mp4        256x144    DASH video  127k , avc1.4d400c, 15fps, video only, 10.46MiB
278          webm       256x144    DASH video  190k , webm container, vp9, 15fps, video only, 9.09MiB
242          webm       426x240    DASH video  266k , vp9, 30fps, video only, 17.89MiB
133          mp4        426x240    DASH video  289k , avc1.4d4015, 30fps, video only, 23.80MiB
243          webm       640x360    DASH video  509k , vp9, 30fps, video only, 33.21MiB
134          mp4        640x360    DASH video  607k , avc1.4d401e, 30fps, video only, 45.11MiB
244          webm       854x480    DASH video  910k , vp9, 30fps, video only, 59.65MiB
135          mp4        854x480    DASH video 1121k , avc1.4d401f, 30fps, video only, 86.61MiB
136          mp4        1280x720   DASH video 2233k , avc1.4d401f, 30fps, video only, 170.47MiB
302          webm       1280x720   DASH video 3309k , vp9, 60fps, video only, 206.08MiB
298          mp4        1280x720   DASH video 3344k , h264, 60fps, video only, 275.00MiB
137          mp4        1920x1080  DASH video 4178k , avc1.640028, 30fps, video only, 318.56MiB
299          mp4        1920x1080  DASH video 5581k , h264, 60fps, video only, 472.88MiB
303          webm       1920x1080  DASH video 6334k , vp9, 60fps, video only, 356.37MiB
264          mp4        2560x1440  DASH video 10085k , avc1.640032, 30fps, video only, 749.18MiB
266          mp4        3200x1800  DASH video 22292k , h264, 30fps, video only, 1.38GiB
271          webm       2560x1440  DASH video 25465k , vp9, 30fps, video only, 777.00MiB
313          webm       3200x1800  DASH video 32203k , vp9, 30fps, video only, 1.31GiB
272          webm       3200x1800  DASH video 33465k , vp9, 30fps, video only, 1.44GiB
17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2
36           3gp        320x240    small , mp4v.20.3,  mp4a.40.2
5            flv        400x240    small
43           webm       640x360    medium , vp8.0,  vorbis
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2
22           mp4        1280x720   hd720 , avc1.64001F,  mp4a.40.2 (best)

>youtube-dl https://www.youtube.com/watch?v=dxpmyYpjRIQ --get-format
272 - 3200x1800 (DASH video)+141 - audio only (DASH audio)

>youtube-dl https://www.youtube.com/watch?v=dxpmyYpjRIQ --get-format -f "bestvideo[width>=1280]+bestaudio/22/bestvideo[height>360]+bestaudio/18/43/bestvideo[width>450]+bestaudio/6/bestvideo[height>=240]+bestaudio/5/36/bestvideo[height>=144]+bestaudio/17/best[ext=mp4]/best"
272 - 3200x1800 (DASH video)+141 - audio only (DASH audio)

youtube-dl default: PASS
Rekt script: PASS

(2)

>youtube-dl https://www.youtube.com/watch?v=-Hw8aZncbBI -F
[youtube] -Hw8aZncbBI: Downloading webpage
[youtube] -Hw8aZncbBI: Downloading video info webpage
[youtube] -Hw8aZncbBI: Extracting video information
[youtube] -Hw8aZncbBI: Downloading DASH manifest
[youtube] -Hw8aZncbBI: Downloading DASH manifest
[info] Available formats for -Hw8aZncbBI:
format code  extension  resolution note
171          webm       audio only DASH audio  126k , vorbis@128k (44100Hz), 28.58MiB
140          m4a        audio only DASH audio  129k , m4a_dash container, aac  @128k (44100Hz), 33.79MiB
141          m4a        audio only DASH audio  257k , m4a_dash container, aac  @256k (44100Hz), 67.82MiB
160          mp4        256x144    DASH video  116k , avc1.4d400c, 15fps, video only, 28.76MiB
278          webm       256x144    DASH video  169k , webm container, vp9, 1fps, video only, 21.65MiB
133          mp4        426x240    DASH video  256k , avc1.4d4015, 30fps, video only, 65.10MiB
242          webm       426x240    DASH video  419k , vp9, 1fps, video only, 43.40MiB
134          mp4        640x360    DASH video  634k , avc1.4d401e, 30fps, video only, 121.84MiB
243          webm       640x360    DASH video 1029k , vp9, 1fps, video only, 84.56MiB
135          mp4        854x480    DASH video 1145k , avc1.4d401f, 30fps, video only, 242.71MiB
244          webm       854x480    DASH video 1885k , vp9, 1fps, video only, 165.02MiB
136          mp4        1280x720   DASH video 2253k , avc1.4d401f, 30fps, video only, 487.43MiB
137          mp4        1920x1080  DASH video 4354k , avc1.640028, 30fps, video only, 983.82MiB
247          webm       1280x720   DASH video 5011k , vp9, 1fps, video only, 333.91MiB
248          webm       1920x1080  DASH video 9701k , vp9, 1fps, video only, 600.06MiB
17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2
36           3gp        320x240    small , mp4v.20.3,  mp4a.40.2
5            flv        400x240    small
43           webm       640x360    medium , vp8.0,  vorbis
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2
59           mp4        854x480    large , avc1.4D001F,  mp4a.40.2
78           mp4        854x480    medium , avc1.4D001F,  mp4a.40.2
22           mp4        1280x720   hd720 , avc1.64001F,  mp4a.40.2 (best)

>youtube-dl https://www.youtube.com/watch?v=-Hw8aZncbBI --get-format
248 - 1920x1080 (DASH video)+141 - audio only (DASH audio)

>youtube-dl https://www.youtube.com/watch?v=-Hw8aZncbBI --get-format -f "bestvideo[width>=1280]+bestaudio/22/bestvideo[height>360]+bestaudio/18/43/bestvideo[width>450]+bestaudio/6/bestvideo[height>=240]+bestaudio/5/36/bestvideo[height>=144]+bestaudio/17/best[ext=mp4]/best"
248 - 1920x1080 (DASH video)+141 - audio only (DASH audio)

youtube-dl default: PASS
Rekt script: PASS

(3)

>youtube-dl https://www.youtube.com/watch?v=vsK0FLsJMpo -F
[youtube] vsK0FLsJMpo: Downloading webpage
[youtube] vsK0FLsJMpo: Downloading video info webpage
[youtube] vsK0FLsJMpo: Extracting video information
[youtube] vsK0FLsJMpo: Downloading DASH manifest
[youtube] vsK0FLsJMpo: Downloading DASH manifest
[info] Available formats for vsK0FLsJMpo:
format code  extension  resolution note
140          m4a        audio only DASH audio  128k , m4a_dash container, aac  @128k (44100Hz), 13.52MiB
171          webm       audio only DASH audio  132k , vorbis@128k (44100Hz), 11.40MiB
141          m4a        audio only DASH audio  256k , m4a_dash container, aac  @256k (44100Hz), 27.15MiB
160          mp4        230x144    DASH video  132k , avc1.42c00c, 15fps, video only, 11.38MiB
278          webm       230x144    DASH video  171k , webm container, vp9, 1fps, video only, 6.31MiB
242          webm       384x240    DASH video  228k , vp9, 1fps, video only, 12.60MiB
133          mp4        384x240    DASH video  369k , avc1.4d400d, 30fps, video only, 25.76MiB
243          webm       576x360    DASH video  442k , vp9, 1fps, video only, 23.69MiB
134          mp4        576x360    DASH video  605k , avc1.4d401e, 30fps, video only, 28.75MiB
244          webm       768x480    DASH video  909k , vp9, 1fps, video only, 45.60MiB
135          mp4        768x480    DASH video 1114k , avc1.4d401f, 30fps, video only, 57.68MiB
247          webm       1152x720   DASH video 1816k , vp9, 1fps, video only, 79.55MiB
136          mp4        1152x720   DASH video 2226k , avc1.4d401f, 30fps, video only, 111.32MiB
17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2
36           3gp        320x240    small , mp4v.20.3,  mp4a.40.2
5            flv        400x240    small
43           webm       640x360    medium , vp8.0,  vorbis
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2
22           mp4        1280x720   hd720 , avc1.64001F,  mp4a.40.2 (best)

>youtube-dl https://www.youtube.com/watch?v=vsK0FLsJMpo --get-format
136 - 1152x720 (DASH video)+141 - audio only (DASH audio)

>youtube-dl https://www.youtube.com/watch?v=vsK0FLsJMpo --get-format -f "bestvideo[width>=1280]+bestaudio/22/bestvideo[height>360]+bestaudio/18/43/bestvideo[width>450]+bestaudio/6/bestvideo[height>=240]+bestaudio/5/36/bestvideo[height>=144]+bestaudio/17/best[ext=mp4]/best"
22 - 1280x720 (hd720)

youtube-dl default: FAIL
Rekt script: PASS

(4)

>youtube-dl https://www.youtube.com/watch?v=D6lS97HBaKM -F
[youtube] D6lS97HBaKM: Downloading webpage
[youtube] D6lS97HBaKM: Downloading video info webpage
[youtube] D6lS97HBaKM: Extracting video information
[youtube] D6lS97HBaKM: Downloading DASH manifest
[youtube] D6lS97HBaKM: Downloading DASH manifest
[info] Available formats for D6lS97HBaKM:
format code  extension  resolution note
140          m4a        audio only DASH audio  128k , m4a_dash container, aac  @128k (44100Hz), 6.93MiB
141          m4a        audio only DASH audio  256k , m4a_dash container, aac  @256k (44100Hz), 13.91MiB
160          mp4        192x144    DASH video  117k , avc1.42c00c, 15fps, video only, 5.75MiB
133          mp4        320x240    DASH video  267k , avc1.4d400d, 25fps, video only, 12.74MiB
134          mp4        480x360    DASH video  606k , avc1.4d4015, 25fps, video only, 19.30MiB
135          mp4        640x480    DASH video 1109k , avc1.4d401e, 25fps, video only, 39.62MiB
17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2
36           3gp        320x240    small , mp4v.20.3,  mp4a.40.2
5            flv        400x240    small
43           webm       640x360    medium , vp8.0,  vorbis
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2 (best)

>youtube-dl https://www.youtube.com/watch?v=D6lS97HBaKM --get-format
135 - 640x480 (DASH video)+141 - audio only (DASH audio)

>youtube-dl https://www.youtube.com/watch?v=D6lS97HBaKM --get-format -f "bestvideo[width>=1280]+bestaudio/22/bestvideo[height>360]+bestaudio/18/43/bestvideo[width>450]+bestaudio/6/bestvideo[height>=240]+bestaudio/5/36/bestvideo[height>=144]+bestaudio/17/best[ext=mp4]/best"
135 - 640x480 (DASH video)+141 - audio only (DASH audio)

youtube-dl default: PASS
Rekt script: PASS

(5)

>youtube-dl https://www.youtube.com/watch?v=3SVG4wjDMu0 -F
[youtube] 3SVG4wjDMu0: Downloading webpage
[youtube] 3SVG4wjDMu0: Downloading video info webpage
[youtube] 3SVG4wjDMu0: Extracting video information
[youtube] 3SVG4wjDMu0: Downloading DASH manifest
[youtube] 3SVG4wjDMu0: Downloading DASH manifest
[info] Available formats for 3SVG4wjDMu0:
format code  extension  resolution note
249          webm       audio only DASH audio   49k , opus @ 50k, 283.64KiB
250          webm       audio only DASH audio   63k , opus @ 70k, 360.61KiB
171          webm       audio only DASH audio  111k , vorbis@128k (44100Hz), 628.71KiB
140          m4a        audio only DASH audio  127k , m4a_dash container, aac  @128k (44100Hz), 755.11KiB
251          webm       audio only DASH audio  159k , opus @160k, 887.99KiB
141          m4a        audio only DASH audio  255k , m4a_dash container, aac  @256k (44100Hz), 1.48MiB
278          webm       192x144    DASH video   96k , webm container, vp9, 15fps, video only, 541.29KiB
160          mp4        192x144    DASH video  110k , avc1.4d400c, 15fps, video only, 647.20KiB
242          webm       320x240    DASH video  238k , vp9, 30fps, video only, 1.12MiB
133          mp4        320x240    DASH video  249k , avc1.4d400d, 30fps, video only, 1.42MiB
243          webm       480x360    DASH video  453k , vp9, 30fps, video only, 2.08MiB
134          mp4        480x360    DASH video  482k , avc1.4d401e, 30fps, video only, 2.12MiB
17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2
36           3gp        320x240    small , mp4v.20.3,  mp4a.40.2
5            flv        400x240    small
43           webm       640x360    medium , vp8.0,  vorbis
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2 (best)

>youtube-dl https://www.youtube.com/watch?v=3SVG4wjDMu0 --get-format
134 - 480x360 (DASH video)+141 - audio only (DASH audio)

>youtube-dl https://www.youtube.com/watch?v=3SVG4wjDMu0 --get-format -f "bestvideo[width>=1280]+bestaudio/22/bestvideo[height>360]+bestaudio/18/43/bestvideo[width>450]+bestaudio/6/bestvideo[height>=240]+bestaudio/5/36/bestvideo[height>=144]+bestaudio/17/best[ext=mp4]/best"
18 - 640x360 (medium)

youtube-dl default: FAIL
Rekt script: PASS

(6)

>youtube-dl https://www.youtube.com/watch?v=fBQ5i_F0YA0 -F
[youtube] fBQ5i_F0YA0: Downloading webpage
[youtube] fBQ5i_F0YA0: Downloading video info webpage
[youtube] fBQ5i_F0YA0: Extracting video information
[youtube] fBQ5i_F0YA0: Downloading DASH manifest
[youtube] fBQ5i_F0YA0: Downloading DASH manifest
[info] Available formats for fBQ5i_F0YA0:
format code  extension  resolution note
249          webm       audio only DASH audio   68k , 1fps, opus @ 50k, 998.81KiB
171          webm       audio only DASH audio   71k , vorbis@128k (44100Hz), 1013.82KiB
140          m4a        audio only DASH audio   95k , m4a_dash container, aac  @128k (44100Hz), 1.46MiB
250          webm       audio only DASH audio   97k , 1fps, opus @ 70k, 1.35MiB
251          webm       audio only DASH audio  150k , 1fps, opus @160k, 2.20MiB
141          m4a        audio only DASH audio  191k , m4a_dash container, aac  @256k (44100Hz), 2.93MiB
160          mp4        192x144    DASH video  111k , avc1.4d400c, 15fps, video only, 1.67MiB
278          webm       192x144    DASH video  143k , webm container, vp9, 1fps, video only, 1.34MiB
242          webm       320x240    DASH video  147k , vp9, 1fps, video only, 1.24MiB
133          mp4        320x240    DASH video  248k , avc1.4d400d, 15fps, video only, 3.74MiB
17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2
36           3gp        320x240    small , mp4v.20.3,  mp4a.40.2
5            flv        400x240    small
43           webm       640x360    medium , vp8.0,  vorbis
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2 (best)

>youtube-dl https://www.youtube.com/watch?v=fBQ5i_F0YA0 --get-format
133 - 320x240 (DASH video)+141 - audio only (DASH audio)

>youtube-dl https://www.youtube.com/watch?v=fBQ5i_F0YA0 --get-format -f "bestvideo[width>=1280]+bestaudio/22/bestvideo[height>360]+bestaudio/18/43/bestvideo[width>450]+bestaudio/6/bestvideo[height>=240]+bestaudio/5/36/bestvideo[height>=144]+bestaudio/17/best[ext=mp4]/best"
18 - 640x360 (medium)

youtube-dl default: FAIL
Rekt script: PASS

Please let me know if this is helpful, or if it produces errors.

@ytdl-org ytdl-org deleted a comment from holms Oct 15, 2019
@ytdl-org ytdl-org deleted a comment from Hrxn Oct 15, 2019
@ytdl-org ytdl-org deleted a comment from holms Oct 15, 2019
@ytdl-org ytdl-org locked as off topic and limited conversation to collaborators Oct 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.