MLT:

I started working with MLT while doing research for a hobby project. The approach I wished to take required highly abstracted video compositing components. Of the choices availible, MLT seemed the best fit. The framework is written in Posix C99, extensively uses object-oriented design, has bindings for other languages, and has clean, well documented code.

Temporal interpolation:

Frequently, video programmers want to change or resample the framerate of some source footage. The most common use of this is format conversion. For example, converting PAL format (25fps) to NTSC (29.97fps) format. The easiest way to achieve this is by using duplicate or drop which looks terrible. Another simple method is to create a new frame using a weighted blend of the two adjacent frames but this also looks bad. A better way uses motion estimation.

Motion estimation

While studying motion estimation algorithms, I found no preexisting motion estimation code that was easy to reuse. Indeed, every instance of motion estimation code that I found was too difficult to abstract from the bowels of the MPEG encoder in which it was found. This seemed to be a terrible waste considering how amazingly useful motion vector meta data is for things besides video compression. Thus, I set out to create a well-documented, understandable motion estimation module for the MLT framework.

After a few weeks of researching motion estimation techniques, Enhanced Predictive Zonal Search seemed to be the best bet. So I wrote an MLT module:

April 12, 2005: I posted a new, significantly improved version. The code was refactored so as to make SIMD integration easier. No SIMD ops yet, but this version is faster anyways. The next version will have SIMD optimization. I'm already seeing a 200% to 400% speed up !

motion_est tar.gz (or) browse the source

This code runs better than realtime on a 2.8 ghz pentium 4 and has yet to be vectorized or multithreaded. Also note that this code is prerelease and can only be used for demonstratrion purposes. I plan to open source-license it sooner or later.

July, 2005: The motion estimation module has now been commited to the MLT CVS repository on Source Forge. Get it here.

This shot shows the movement of people nodding their heads in a conversation
Here we have a man driving in a car and talking. His head is nodding, the scene behind the car is moving, and his hand is making gestures.
The man in the center is leaning back while he pulls out a record. The man in the left is walking forward to put a record back on the shelf.


In the future I hope to introduce multithreading, vectorized code, and sub-pixel motion vector accuracy.

I may be contacted by mailing to "drew0054" at my university's top level domain


The views and opinions expressed in this page are strictly those of the page author.
The contents of this page have not been reviewed or approved by the University of Minnesota.