Faculty of Informatics Vienna University of Technology Institute of Computer Aided Automation PRIP Home PRIP Home
Personal tools
You are here: Home People Julian Stöttinger Videos in MATLAB

Video processing in MATLAB 2009b in Mac OS X and Linux64

MATLAB 2009b video object package for import, output, read write, process, play and whatever movies using ffmpeg. Fancy coverflow 3d visualization using frames as texture of 3d rectangles.

Video playing in Matlab under Mac OS X and Linux 64

Matlab, Videos and Unix

MATLAB is still not supporting a decent video processing tool under Max OS X and Linux. I checked out a couple of projects out there, e.g. videoIO - but I didn't get lucky with it...

Features

  • Most stupid way of implementation

The source provides the slowest and most stupid way for video processing, but it works: It starts ffmpeg (must be installed) and writes pictures of every single frame into the dir /tmp/*cputimehash*. Then it reads the pictures iteratively. Video Information is extracted via 'aviinfo' if it is a avi.

  • both MATLAB video object and uint8 matrix

The objects builds a MATLAB movie object with colormap and a convenient matrix holding all your pixel ready to process. There you can change pixels easily and convert it back (v = v.matrix2movie, v = v.movie2matrix)

  • Fancy coverflow visualization
Yes, I seriously map single frames on 3d objects as a texture. There's nothing wrong about it. You can even zoom, drag and edit every object in there interactively!

Requirements

  • Linux64 or Mac OS X (Windows version is very easy to achieve: put your ffmpeg file into @video/readframes.m
  • ffmpeg installed
  • plenty of memory
  • enough space on your /tmp

How to use

p = params();

% optional parameter adjustment -> help params
p.splitVideo = true;

p.startframe = 12;
p.endframe = 18;
p.picformat = 'jpg';

v = videopack.video('test.avi',p);
v.play
v.coverflow(p,1:6); %fancy coverflow visualization
v.writevideo(p);

Download source

Download the MATLAB source here.