Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

Add frames per second to Format struct #47

Closed
EtiennePerot opened this issue Jul 2, 2018 · 5 comments
Closed

Add frames per second to Format struct #47

EtiennePerot opened this issue Jul 2, 2018 · 5 comments

Comments

@EtiennePerot
Copy link

As per title. Currently there is no way to differentiate between Formats by frames-per-second.
YouTube supports 60fps video now, so it would be nice if the Format struct reflected that.

Bonus points for making the best format selector opt for higher-framerate, rather than only higher-resolution.

@BruceWangNo1
Copy link
Contributor

BruceWangNo1 commented Jul 6, 2018

I think the frame rate of a certain video is unavailable from the HTTP response until the video is actually downloaded locally to be examined. What do you think? @EtiennePerot

@EtiennePerot
Copy link
Author

If that were true, how could the YouTube video player display "1080p60" or "720p60" (rather than "1080p"/"720p") in its video quality list, without itself having downloaded both of those video streams?

Example 60fps video if that helps: https://www.youtube.com/watch?v=MBRqu0YOH14

@BruceWangNo1
Copy link
Contributor

BruceWangNo1 commented Jul 9, 2018

As I found out, Format does include fps information in its "meta" field. However the maintainer decided not to include that in Format's main fields. I have added a method to struct Format, so you can access fps by Format.AccessMeta("fps"). The maintainer haven't merged my pull request yet, so check out my forked repository for more information. As for the mentioned bonus points you mentioned, I will probably start to work on it tomorrow. @EtiennePerot

@BruceWangNo1
Copy link
Contributor

Bonus problem solved. Now you can use "best-fps" filter to get the best quality video with fps as the first priority. The maintainer has not merged my pull request yet. So check out my forked git repository. @EtiennePerot

@EtiennePerot
Copy link
Author

EtiennePerot commented Jul 10, 2018 via email

@rylio rylio closed this as completed in df94d5f Jul 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants