Documentation for Python binding for MLT multimedia framework
Asked Answered
C

2

7

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.

Cortex answered 14/2, 2014 at 9:55 Comment(0)
S
6

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

Sall answered 7/11, 2014 at 9:6 Comment(0)
P
5

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.

Plattdeutsch answered 12/12, 2014 at 19:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.