Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merge two or more video files of any format using FFmpeg in iPhone

Tags:

ffmpeg

Is there any direct command in FFmpeg to merge videos in iPhone. I need to do this programmatically by setting the command 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?

like image 887
Subhash Avatar asked Nov 06 '22 10:11

Subhash


1 Answers

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.
like image 92
blahdiblah Avatar answered Nov 22 '22 04:11

blahdiblah