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

Determine file size in advance #912

Open
androidealp opened this issue Jun 23, 2013 · 3 comments
Open

Determine file size in advance #912

androidealp opened this issue Jun 23, 2013 · 3 comments

Comments

@androidealp
Copy link

@androidealp androidealp commented Jun 23, 2013

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?

@phihag
Copy link
Contributor

@phihag phihag commented Jun 23, 2013

See #152 for a generic solution for your problem, but that hasn't been implemented yet.

@linuph
Copy link

@linuph linuph commented Nov 6, 2013

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}')
(-s+captial i)

This accesses the header of vidurl, the final, decoded url of the video to be downloaded.
I hope this helps.

Linuph

@usamamashkoor
Copy link

@usamamashkoor usamamashkoor commented Oct 14, 2017

did any one find any solution for this..?

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
4 participants
You can’t perform that action at this time.