Programmatically make video from UIImages for play

2019-08-02 01:40发布

问题:

How can I programmatically create a video file from a bunch of UIImages?

I want to do this so I can play back a slideshow with MPMoviePlayer and stream via AirPlay.

Ideally I'd like to be able to set a duration for each image and do simple fade transitions between them.

回答1:

Check out the AVAssetWriter documentation for encoding your own movies on an iOS device.

Another hint might be this question on SO: How do I use AVAssetWriter?