6.2. Splitting AVIs
This does not work with AVIs that use VBR/ABR MP3s. This step uses
avisplit which is part of the transcode package. Use
it only with AVIs generated by transcode.
avisplit is easy to use: just provide an input file
(-i name.avi) and when it should split. You can split after
a fixed size (-s size_in_megs), after a number of frames
(-f f1-f2) or after a number of seconds (-t s1-s2).
An example:
avisplit -i ally-big-file.avi -o ally -s 700
This will produce files named ally-0000.avi, ally-0001.avi etc.
that are each 100megs big at most.
6.3. Extracting audio from VOBs/MPEGs/AVIs
MPlayer can be used easily to extract sound. The -vo null
options tells MPlayer not to show the video.
- VOB -> AC3:
mplayer -vo null -nogui -alang de -dumpaudio
-dumpfile lang-de.ac3 *vob
This will extract the German audio to
a file called lang-de.ac3.
- VOB -> WAV:
mplayer -vo null -nogui -aid 128 -ao pcm
-aofile lang-de.wav *vob
This will extract audio track no. 128,
downmix the AC3 sound to PCM and write the results to
lang-de.wav.
- MPG -> MP2:
mplayer -vo null -nogui -dumpaudio
-dumpfile audio.mp2 myvideo.mpg
This will extract the audio to
a file called audio.mp2.
- AVI -> WAV:
mplayer -vo null -nogui -ao pcm -aofile audio.wav
myvideo.avi
This will extract the audio, convert it to PCM
and write the resulting .WAV to audio.wav.
I'm not listing all possible options. Generally use -dumpaudio -dumpfile
newaudio.extension if you want to extract the audio without processing
and -ao pcm -aofile newaudio.wav if you want the WAV itself.
6.4. Using separate audio files
Sometimes you want to play another audio file along with your video.
MPlayer makes this rather easy: mplayer -audiofile
anotherlang.mp3 myvideo.avi plays video from myvideo.avi
and audio from anotherlang.mp3. A lot of Windows media players
support external audio files, too. This way you can provide several language
versions as separate audio files. A combination often used is to have the AVI
include the English audio track and to provide additional audio tracks in
separate files.
6.5. A visual AVI editor: avidemux
If you've done video editing with Windows before you probably know the
excellent OpenSource editor VirtualDub. An OpenSource utility for Linux that aims
at providing the user with a similar set of features is
avidemux.
You can use it in order to easily cut specific parts from a movie, to
apply filters, to reencode movies and to do a lot more. I suggest you take
a look at it even if using the command line is as natural to you as it is for
me.