MLT Multimedia Framework

Media Lovin' Toolkit (MLT) is an open source multimedia framework, designed and developed for television broadcasting. It provides a toolkit for broadcasters, video editors, media players, transcoders, web streamers and many more types of applications - mltframework.org

- MLT Documentation - mltframework.org - Melt commandline tool - mltframework.org - MLT XML - mltframework.org - More documentation - superuser.com

# Melt

Melt was developed as a test tool for the MLT framework. It can be thought of as a powerful, if somewhat obscure, multitrack command line oriented video editor.

The following details the usage of the tool and as a result, provides a lot of insight into the workings of the MLT framework - mltframework.org

# Picture-in-picture

You can use Openshot to create PIP effects, and as this is based on the MLT Framework this means you can script it. One way to create / construct / explore scripting in mtl / melt is to use the Melt Command Export for OpenShot.

You can use the watermark filter to create a PIP effect - see the demo directory in MLT if you have not already, specifically 'mlt_bouncy'.

That is an animated pip. For static, replace all of the composite.* properties with a single composite.geometry="x,y:wxh". Also, I suggest adding composite.progressive=1 - sourceforge

melt A.mp4 -filter watermark:B.mp4 composite.geometry=10%,10%,20%,20% composite.progressive=1

You can add text as an overlay track using mtl. Using multiple tracks and composite transition is a bit more complex than using the watermark filter. For syntax see example below - blogspot

melt -blank 0 avformat:basevideo.flv out=3930 -move in=0 out=3930 -track -blank 630 avformat:overlayvideo.flv out=3060 -move in=0 out=2430 -filter chroma key=#00FF00 variance=0.38 -transition composite geometry="0%,0%:100%x100%" halign=center valign=center out=3930 a_track=0 b_track=1 -transition composite geometry="0%,0%:100%x100%" halign=left valign=top out=3060 a_track=0 b_track=2 -track "+Sample Text.txt" in=0 out=1440 -transition composite titles=1 start="299%,70%:999%x20%" in=45 out=1440 a_track=0 b_track=2 -consumer avformat:testvideo.flv frequency=22050 fullscreen=1 fps=30 -profile dvd_ntsc

# Making nice slideshows Transition geometry can be used to create Ken Burns like effects - stackoverflow

melt \ photos/.all.jpg ttl=75 \ -attach crop center=1 \ -attach affine transition.cycle=225 transition.geometry="0=0,0:100%x100%; \ 74=-100, \ -100:120%x120%; \ 75=-60, \ -60:110%x110%;149=0:0:110%x110%;150=0, \ -60:110%x110%;224=-60,0:110%x110%" \ -filter luma cycle=75 duration=25 \ -track demo/music1.ogg \ -transition mix

That rather complex looking transition.geometry string is just something I whipped together to add some variety to the animated pan and zooms. A front end tool could contain a collection of these strings to let the author choose a style - blogspot

Also, notice the addition of automatic center cropping to remove black bars and fill the output frame with the photo image regardless its resolution and aspect ratio.

#Installation

brew install mlt