I'm trying to accomplish a smart rendering workflow using ffmpeg/x264. In short, get ffmpeg to segment the input file. Locate the segment(s) with changes to be made. Re-encode altered segments with same parameters as source. Concatenate altered + original segments.
Problem: the resulting video turns garbage when it first traverses from an original to altered segment or vice-versa. Most likely, because the altered chunks and original chunks differ in some bitstream parameters, or possibly some GOP boundary issues are at play.
So,
1) is there a way to tell ffmpeg/x264 to generate a concat-with-source-compliant output?
2)If it's GOP related, what do I look for in the source and what do I tell the encoder?
Thanks,
Gyan