1

I have movie split in many parts with duration 10-30 seconds. All movies are MPEG TS files. I want to merge them.

I try to make following:

 ffmpeg -f concat -i join.txt OUTPUT.TS

and

ffmpeg -i "concat:INPUT-1|INPUT-2" -c copy OUTPUT.TS

both methods do the job, but resulting movie has issue if click somewhere forward or backward. Movie freeze, audio goes well and then it starts video. I suppose I should restore or create some additional frames to make movie smooth.

What parameters should be passed to make result movie smooth with the same quality ?

1

What parameters should be passed to make result movie smooth with the same quality ?

You probably need to regenerate the timestamps. Each clip has a separate timestamp stream, so when you concatenate them, the player perceives time as going backwards whenever it jumps from one part of the stream into a different one that was originally part of a different TS file.

Try adding -fflags +genpts in there, just before the output file name.

Incidentally, you want -c copy with the first command form as well. Otherwise, it may reencodes the files along the way.

  • Now, vide do not hangs up and almost smoothly. <br>but if I do not add -c copy, then all fine except video quality. How to reencode with same quality? – Grous Jan 12 '17 at 9:10
  • @Grous: That's a separate question, and it's a duplicate besides. Use ffprobe to find out what your current video encoding parameters are, then use those same parameters or higher ones. – Warren Young Jan 12 '17 at 19:41

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.