Using mpl file results in repeating info in videos
Brought to you by:
ddennedy,
lilo_booter
Recently I've discovered that in videos longer than 7-8 minutes, the text info (included in mpl files) starts to repeat in the videos. There is no hard limit, this can happen at any second, and it's the same in both the 6.2.0 version and an old 0.9.2.
The command I use looks like this:
/opt/melt/bin/melt -silent /mnt/in/78733_.mlt -consumer avformat:/mnt/out/78733_2623095.mp4 progressive=1 vcodec=libx264 flags=+loop cmp=+chroma partitions=+parti8x8+parti4x4+partp8x8+partb8x8 me_method=umh subq=7 me_range=16 g=250 keyint_min=25 i_qfactor=0.71 qcomp=0.6 qmin=10 qmax=51 qdiff=4 directpred=1 trellis=1 coder=0 bf=0 refs=1 flags2=+wpred+dct8x8 level=30 wpredp=0 s=1920x1080 aspect=1.7778 r=26 b=6984k an=1
This is the contents of 78733_.mlt:
<?xml version="1.0" encoding="utf-8"?> <mlt> <producer id="producer0"> <property name="resource">78733_2623095.mp4</property> </producer> <playlist id="playlist0"> <entry producer="producer0" in="0" out="18846"/> </playlist> <tractor id="tractor0"> <track producer="playlist0"/> <filter id="time" in="0" out="0"> <property name="track">0</property> <property name="factory">loader</property> <property name="resource">pango:/mnt/in/78733_time.mpl</property> <property name="mlt_type">filter</property> <property name="mlt_service">watermark</property> <property name="producer.fgcolour">0x000000ff</property> <property name="producer.bgcolour">0xffffff20</property> <property name="composite.halign">c</property> <property name="composite.valign">t</property> </filter> </tractor> </mlt>
The 78733_time.mpl file starts with:
0=<span font="sans bold 11"> </span><span font="sans bold 20">31.08.2016 16:36:49</span><span font="sans bold 11"> </span> 26=<span font="sans bold 11"> </span><span font="sans bold 20">31.08.2016 16:36:50</span><span font="sans bold 11"> </span> 52=<span font="sans bold 11"> </span><span font="sans bold 20">31.08.2016 16:36:51</span><span font="sans bold 11"> </span> 78=<span font="sans bold 11"> </span><span font="sans bold 20">31.08.2016 16:36:52</span><span font="sans bold 11"> </span> 104=<span font="sans bold 11"> </span><span font="sans bold 20">31.08.2016 16:36:53</span><span font="sans bold 11"> </span>
And ends with:
19006=<span font="sans bold 11"> </span><span font="sans bold 20">31.08.2016 16:49:00</span><span font="sans bold 11"> </span> 19032=<span font="sans bold 11"> </span><span font="sans bold 20">31.08.2016 16:49:01</span><span font="sans bold 11"> </span> 19058=<span font="sans bold 11"> </span><span font="sans bold 20">31.08.2016 16:49:02</span><span font="sans bold 11"> </span> 19084=<span font="sans bold 11"> </span><span font="sans bold 20">31.08.2016 16:49:03</span><span font="sans bold 11"> </span>
The last timestamp ("31.08.2016 16:49:03") is never written into the video, as sometime during the process, the timestamp sequence restarts (with "31.08.2016 16:36:49"). This happens at the exact same second if I retry with the same video.
Is this a known limitation in Melt? Any further info I can provide?
Thanks,
Robert
It seems maybe the pango producer, which processes .mpl files, does not automatically adjust its duration based on the contents of the mpl. To workaound, the water filter can adjust the duration of the producer it embeds for the overlay if you preface the property name with "producer.":
https://www.mltframework.org/bin/view/MLT/FilterWatermark#producer
Therefore, supply properties producer.out and producer.length on the watermark filter greater than or equal to the duration of the mpl.
I do not have a long mpl file handy. Can you try this patch?
Thanks for the patch. I tried it, and the problem seems to be fixed. Used the previous video, and a new 15-minute video, and the whole mpl file contents were written into the video. Good job! :)
Thanks,
Robert
Fixed in git for next release:
https://github.com/mltframework/mlt/commit/4551e809f4c65e72e0bed67dcedf8a5d5c3bad8e