I implemented some examples in the Nim programming language. Nim compiles
into C (among other languages).

I like that it gives you the feeling of python despite it is using actual
types.

The code looks as follows:
```
import mlt, os
var f = initFactory()

# Create the default consumer
var p = newProfile()
var sdl = newFactoryConsumer(p, "sdl2")

# Create via the default producer
var clip = newFactoryProducer(p, resource =
"avformat:/home/jose/Descargas/sygic.mp4")

var filter = newFactoryFilter(p, "frei0r.pixeliz0r")
filter["BlockSizeX"] = 0.1
filter["BlockSizeY"] = 0.2

clip > filter
filter > sdl

# Start the consumer
sdl.start

while not sdl.stopped:
sleep(1)
```
As I said, it compiles to C. If compiled in release mode, the executable
only takes 115kb.

This is just a starting point. You can see some more examples here:
https://github.com/mantielero/mlt.nim/tree/master/examples

Regards,
José María
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to