Splitting an MP4 file

With ffmpeg you can split file using the following command:

ffmpeg -i ORIGINALFILE.mp4 -acodec copy -vcodec copy -ss START -t LENGTH OUTFILE.mp4

where START is starting positing in seconds or in format hh:mm:ss LENGTH is the chunk length in seconds or in format hh:mm:ss

So you will need to run this command few times depending on how long your video. If let's say your video is 31 minutes long and you want so split into 15 min chunks here is how you run it:

ffmpeg -i ORIGINALFILE.mp4 -acodec copy -vcodec copy -ss 0 -t 00:15:00 OUTFILE-1.mp4
ffmpeg -i ORIGINALFILE.mp4 -acodec copy -vcodec copy -ss 00:15:00 -t 00:15:00 OUTFILE-2.mp4
ffmpeg -i ORIGINALFILE.mp4 -acodec copy -vcodec copy -ss 00:30:00 -t 00:15:00 OUTFILE-3.mp4

There is a python script that you can use that does this automatically(i.e. takes video file, chunk size in seconds and generates individual playable video files): https://github.com/c0decracker/video-splitter


If you prefer using a gui there is avidemux available in the repositories. Defining the cut points is much easier this way !

The selection markers define the part of the video that will be exported, using "copy" in audio and video avoids reencoding. You can also choose the container or change it (avi, mp4, mkv, etc).

I've done a bunch of cuts on some videos from a camera and it was instantaneous !


Use mkvmerge from the mkvtoolnix package. Use something like

mkvmerge -o outputprefix --split 1G origfile.mp4

This would split your file in 1 GB blocks. You can use time-indications as well.