Create video in iPhone

前端 未结 2 896
挽巷
挽巷 2021-01-16 01:00

I need to convert image sequences(ie,png) to video file in iPhone. How i can convert the images to video.

Regards,

相关标签:
2条回答
  • 2021-01-16 01:39

    You are likely going to need something like FFMPEG

    0 讨论(0)
  • 2021-01-16 01:48

    Just ignore bad advice like "use ffmpeg". That would work on the desktop, but the license issue makes including ffmpeg source code in your iPhone app legally questionable. Apple provides a class named AVAssetWriter that you would use in your app to encode a series of images as h.264 stored in a .m4v quicktime container file. While the apple provided logic does work, it is not so easy to actually use and you will need to read quite a lot of documentation to get the code working. If you want to skip implementing it yourself (and likely save yourself 3 or 4 days of work), please consider using my AVAnimator library for iOS as the h.264 encoding logic is already implemented in the class AVAssetWriterConvertFromMaxvid. Once encoded as h.264, the video can be played with the standard player and it is small enough to upload to a remote server.

    0 讨论(0)
提交回复
热议问题