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

youtube-dl reports wrong video resolution (and doesn't download "best" option) #4241

Closed
edumj opened this issue Nov 19, 2014 · 6 comments
Closed

Comments

@edumj
Copy link

@edumj edumj commented Nov 19, 2014

Hi,

in some standard resolution videos (max 480p) like https://www.youtube.com/watch?v=NY3VYW1DXH4, with the -f option I get the following formats:

...
format code extension resolution note
139 m4a audio only DASH audio 48k , audio@ 48k (22050Hz), 1.08MiB (worst)
140 m4a audio only DASH audio 127k , audio@128k (44100Hz), 2.88MiB
171 webm audio only DASH audio 154k , audio@128k (44100Hz), 3.10MiB
172 webm audio only DASH audio 244k , audio@256k (44100Hz), 4.67MiB
141 m4a audio only DASH audio 255k , audio@256k (44100Hz), 5.77MiB
278 webm 192x144 DASH video 74k , webm container, VP9, video only, 1.43MiB
160 mp4 192x144 DASH video 113k , video only, 2.48MiB
242 webm 320x240 DASH video 197k , video only, 3.56MiB
133 mp4 320x240 DASH video 246k , video only, 5.52MiB
243 webm 480x360 DASH video 332k , video only, 6.04MiB
134 mp4 480x360 DASH video 541k , video only, 7.20MiB
244 webm 640x480 DASH video 666k , video only, 10.99MiB
135 mp4 640x480 DASH video 1047k , video only, 14.65MiB
17 3gp 176x144
36 3gp 320x240
5 flv 400x240
43 webm 640x360
18 mp4 640x360 (best)

It says "640x360" is the best option, but it seems it doesn't exist! Because it should be "480x360" or "640x480" (both 4:3), not "640x360"! (16:9)
May be it's because of 4:3 videos?
And it downloads the lower "480x360" instead of the bigger "640x480".

Edu.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 19, 2014

Note that for other videos (like http://www.youtube.com/watch?v=BaW_jenozKc) it's correct. We could just list the 18 format as 360p (we would also have to change the others),

The 640x480 format only contains the video, the audio is in another format. if you have ffmpeg or avconv installed, you can automatically merge the video and the audio running youtube-dl https://www.youtube.com/watch?v=NY3VYW1DXH4 -f bestvideo+bestaudio

@clampak
Copy link

@clampak clampak commented Nov 20, 2014

Format 36 is also incorrect, it should be 320x180, and is consistently reported wrong from what I've found.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 20, 2014

For the video posted by @edumj it's actually 320x240.

@clampak
Copy link

@clampak clampak commented Nov 20, 2014

That's not very common then. Out of 158 arbitrarily picked videos just now (format 36), I got this distribution of heights using mediainfo:

  • 118 - 1
  • 134 - 2
  • 136 - 4
  • 152 - 1
  • 158 - 1
  • 172 - 1
  • 178 - 1
  • 180 - 140
  • 184 - 1
  • 240 - 6

youtube-dl reports them all as 320x240.

@edumj
Copy link
Author

@edumj edumj commented Nov 21, 2014

But it says that 480x360 is also DASH, and it downloads it without merging.

I don'k know how YouTube-dl gets the size of videos, or how YouTube.com reports them (because I uploaded a PAL video of 720x576 in YouTube.com, and it says max is 480p!) but this is my theory:
YouTube-dl thinks the max width is 640 (True), but it thinks only in 16:9 AR, and assumes that the height should be 360p (640/1.778=360), and downloads the video with 360 pixels of height (Wrong, because "best" should be 640x480)

I'll try bestvideo+bestaudio, but is there a list of all format numbers with their meaning?
I'd like to do somenthing like:
138+141/264+141/137+141/135+141...
to try to get always the max quality video, but i need lower formats too.
Or a way to guess if some format number (like "137") is available, because if "141" doesn't exist, all the above combinations won't work! and will get only the "best" available (muxed) video.

@phihag
Copy link
Contributor

@phihag phihag commented Jan 22, 2015

In the current version of youtube-dl (2015.01.22), the sizes reported by YouTube should take precedence over the ones we determined statically. If you have a video that's still being misidentified, please post so. If you always want the max quality video, -f bestvideo+bestaudio/best is the way to go.

@phihag phihag closed this Jan 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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