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

Documentation should explain preference for flv over mp4 at 360p #539

Closed
maxb opened this issue Nov 22, 2012 · 4 comments
Closed

Documentation should explain preference for flv over mp4 at 360p #539

maxb opened this issue Nov 22, 2012 · 4 comments

Comments

@maxb
Copy link

@maxb maxb commented Nov 22, 2012

youtube-dl prefers flv over mp4 at 360p. After reading the wikipedia article on youtube formats, I can guess this may be because the H.264 profile used in youtube's 360p flvs is more advanced than the one used in its 360p mp4s. Is this a correct guess?

Either way, please could a note be added to the documentation explaining this choice?

Is the difference in quality significant? flvs tend to be less compatible with players than mp4s - and on my Android phone, seeking within a flv doesn't work, whilst seeking within an mp4 does.

@phihag
Copy link
Contributor

@phihag phihag commented Nov 26, 2012

By default, youtube-dl goes for the highest quality it can get (if two formats have the same quality, we'll take what more users what). That's all there is to the rationale of the format preferences.

The formats 18 and 34 are a little bit unusual as they don't differ in (video bitrate), but do when it comes to container format and video codec profile (and audio bitrate). Therefore, 34 (flv) videos should be in significantly higher quality.

I'm not sure how we could document this (except this comment, which may serve as documentation). Feel free to send in a pull request or suggest a documentation text (and where it should be documented).

I understand your case for the technically inferior 18 format, but on a desktop machine, you (and I) would prefer the better quality of format 34, wouldn't you? In any case, these low-quality videos are becoming increasingly rare. You can also simply edit ~/.config/youtube-dl.conf to say

-f '38/37/46/22/45/35/44/18/34/43/6/5/17/13'
@phihag phihag closed this Nov 26, 2012
@maxb
Copy link
Author

@maxb maxb commented Dec 4, 2012

OK, thanks for the hint about about the config file.

At least in the limited few videos I downloaded both versions of, I wasn't able to distinguish any difference between 18 and 34.

There is also another reason to prefer 18 over 34 - it seems to download many times faster. Is the flv download being throttled by the server to approximate real-time of the video, whereas the mp4 one is not?

@phihag
Copy link
Contributor

@phihag phihag commented Dec 4, 2012

Oops, edited the comment to reduce confusion.

You're right, 18 is faster. However, that may be the case because 34 tends to be about 1.5 times as large, and youtube doesn't throttle the first Megabytes (which are very fast for both formats).

Historically, youtube-dl always defaulted to the best format. I retested the quality with

youtube-dl  UJ1MOWg15Ec -f 18 -o fx18
youtube-dl  UJ1MOWg15Ec -f 34 -o fx34

It turns out that the two formats do differ in resolution. The difference is striking, see http://imgur.com/a/jji9T . Sure, the first video is faster to download, but wouldn't you prefer the second one?

@maxb
Copy link
Author

@maxb maxb commented Dec 4, 2012

Interesting. So 18 is sometimes the same resolution as 34, and sometimes smaller, depending on the individual video. OK, with that additional detail, I agree that youtube-dl's defaults are sensible, and it really just comes down to personal preferences with individual videos.

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
2 participants
You can’t perform that action at this time.