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.
Determine file size in advance #912
Comments
|
See #152 for a generic solution for your problem, but that hasn't been implemented yet. |
|
I don't know if there is already a solution implemented. I use curl (in BASH): contentlength=$(curl -sI $vidurl | awk '/Content-Length/{sub("\r","");print $2}') This accesses the header of vidurl, the final, decoded url of the video to be downloaded. Linuph |
|
did any one find any solution for this..? |
I searched the youtube api and found how to get the size of the video "getVideoBytesTotal ()", but need to run the video to get the size.
My goal is to make an ajax progressbar via php where to display the download progress. I noticed that the youtube-dl does not bring this information.
Is there a way where I can get the size of the video prior to downloading? ssh or via php?