Adjust AVPlayer Frame Rate During Playback

青春壹個敷衍的年華 提交于 2019-12-30 07:20:10

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/4857409/adjust-avplayer-frame-rate-during-playback

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!