The assumptions made above were that you wanted your output video to be:
439 pixels wide
455 pixels high
trimming 73 pixels from the left
trimming 15 pixels from the top
of your input video, and that you wanted Motion JPEG output e.g. “-vcodec mjpeg“.
The “-qscale 1” makes low compression (best possible MJPEG quality). qscale can go from 1 to 31 in the current version of ffmpeg.
Obviously, change these pixel parameters to suit your particular video.
MATLAB on Linux claims to only playback uncompressed AVI files on “UNIX” systems.
However, MATLAB on Linux can’t even play all uncompressed AVI filed depending on your particular system configuration with gstreamer. The solution thus far, with MATLAB 2012a, seems to be using Motion JPEG in AVI videos.
Here’s a tentative solution for playing back video on Linux systems with MATLAB 2012a, that is, MATLAB “should” be able to playback “out.avi”
If you get an error about not having ffmpeg installed, on Ubuntu type in Terminal:
sudo apt-get install ffmpeg
Here is a video I transcoded the first second of using the above settings
(here is the actual command I used to truncate the video to one second and to heavily compress to reduce download size) ffmpeg -i input.avi -vcodec mjpeg -t 1 -qscale 11 out.avi
(The sample AVI file is used under GNU LGPL from http://people.sc.fsu.edu/~jburkardt/data/avi/avi.html )