How to split a movie file into multiple parts

In an earlier post I talked about settings for ffmpeg for flash video, and today I came across another helpful setting for ffmpeg.

Sometimes your video will run for 30 minutes, however you only want to upload it in 10 minute segments.

The following command will split a movie file

ffmpeg -i myfiletosplit.flv -ss 00:00:00 -t 00:10:00 mydestinationsplit_1.flv 

-i defines the input, it would usually look like -i location/of/my/movietosplit.flv

-ss is the beginning of the file in hh:mm:ss from the beginning of the video file

-t is the length of time you want to capture the clip in hh:mm:ss.  The first time I used this I made the mistake of thinking this was the time I wanted to record until, remember it is the duration of the clip you want to capture.

So if you had a 24 minute clip and wanted to capture it in 3 x 8 minute clips you would use the following

ffmpeg -i myfiletosplit.flv -ss 00:00:00 -t 00:08:00 mydestinationsplit_1_3.flv -ss 00:08:00 -t 00:08:00 mydestinationsplit_2_3.flv -ss 00:16:00 -t 00:08:00 mydestinationsplit__3_3.flv

 

Author: Justin Avery

Tags:


Security key

Comments

  1. #1 JanM says...

    Hello and many thanks for the insight. I wonder if there is some kind of a graphical interface I could use to divide a single FLV file into multiple (various length) FLV videos? I have hundreds of hours to process... so I need some user-friendly solution... Thanks for all ;)

    • Posted on 26 Jul 2009 11:13am
  2. #2 Justin Avery says...

    I'm sure there is a graphical interface out there, but I think that with hundreds of hours of content to go through you probably want to batch process the lot of it, and then go back and redo the areas that didn't quite work. Thanks for your comment!

    • Posted on 12 Nov 2009 1:11pm