Alok
Alok

Reputation: 10624

Documentation for Python binding for MLT multimedia framework

I am start learning MLT multimedia framework. It's written in C/C++ so its official documentation has tutorials and examples for C/C++ only with few links for Perl binding.

I am looking for some tutorials for Python bindings of MLT, because I want to use MLT with Python. I tried a lot on google but could not find any single documentation page.

basically I have to join few images and videos to make a single video and I have to add audio too in final video. I have to do all this in bulk for lot of videos so I am writing a script in Python. till than I am running MLT's melt command line utility s subprocess of my script. but that command is not very programmable.

Upvotes: 7

Views: 3834

Answers (2)

Dan Dennedy
Dan Dennedy

Reputation: 481

Basically, you need to learn the C API and extrapolate it to Python. It is easier than it sounds because the C API is object-based and uses reference-counting. The key is to understand that the Python (and other high level language bindings) are generated using SWIG using the mlt++ C++ wrapper. If you compare the C++ header files to the C header files, you can see a fairly direct mapping from one to the other because the C++ API is simply a thin wrapper. Then, compare the mlt Python calls from the examples to the C++ headers to learn how the C++ names convert to Python. Lastly, you can study the code of Flowblade and OpenShot 1.x code to figure out more.

Upvotes: 5

Ian
Ian

Reputation: 125

There are a bunch of example python scripts on the MLT Code Examples Page. They're fairly simple but should provide a starting point.

Upvotes: 6

Related Questions