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 filesize limit doesn't work for some urls #16453

Closed
fireflyHunter opened this issue May 14, 2018 · 5 comments
Closed

max filesize limit doesn't work for some urls #16453

fireflyHunter opened this issue May 14, 2018 · 5 comments

Comments

@fireflyHunter
Copy link

@fireflyHunter fireflyHunter commented May 14, 2018

During this case:
youtube-dl --max-filesize 500m -o 914973423549468672 http://youtu.be/mMzDtZ-gYIc?a

It will keep downloading when exceed the max filesize and download all file parts. (every file parts exceed the size limit)

However most of urls works just fine.

$youtube-dl --version
2018.04.16

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 14, 2018

>youtube-dl.exe http://youtu.be/mMzDtZ-gYIc?a --max-filesize 500m
[youtube] mMzDtZ-gYIc: Downloading webpage
[youtube] mMzDtZ-gYIc: Downloading video info webpage
[youtube] mMzDtZ-gYIc: Extracting video information
[youtube] mMzDtZ-gYIc: Downloading MPD manifest
[youtube] mMzDtZ-gYIc: Downloading MPD manifest
[download] File is larger than max-filesize (2612791290 bytes > 524288000 bytes). Aborting.
@fireflyHunter
Copy link
Author

@fireflyHunter fireflyHunter commented May 14, 2018

I am not sure how you make it work, for me its still not working in both windows or ubuntu:

Windows:
C:\Users\hao>youtube-dl http://youtu.be/mMzDtZ-gYIc?a --max-filesize 500m
[youtube] mMzDtZ-gYIc: Downloading webpage
[youtube] mMzDtZ-gYIc: Downloading video info webpage
[youtube] mMzDtZ-gYIc: Extracting video information
[youtube] mMzDtZ-gYIc: Downloading MPD manifest
[youtube] mMzDtZ-gYIc: Downloading MPD manifest
[dashsegments] Total fragments: 1483
[download] Destination: Tour de France 2013 - Stage 2 (part 1)-mMzDtZ-gYIc.f137.mp4
[download] 1.8% of ~3.65GiB at 2.91MiB/s ETA 19:11

Linux:
$ youtube-dl http://youtu.be/mMzDtZ-gYIc?a --max-filesize 500m
[youtube] mMzDtZ-gYIc: Downloading webpage
[youtube] mMzDtZ-gYIc: Downloading video info webpage
[youtube] mMzDtZ-gYIc: Extracting video information
[youtube] mMzDtZ-gYIc: Downloading MPD manifest
[youtube] mMzDtZ-gYIc: Downloading MPD manifest
[dashsegments] Total fragments: 1483
[download] Destination: Tour de France 2013 - Stage 2 (part 1)-mMzDtZ-gYIc.f137.mp4
[download] 7.4% of ~3.68GiB at 3.83MiB/s ETA 20:11

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 14, 2018

--max-filesize only works for plain HTTP downloads.

@fireflyHunter
Copy link
Author

@fireflyHunter fireflyHunter commented May 14, 2018

The url does starts with http, I try to change it to https but still couldn't get the max-filesize working.
It would be great if you could elaborate on why this url is not a plain HTTP download or how can I fix this for more urls like this one.

dstftw added a commit that referenced this issue May 14, 2018
@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 14, 2018

Cause it's segmented DASH. You can't "fix" it. It will only work for plain single file downloads that report correct size of the whole file in Content-Length HTTP header.
What you may do is to filter based on filesize meta field using --match-filter. Though this metadata may not be available either.

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.