
Same format as above.Įxamples: ffmpeg -ss 01:19:00 -i in1.avi -t 00:05:00 -c copy out1.aviįfmpeg -ss 01:19:00 -i in1.avi -t 00:05:00 out1.aviįfmpeg cuts out a part of the video file starting from 1 hour 19 minutes 0 seconds. – the duration of the part of a video ffmpeg is to cut out. Format: 00:00:00.0000, meaning hours:minutes:seconds:milliseconds. – the beginning of the part of a video ffmpeg is to cut out. Way 1: ffmpeg -ss -i in1.avi -t -c copy out1.avi So for those cases there is the second way of splitting video files: it is considerably slower, the output files are bigger, but it seems they are always of the same quality level as input files used. The first one is good in itself, more than that - it is faster, but sometimes creates output files with certain flaws. There are two ways how to split video files by ffmpeg.

You can use these two methods which work for Windows and Linux. For high quality video and audio, read the x264 Encoding Guide and the AAC Encoding Guide, respectively.įor example: ffmpeg -ss -i in.mp4 -t -c:v libx264 -c:a aac -strict experimental -b:a 128k out.mp4 If you leave out the -c copy option, ffmpeg will automatically re-encode the output video and audio according to the format you chose. This won't harm the quality and make the command run within seconds.įor more info, see How to cut a video, with re-encoding

-t specifies the duration of the clip (same format).Use this to cut video from to : ffmpeg -ss -i in.mp4 -to -c copy -copyts out.mp4 Use this to cut video from for : ffmpeg -ss -i in.mp4 -t -c copy out.mp4 Packaged versions from various distributions are often outdated and do not behave as expected. Make sure you download a recent version of ffmpeg, and don't use the one that comes with your distribution (e.g.
