Merge two or more video files of any format using FFmpeg in iPhone
Is there any direct command in FFmpeg to merge videos in iPhone. I need to do this programmatically by setting the comm开发者_运维知识库and line argument to the FFmpeg containing the input movie files to merge and the output file name.
I just wanted to merge two .mov movie files using FFmpeg. I was trying to do this in iPhone where I was creating a command line argument containing two video fies to merge as an input parameter and the destination video file as output parameter and then calling main method of FFmpeg. But for merging videos using FFmpeg first we need to convert it to mpg format and then pass the movie files in mpg format in the command line format. This is the only way found to merge the video using FFmpeg as far as I know. Is there anybody out there done this in a different way?
To paraphrase the FFmpeg FAQ entry "How can I join video files?"
- Transcode to a format that supports direct concatenation (MPEG-1, MPEG-2 PS, DV) and then back to the desired format.
- Use the
concat
protocol to get the same effect without the intermediate files. - Use named pipes to avoid the intermediate files.
- Do any of the above with the lossless
yuv4mpegpipe
or raw formats.
精彩评论