开发者

FFmpeg on iPhone

I have downloaded ffmpeg libraries for iPh开发者_Go百科one and compiled them. My objective is to create a movie file from a series of images using ffmpeg libraries.The amount of documentation for ffmpeg on iphone is very less. I checked an app called iFrameExtractor, which does the opposite of what i want, it extracts frames from a video.

On the command line there is a command called

ffmpeg -f image2 -i image%d.jpg video.mov 

This turns a series of images into a video. I actually checked it on my mac and it works fine. What i wanted to know was how do we get the equivalent in iPhone. Or rather which class/api or method to call. There are a couple of examples of apps doing this on iPhone. Not sure whether they do it through ffmpeg though. Anyways, for reference "Time lapser" and "reel moments"

Thanks in advance


Do you need sound ? If you do not need sound, you can try to use openCv. I think it is easier to use. You just call a method to append a picture to the movie: http://opencv.willowgarage.com/documentation/c/reading_and_writing_images_and_video.html


Someone please correct me if I'm wrong, but I don't believe iPhone apps can call external executables (which makes sense, that would be multitasking). You'll have to use libav* to accomplish what you're after. Compile ffmpeg for the iPhone:

http://github.com/gabriel/ffmpeg-iphone-build

then read the API docs at ffmpeg.org. For each library there should be an example file in the ffmpeg source that displays usage of that libraries core functions. i.e. in libavcodec, there is a file called api-example.c and in libavformat, there's one called output-example.c.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜