[FFmpeg-user] Accurate Seeking without Re-encoding
skwaap at gmail.com
Sat Nov 22 19:31:01 CET 2014
I'm trying to accurately (not just nearest keyframe) cut out a subtrack of
an mp4 without having to re-encode the *entire* subtrack.
It seems like overkill to re-encode everything just to get a few additional
seconds of accuracy at the beginning. Is there a good way to avoid this?
I'm perfectly happy to re-encode a bit of the subtrack, I just don't want
to have to re-encode everything.
My current thought was to re-encode from an accurate start point to the
next keyframe, then copy from the keyframe to the end of the subtrack, and
then concatenate the pieces using the concat demuxer. Is this a reasonable
approach, or is there a better way to go about things?
I can get the pieces of the mp4 to start and stop at the right times, but
so far I haven't been able to get the concat demuxer to work on one
re-encoded mp4 and one stream copied mp4. I'm not exactly sure what has to
match between the re-encoded piece and the copied piece.
I'd like the final output to be an mp4.
Thanks in advance!
More information about the ffmpeg-user