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.
Determining file size without downloading #4376
Comments
|
In general, we may not know the filesize before actually downloading. You can, however, pass the
Note that support for this feature totally depends on the site, and in some cases, even on the format you're picking (with I'd leave this issue open as a request for a more comprehensive option P.S.: Next time, we'd appreciate if you'd pick a more specific title than hello. This is an issue tracker with lots of issues in it, so we need some sorting. |
|
Unfortunately. My Code : youtubedl . ' --get-filesize -o "'.$randname.'.%(ext)s" ' . $url; ?> |
|
There is no option |
|
Thank you very much for the help. |
|
Hack /usr/lib/python2.7/site-packages/youtube_dl/downloader/http.py |
|
you can use also grep to filter filesize only |
|
@phihag i want to download a mp4 video from here: https://speedvideo.net/embed-2992oz2oqv79.html. Now this url provides 3 mp4 videos (and a php file whose obviously i don't care):each of them has a different quality and so a different filesize. youtube-dl is unable to tell me anything about these videos:
So i can't select the best quality video to download and i have to download all the videos (succesfully):
So,it seems that at the download moment youtube-dl knows the size of the videos. Here is the detail of the best of the 3 videos: youtube-dl does not provide me any informations about size or approximated size:
One possible solution: I could consult videodownloadhelper and download the heaviest file in terms of MegaByte and it works:
but it's a cumbersome solution. Is there another solution? thank you by the way, youtube-dl is amazing and you contributors are awesome to doing this for free. |


How do I know the total size of the video without downloading?
Thank you.