Ok, so my task is this:
- Cut a video up into N parts.
- ffmpeg -i in.mpg -ss 10 -t 10 -codec copy part1.mpg
- ffmpeg -i in.mpg -ss 30 -t 10 -codec copy part2.mpg
- Cat these parts together
- cat part1.mpg part2.mpg ... > temp.mpg
- This file runs fine, but the duration etc is messed up due to bad PTS values.
- Run it through FFmpeg
- ffmpeg -i temp.mpg -codec copy out.mpg
- This file also runs fine, but for the exact duration of the cuts, there is now black space. The PTS is fixed, but it is accounting also for the removed frames.
How can I correct the PTS values?
Edit: I am forced to use an older version of FFmpeg (hence no use of filters such as trim, or the concat demuxer).