0

I have some mp4 video files with me and i need to concatenate them one by one and make a single MP4 video file.

I came to know about FFMPEG through which we can concat files.

I tried doing

ffmpeg -i concat:'file1.mp4|file2.mp4' -vcodec copy -acodec copy  -y OutCome.mp4

But while executing the command i always get file2.mp4,no such file exists,but the file is there in the folder.

What i am doing wrong? or is there any other tool which can help me achieve this target through command line.

migrated from stackoverflow.com Jun 20 '13 at 13:00

This question came from our site for professional and enthusiast programmers.

  • Try to use spaces around the "|" like this " | ". – user2448027 Jun 20 '13 at 11:09
0

You can only concat files which "like" being concated

ffmpeg -i q.mp4 -c copy -bsf h264_mp4toannexb q.ts
ffmpeg -i r.mp4 -c copy -bsf h264_mp4toannexb r.ts
ffmpeg -i "concat:q.ts|r.ts" -c copy -bsf aac_adtstoasc qr.mp4

Joining H264 without re-encoding

Another option is the concat demuxer

How to concatenate (join, merge) media files

  • Thanks for the reply,i tried creating ts file from my mp4 but it not showing any video – Vipin Nair Jun 20 '13 at 7:46
  • i have tried this too but its not happening – Vipin Nair Jun 20 '13 at 7:51
  • Penny i have two ts files and i tried to concatenate them using ffpmeg.i am getting the combined file but i cant see the video in it. – Vipin Nair Jun 20 '13 at 7:54
0

Try using MP4Joiner. I have used this tool to accomplish exactly what you appear to be attempting.

PS sorry about the reply to the old question, but for others browsing here this tool works very well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy