Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
1  
appears this question received an answer here, as well: stackoverflow.com/questions/7545002/… –  rogerdpack Jul 10 '12 at 17:01

1 Answer 1

FFVhuff is lossless codec

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

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

http://svnpenn.blogspot.com/2011/10/ffmpeg-cut-to-frame-same-audio.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.