简体   繁体   中英

Adjust AVPlayer Frame Rate During Playback

Is there a way to change the rate at which frames are rendered during playback? I have a couple short 5 second videos that I would like to play at 15, 30, or 60 FPS. This would be an option to the user.

I did find a frameDuration property in the AVVideoComposition class. But all this did was adjust how many frames rendered per second.

Similar question here

There is a rate property in the AVPlayer. It worked very well from me. Tho the rate values ranges from 0 to 2, 1 being played at normal speed, so to give the option to the suer to play at pre defined framerate would required some math to find the right rate value.

Bye,

Jean

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM