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

max file size with best height option is not working. #14522

Open
usamamashkoor opened this issue Oct 17, 2017 · 2 comments
Open

max file size with best height option is not working. #14522

usamamashkoor opened this issue Oct 17, 2017 · 2 comments

Comments

@usamamashkoor
Copy link

usamamashkoor commented Oct 17, 2017

Hi i am trying to download that YouTube video which file size is less then 250MB and wants to select the best quality of the video under 250MB but the video resolution must be less than or equal to 720p.

Mean if the file size of 720p is greater than 250MB then i want to download the 480p quality video.
if 480p quality video file size is also greater then 250MB then download 360p quality video.

Here is the youtube-dl command which i am using
youtube-dl --max-filesize 250M -f 'best[height<1080]' https://www.youtube.com/watch?v=57PwDGO7PW0
but the above command checks only the 720p and returns a error and it does not check the 480p and 360p quality videos.

This is the error which i am facing

[download] File is larger than max-filesize (587885389 bytes > 262144000 bytes). Aborting.

i have also tried this command to but still facing the above error
youtube-dl --max-filesize 250M -f 22/244/18 https://www.youtube.com/watch?v=57PwDGO7PW0
Kindly please help me on this issue.

@VADemon
Copy link

VADemon commented Oct 26, 2017

You should specify the filesize in the format selection instead. This one seems to works flawlessly -f "(mp4,webm)[filesize<100M]+bestaudio"- selects from available mp4 and webm videos one that is below 100M. It also seems to choose the best quality (720p < 720p60) (test it yourself please). Example of a 60fps video: ID _j6TiSdKT0A

@iuriimattos
Copy link

TRY

youtube-dl -f 'best[filesize<250M][height<1080]' https://www.youtube.com/watch\?v\=57PwDGO7PW0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants