Open triplesixman opened 5 years ago
works for me:::
youtube-dl --max-filesize 20m https://www.youtube.com/watch?v=h2zkV-l_TbY [youtube] h2zkV-l_TbY: Downloading webpage [youtube] h2zkV-lTbY: Downloading video info webpage WARNING: Unable to extract video title [download] Destination: -h2zkV-lTbY.f313.webm [download] File is larger than max-filesize (30690430 bytes > 20971520 bytes). Aborting. [download] Destination: -h2zkV-l_TbY.f251.webm [download] File is larger than max-filesize (30429877 bytes > 20971520 bytes). Aborting.
Did you cancel it too prematurely?
Nope. It must have been fixed during a recent update, it works now. :)
Sorry for the example, but it does not work everywhere, at least:
$ /usr/local/bin/youtube-dl --max-filesize 1m https://www.pornhub.com/view_video.php?viewkey=ph5e272646bddb8
[PornHub] ph5e272646bddb8: Downloading pc webpage
[PornHub] ph5e272646bddb8: Downloading m3u8 information
[PornHub] ph5e272646bddb8: Downloading m3u8 information
[PornHub] ph5e272646bddb8: Downloading m3u8 information
[PornHub] ph5e272646bddb8: Downloading m3u8 information
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 266
[download] Destination: Mom's secret night life - Crystal Rush-ph5e272646bddb8.mp4
[download] 1.9% of ~94.33MiB at 804.45KiB/s ETA 03:35^C
ERROR: Interrupted by user
Version:
[debug] youtube-dl version 2020.01.24
[debug] Python version 3.7.6 (CPython) - Linux-5.4.17-200.fc31.x86_64-x86_64-with-fedora-31-Thirty_One
[debug] exe versions: ffmpeg 4.2.2, ffprobe 4.2.2, phantomjs 2.1.1
With youtube-dl version 2020.03.24 it does not work even with the youtube-dl test video:
$ youtube-dl --max-filesize 1M --restrict-filename https://www.youtube.com/watch?v=BaW_jenozKc
[youtube] BaW_jenozKc: Downloading webpage
[download] File is larger than max-filesize (2208750 bytes > 1048576 bytes). Aborting.
[download] Destination: youtube-dl_test_video_a-BaW_jenozKc.f140.m4a
[download] 100% of 154.06KiB in 00:00
But by using a format it is ok:
$ youtube-dl -f "[filesize < 1M]" --restrict-filename https://www.youtube.com/watch?v=BaW_jenozKc
[youtube] BaW_jenozKc: Downloading webpage
[download] Destination: youtube-dl_test_video_a-BaW_jenozKc.mp4
[download] 100% of 354.29KiB in 00:01
Version:
[debug] youtube-dl version 2020.03.24
[debug] Python version 3.7.3 (CPython) - Linux-4.19.0-8-amd64-x86_64-with-debian-10.3
[debug] exe versions: ffmpeg 4.1.4-1, ffprobe 4.1.4-1, phantomjs 2.1.1, rtmpdump 2.4
[debug] Default format spec: bestvideo+bestaudio/best
This problem still exists, because the potential filesize is only checked (only known?) for HTTP downloads and not for fragment (DASH, HLS) downloads.
TODO: check how this works in yt-dlp.
... check how this works in yt-dlp.
The same: https://github.com/yt-dlp/yt-dlp/issues/10663#issuecomment-2393100696
Checklist
Verbose log
Description
Hello,
I notice that the "--max-size" function no longer works on youtube-dl updated.