Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
max-filesize and match-filter not followed for certain streamed videos #17051
Comments
|
The video above was streamed recently. May be youtube is still generating meta data for video and hence duration is 1 and filesize is null. PS: just a random guess |
|
This is the metadata Youtube provides at the moment. Blame them. |
|
The thing is I am not actually downloading live stream but this video appears in my subscription list. So when I download videos of my subscription - it starts downloading this stream as well, which is huge amount of data I do not want to download. So as I said, May be we should pass --max-filesize and duration to ffmpeg via "-fs" and "-t" options. Or is there an easier way to exclude HLS streams? Say for example --no-hls |
Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2018.07.21. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
Verbose output as follows:
Description of your issue, suggested solution and other information
I am trying to download a youtube video (video ID = pbk3RR0uF0c) with match filter = '!is_live & !live & duration <= 960'.
That is download the video which is not live and is less than 16 minutes long. And also size should be < 101mb
The video however is more than 3 hours. And it was "streamed live" recently, just few minutes back.
As you can see in logs - youtube-dl goes ahead and downloads whole video (it actually downloaded 999MB - way more than 101MB limit that I supplied - then I manually killed process)
On further checking meta for the video pbk3RR0uF0c: (using --write-info-json --skip-download)
"duration": 1 ---- surprising!! (<=960 filter matches!)
"filesize": null --- again a surprise!! (should have failed here)
Thats probably the reason youtube-dl downloads the whole 3hr and 1GB (or more) file.
I believe for filesize: null cases - youtube-dl should stop downloading once limit of 101MB is crossed AND once 16mins of video is downloaded.
Thank you
PS: current workaround ... add !filesize to match-filter.