I have multiple mpeg2 video files. What I need to do is get a clip of video that is contained in several of these mpeg2 videos. What I’m doing at the moment is:
-
Join them using the command:
copy /b file1.mpg + ... + fileN.mpg output.mpg -
The ouput.mpg duration is wrong so I’m using FFMpeg to fix that:
ffmpeg -y -i output.mpeg -target pal-dvd outputFixed.mpg
The problem is when I try to extract only one portion of this output.mpg, at the same time I “fix” it, with the -ss and -t FFMpeg commands becouse the video duration is wrong as i said.
So the question is:
- Is there any way to combine Mpeg2 files without getting the duration wrong?
- Is there any way to fix the duration of a Mpeg2 file and extract one portion at the same time?
Any suggestion would be appreciated.
From the ffmpeg FAQ: