As a continuation of Creating VCDs from AVI files, we look at splitting a large AVI file into two or more smaller files. Why would you want to do that? Well, let's say that you have an AVI file that's, oh, around 700MB in size. Converting this to MPEG would result in a file that's twice the size. Hence, the need to split it into smaller files.
You can do this using
To split a file into two pieces, execute the following commands:
The pair of commands above will cut the movie at the one-hour mark.
What if you want to cut it into three or more pieces? The commands above would correspond to the first and last portion of the video. For the middle portions, you would do something like:
This will grab the segment between the first and second hour marks of the video.
Got this from MisterHowTo.com: Trim or split videos with Mencoder.
You can do this using
mencoder
.mencoder
is a companion package to mplayer
. It's part of the same project but must still be installed separately....you know what to do.To split a file into two pieces, execute the following commands:
mencoder -endpos 01:00:00 -ovc copy -oac copy movie.avi -o first_half.avi
mencoder -ss 01:00:00 -oac copy -ovc copy movie.avi -o second_half.avi
The pair of commands above will cut the movie at the one-hour mark.
What if you want to cut it into three or more pieces? The commands above would correspond to the first and last portion of the video. For the middle portions, you would do something like:
mencoder -ss 01:00:00 0 -endpos 02:00:00 -oac copy -ovc copy movie.avi -o second_half.avi
This will grab the segment between the first and second hour marks of the video.
-ss
indicates where you want to start the encoding.-endpos
indicates where you want to end.-oac
and -ovc
specify the encoding scheme. The copy
option tells mencoder
to just copy the file as is with no special encoding.-o
specifies the output file.Got this from MisterHowTo.com: Trim or split videos with Mencoder.