I have one large MP4 file. I am attempting to split it into smaller files.

ffmpeg -i largefile.mp4 -sameq -ss 00:00:00 -t 00:50:00 smallfile.mp4

I thought using -sameq would keep the same quality settings. However, I must not understand what that does.

I'm looking to keep the same quality (audio/video) and compression with the split files. However, this setting makes the split files much larger.

What flag(s) do I need to set to keep the same quality and attributes in the split files while maintaining the same quality to size ratio?

For instance if my original file is about 12 GB and is 1920x1080 with a bitrate of 10617kbps and a framerate of 23 frames/sec and 6 channel audio with 317kbps, I would like the split files to be the same only a third of this size (if i split it into three pieces).


If you want to just split the video without re-ecoding it, use the copy codec for audio and video. Try this:

ffmpeg -ss 00:00:00 -t 00:50:00 -i largefile.mp4 -acodec copy \
-vcodec copy smallfile.mp4

Note that this only creates the first split. The next one can be done with a command starting with ffmpeg -ss 00:50:00.

This can be done with a single command:

ffmpeg -i largefile.mp4 -t 00:50:00 -c copy smallfile1.mp4 -ss 00:50:00 -c copy smallfile2.mp4

This will create smallfile1.mp4, ending at 50 minutes into the video of largefile.mp4, and smallfile2.mp4, starting at 50 minutes in and ending at the end of largefile.mp4.

  • 1
    Using this method on an mp4 file, I get the first two seconds of every created file as a frozen frame (the audio plays normally). Any known reason for this? – Ron Harlev Nov 17 '15 at 18:31
  • Sounds like a bug. Update to latest ffmpeg. – Robert Mar 22 '16 at 11:41
  • @Robert I've updated many times since 2010. Thanks. – fideli Mar 22 '16 at 14:36
  • @RonHarlev This is the currently expected behavior. Without re-encoding, you can only cut videos at "key frames". Frames in between key frames don't carry enough information on their own to build a complete image. See: trac.ffmpeg.org/wiki/Seeking#Seekingwhiledoingacodeccopy – Philip Thrasher May 23 '17 at 19:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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