Cut beginning of h264 video with minimal re-encoding?
Ffmpeg makes it super easy to losslessly cut off the end of an existing h264 stream: you just use -codec copy alongside -t or -to to specify how long you want the clip to be.
Cutting off the beginning of a stream with -ss, however, does not work so well. I always end up with a corrupted second or two of video at the beginning of the resulting clip.
I understand why this is—h264 frames cannot exist independently, as they rely on information from previous frames. As a result, some frames will always have to be re-encoded—but I should be able to avoid re-encoding everything, right?
How can I cut a portion from the beginning of an h264 stream while re-encoding only the minimum number of frames required? I would prefer to do this via ffmpeg, if possible
Read responses in forum.doom9.org