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

Howto know the fps of a youtube video ? #3002

Closed
hafuz opened this issue May 28, 2014 · 5 comments
Closed

Howto know the fps of a youtube video ? #3002

hafuz opened this issue May 28, 2014 · 5 comments

Comments

@hafuz
Copy link

@hafuz hafuz commented May 28, 2014

Hi, Thanks for the wonderful work !
I need to know the fps of a youtube video to use it in a script based on youtube-dl.
It is not possible ( for now ;) !!) to get this info by youtube-dl
It will be great to add an option to display it !

If someone can help me to have the fps info simply...
Thanx

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 29, 2014

You can use ffprobe: ffprobe -print_format json -show_streams THE_VIDEO.mp4 and look for r_frame_rate or avg_frame_rate (I don't know the difference between them).
youtube-dl doesn't know the fps of the youtube videos, I think we shouldn't add an option for getting it (since that can be done with ffprobe).

@hafuz
Copy link
Author

@hafuz hafuz commented May 30, 2014

Thank you for that answer,
But i want just know the fps before downloading the video.
The bash script is based on a pipe like
' youtube-dl --max-quality mp4 -o - "linktoyoutubevideo" | ffmpeg ..'
because it's faster than download the video and then encode it. I want to know the fps to calculate the duration of the encode. This exclude ffprobe and that's why i think an option in youtube-dl would have been cool. I think, we could find it in the output of "--get-description" option.
Regards.

@hafuz hafuz closed this May 30, 2014
@hafuz hafuz reopened this May 30, 2014
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 30, 2014

The problem is that for getting the fps before downloading the file, we would need that youtube provided it, otherwise (I think) there's no way of getting it.

@hafuz
Copy link
Author

@hafuz hafuz commented Jun 1, 2014

Ok, i understand. I thought youtube provided this info.
Is it possible to download a limited length part (ex: the very begining ) of the video which contain the infos.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 10, 2015

For YouTube videos some formats have fps info now , you can get them from the fps field in the json output (using jq):

$ youtube-dl -j test:youtube | jq .fps
30

Therefore I'm closing the issue.

@jaimeMF jaimeMF closed this May 10, 2015
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
2 participants
You can’t perform that action at this time.