Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got an H264 video (Stored in an MP4 file). Each GOP is approx 10s long. I want to trim the first couple of seconds off the video, which means I need to split the first GOP. Is there a way to do this without re-encoding the entire video?

I've got FFmpeg and x264 available. I'm happy to use either the FFmpeg command line, or my own program linked against ffmpeg of x264 libraries.

share|improve this question
Does the video contain B pictures? – slhck Sep 25 '11 at 11:36
appears this question received an answer here, as well:… – rogerdpack Jul 10 '12 at 17:01

FFVhuff is lossless codec

ffmpeg -i input.mkv -c:v ffvhuff FFVhuff.mkv

ffmpeg -ss 26.818 -i FFVhuff.mkv trim.mkv

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .