Making and Processing Videos on Linux and Windows

Author: Tomas Svoboda. I will be glad for any feedback.

The page describes some elementary making and processing videos on Linux and MS Windows using free software only. It describes how to make movie from sequence of images how to extract images from videos, change parameters, cut some parts out and others.

Few hints for processing in Matlab programming environment are also provided. The Matlab is a commercial very powerful SW and it runs on many operating systems.

It is assumed that necessary codecs are installed on the system.


Software

Linux

The software listed below is often part of standard Linux distributions.

MS Windows

From images to AVI

Linux

Use the mencoder. See the local copy downloaded from the detailed official documentation. Command line that works fine for me: mencoder mf://\*.jpg -mf w=640:h=480:fps=10:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o output.avi

Instead of lavc -lavcopts vcodec=mpeg4 one may try just x264.

MS Windows

You can use VirtualDub. File -> Open Video File. Change the default name mask to images. VirtualDub undertands bmp and RGB tga files. Then, set the preferred compression and save as avi file.

Matlab

Very simple. You can download my im2avi.m script. It is far from optimal yet it illustrates using of im2frame, movie2avi functions.

From AVI to images

Linux

Use mplayer. Example of use: mplayer -vo jpeg movie.avi. You can also use the Avidemux.  

MS Windows

Use the VirtualDub. File -> Save image sequences ....

Matlab

You can use the function aviread for reading AVI file or even just specified frames from it. You can then do with separate images whatever you want and store them back into avi (see the text below).

Changing AVIs

Linux

Avidemux can do many operations as the famous VirtualDub. The mencoder can also do many things. Example of joining two avi-files:
cat 1.avi 2.avi | mencoder -noidx -ovc copy -oac copy -o output.avi -

MS Windows

The VirtualDub fulfils almost all your needs.

Matlab

You can do almost everything here.


Last changed: $Date: 2008/11/03 11:48:03 $ (GMT)