3 Before running the demo script, make sure you '. setenv' from the parent
4 directory. Also, please create clips clip1.dv, clip2.dv, clip3.dv, clip1.mpeg,
5 clip2.mpeg, clip3.mpeg, and music1.ogg. Please make sure clips are at least 500
8 These notes explain the the concepts presented in each demonstration and
9 what details to look for.
11 First, a note on consumers. When you start the script, the main menu asks
12 you to choose a consumer. A consumer is like a viewer, but it could also
13 write to a stream/file. The "SDL" consumer is the popular Simple DirectMedia
14 Layer audio and video output. The "xml" consumer generates an XML
15 representation of the service network. That can be played directly due to the
16 XML producer plugin. See docs/mlt-xml.txt for more information. "/dev/dv1394/0"
17 refers to a device file for transmitting DV over FireWire using the Linux
20 These examples assume the numeric locale LC_NUMERIC decimal separator is a
21 period. Therefore, the demo script sets LC_NUMERIC=C for you, but if you are
22 running these manually or learning from them, remember to use the appropriate
23 separator for your locale.
30 Simply builds a playlist containing each video clip, and you can transport
31 between them using j and k keys.
35 A video filter can be applied to a portion of a producer (clip, playlist,
36 or multitrack). This examples shows the greyscale filter.
40 A graphic can overlay video in realtime with support for alpha channel.
41 This example uses a PNG file with an alpha channel. Distortion is explicitly
42 enabled here so the otherwise circular graphic is scaled to fill the
43 compositing region. By default, compositing honours the aspect ratio of the
48 Titles are very easy to composite in realtime. The titler uses Pango
49 with the FreeType2 rendering backend. This means it supports high
50 quality scalable font rendering with anti-aliasing, unicode (UTF-8),
51 and Pango markup capabilities. The compsiting here respects the aspect
52 ratio of the rendered title in the first two title pieces but distorts
53 the final one. This demo also shows the motion and scaling capabilities
54 of the compositor in conjunction with honouring aspect. The compositor
55 is doing field-based rendering. So, when displayed non-progressively
56 with SDL, you can see motion artifacts during animation.
58 A composite transition
60 The compositor also handles video over video as demonstrated in this
61 usage of the compositor to create a special transition. This demonstration
62 also crossfades the audio during the transition! Progressive rendering
63 is explicitly enabled on the compositor due to the poor results that
64 would otherwise occur due to scaling an interleaved video frame and moving
65 the video in a reverse direction horizontally.
69 A simple series of transitions betwen 3 clips using dissolves and audio
70 crossfades. This is easy :-).
74 Wipe transitions are very easy and highly extensible as they are generated
75 using a very convenient lookup table based upon the luma of an image.
76 This image can be a 16 bit PGM (grayscale bitmap) or the luma channel of
77 any video producer. A number of high quality wipes can be downloaded from
78 http://mlt.sf.net/. It also performs field rendering.
79 The second wipe demonstrates the ability to control the direction of the
84 A popular requirement in news production is to obscure a face, obscenity,
85 or trademarked logo. This demonstrates using a simple rectangular
86 obscure filter applied to a region of the image. The second example is more
87 advanced and shows using the "region" filter to select the image area and a
88 property of the region filter to "shape" the region using the alpha channel
89 of another image (circle.png) and another property to "filter" the region
90 using the obscure filter.
94 A music bed sound track can be mixed with a video. The sound track of the
95 video clip has a "floating" amplitude normalisation filter applied.
96 Typically, audio normalisation applies a constant gain factor across the
97 entire duration of an audio segment from a single source where the
98 gain factor is automatically determined by anaylsing the maximum "power"
99 or peak levels. However, in news production, a popular requirement is to
100 to dynamically boost the amplitude in soft areas and reduce the amplitude
101 in louder areas. Thus, the gain analysis is performed using a "sliding
102 window" approach. This example also applies a constant gain factor of
103 0.5 (50%) to the normalised audio of the video clip (to get a nicer
106 Audio and Video Levels
108 Audio can be normalised by setting a target amplitude level in decibels.
109 A gamma curve can be applied to the luma channel of video.
111 Shadowed Title and Watermark
113 Two instances of the titler are used to create a shadow effect.
114 The aspect ratio of the watermark in this example is not distorted. Since
115 the original image is a circle with square pixels--a computer-generated
116 image--and ITU BT.601 video is not composed of square samples. Therefore,
117 the compositor normalises the pixel aspect ratio of the overlay to the
118 destination image, and the circular image remains circular on the analog
119 video output. Finally, a greyscale filter is applied to the watermark
120 while its opacity is set at 30%.
122 Station Promo into Story?
124 Here is fun demo that might show using a still graphic with some music
125 to introduce a show. A luma wipe with an audio crossfade transitions from
126 the show title or station promotional material.
128 Voiceover 2 clips with title
130 A common news production requirement to have a "voiceover" audio track
131 to a clip or even multiple clips as demonstrated here. Likewise, it is
132 common to place a title caption on the video at the same time! This
133 demo has a little fun with the titler at the sake of practicality :-)
134 The foreground of the title is transparent while the opacity of the
135 background is reduced to blend with the video. Meanwhile, the compositor
136 stretches the image to fill the bottom slice of the video--not suitable
137 for overscan displays ;-)
139 Also, pay close attention to the mixing levels of the audio tracks.
140 The audio of the video fades out as the voiceover track (just music
141 in this demo) fades in. Then, the voiceover remains mixed with the
142 ambient audio at a 60% level. Finally, the voiceover fades out smoothly
143 from the 60% level to nothing.
147 This demo requires a special TrueType font called Avantika. If you have the
148 font, register it with fontconfig using the fc-cache utility. This
149 demonstrates i18n capabilities of the titler and the alignment capabilities
150 of both the titler and the compositor. The titler centre aligns
151 the two lines of text, and the compositor centre aligns the title
152 horizontally on the frame.
156 You can superimpose a title over a graphic over video! Also,
157 you can apply a luma wipe to the compositor!
161 This demo requires any number of JPEG images with the extension ".jpg"
162 in a subdirectory named "photos."
166 The "watermark" filter encapsulates the compositor, and you have full
167 control over the compositor properties. Who says a watermark can not
172 A variation on the above Bouncy, Bouncy demo that applies a shape, or
173 alpha producer, to the the compositing region.
177 This demonstrates layout capabilities of the compositor.
181 This demonstrates a distorting barndoor-like wipe.
186 A J cut is an edit where the audio cuts before the video.
187 It gets its name from the way it looks on a NLE timeline user interface.
188 When the audio cuts over, it does an audio crossfade over the duration of
189 one frame. This makes the audio cut slightly less abrupt and avoids any
190 "click" due to mismatched sample levels at the edit point. The video edit
195 An L cut is an edit where the video cuts before the audio.
196 It gets its name from the way it looks on a NLE timeline user interface.
197 This demo shows a very quick dissolve over 5 frames for a soft video cut.
198 Like the J Cut demo, an audio crossfade for the duration of one frame makes
199 an audio edit nearly instantaneous while being slightly softened and
200 avoiding aberrations.
202 Fade from/to black/silence
204 Of course, it is possible using MLT to fade from black on video and silence
205 on audio as well fade to black and silence.
209 A push wipe is a somewhat fancier transition than most standard wipes
210 because it involves motion. The new video clip "pushes" the old video
211 clip off one edge. If you can preview on an analog monitor you will notice
212 how smooth the motion is due to field-based rendering.
216 A very minimal reverse crawling title neard the bottom of the screen.
217 The goal of the demo is show fluid motion of the field-based rendering of
218 the compositor when viewed on an analog monitor using a DV or BlueFish444
219 consumer. The demo also shows the potientional for using and extending the
220 existing set of services for a full blown news ticker implementation.
222 Pango Keyframed Markup
224 You can create timed text and subtitles using a .mpl file, which is a
225 properties format file. A properties file contains key=value pairs on
226 separate lines. For .mpl the key is a frame number and the value is
227 Pango Markup Language. A tilde is interpreted as a new line. This
228 example also demonstrates using the watermark and the alignment
229 properties of its encapsulated composite transition where halign
230 is the horizontal, valign is the vertical, c is for center, and m