The video must be shot at 120 fps, or at a frame rate above 120 fps, to be played in slow motion when using the AVPlayer player;
The key is slow playback. There is no need to modify or debug the original video content after shooting. You only need to set the playback rate multiple in the player. For example:
self.player.play()
self.player.rate = 0.25.
Please note that the playback rate must be set after
self.player.play()
,
because the player automatically adjusts the rate to the normal 1.0 times speed during playback, and cannot be set directly. You must set the player's .rate after the player executes the play() function, so that the video can be played accurately at slow speed.
Top comments (0)