Matlab Toolbox to process video files, which consists on a set of classes for reading, writing, correcting light changes and generating gaussian pyramids in real time.
This toolbox is designed for Windows x64, Max OS X x64 and Linux x64.
Through to use of Ffmpeg, it can reproduce and create videos very fast and also do no require to load the entire video file in memory.
In addition the C++ code is already compiled in order to simplify the toolbox installation.
In order to read a video, it's that easy:
vp = VideoPlayer('videoName.mp4');
for i = 1:100
plot(vp);
drawnow;
% your code here
% To get the current frame use -> vp.Frame
vp.nextFrame;
end
clear vp;
And to write a video:
vr = VideoRecorder('result_video', 'Format', 'mov', 'Size', [640 480]);
for i = 1:100
% your code
vr.addFrame(frame);
end
clear vr;
Note that you must include the VideoUtils folder into the matlab path.
You can find more examples below:
The wiki uses Markdown syntax.