Crash after loading generated MLT file

I have an app that scans a series of videos and detects when an event has occurred - like birds visiting a feeder. It then generates a simple MLT file that shows a sequence of these events on the timeline. It was working fine a year or so ago but recently the MLT file is crashing Shotcut. I have made no changes to the app in the meantime.
I start Shotcut and check the video parameters are as per the MLT file and then Open the MLT. The truncated clips appear briefly on the timeline but nothing appears in the preview window. After a few seconds Shotcut just fades away with no error message.
Attached are the MLT file and log file and any help would be much appreciated.

shotcut-log.txt (35.4 KB)
Thumbs 53^0^0^0^0^0.MLT (7.1 KB)

Not an answer or help

It seems that app is helpful, can I get that software, on a mac (ready for linux or windows version), I am excited to see how does it work.

The app is detailed in the link below. Don’t install it until I solve this problem.

http://starrydave.com/?page_id=856

1 Like

Hi @Davo
Are you the developer of this app?
Davo > Dave’s Motion Detector

Is it possible that the application generates MLT files that are no longer compatible with the newer releases of Shotcut?
Maybe you could download an older version of Shotcut and see if it accepts your MLT files. Portable versions (.zip - no install) are available.

Your XML refers to a producer that does not exist:
<track producer="background"/>

You need to add something like

  <producer id="black">
    <property name="resource">0</property>
    <property name="mlt_service">color</property>
    <property name="mlt_image_format">rgba</property>
    <property name="set.test_audio">0</property>
  </producer>
  <playlist id="background">
    <entry producer="black"/>
  </playlist>

I do not know why it worked before, but it was clearly invalid.

Many thanks Dan for taking the time to help me.
First I tried commenting out
<track producer="background"/>
and this got me a start. Shotcut loaded the file and the timeline filled up and the video appeared in the preview. However, the first half of the 53 event clips were wrongly sized and cut while the second half played fine.

I then tried adding your code like so

	<tractor id="timeline" title="DMD" global_feed="1">
		<property name="shotcut">1</property>
		<track producer="background"/>
		
<--! NEW BELOW -->		
<producer id="black">
<property name="resource">0</property>
<property name="mlt_service">color</property>
<property name="mlt_image_format">rgba</property>
<property name="set.test_audio">0</property>
</producer>
<playlist id="background">
<entry producer="black"/>
</playlist>
<--! NEW ABOVE -->	
	
		<track producer="playlist0"/>

but this just caused Shotcut to quietly expire like before.
I think that when I wrote the app I used a simple Shotcut MLT file as a template and then tried to fill it in without really knowing what I was doing. Best thing is probably to start again and understand what I am doing first.
MusicalBox - I loved your solution but I really should fix the problem properly.

The comments in your XML MLT file are formatted wrongly. They start

<--!

when they should start

<!--

You are using frame numbers in your XML. These numbers are sensitive to the frame rate as determined by the Video Mode since your XML does not include a <profile>. If the video mode is Automatic, then with this XML it defaults to 1080p25.

adding your code like so

You cannot place those new tags at this location (in the middle of the multiple track definitions). These should be placed immediately after the <mlt> line or immediately before the line with <tractor>.

Success Dan - thank you so much and apologies for taking up your time.
I added your code to my MLT files and they all worked perfectly - even the automatic dissolves between events. It handled 53 separate events from 3 hours of video over 9 files and condensed them into a 4 minute video. All cuts and dissolves were perfect, including the audio.
Next step is incorporate your code into my app, test it out and publish it. Announcement will be here.
Re FPS - my app requires the Shotcut video mode to match the source videos. I found this out the hard way.
Thanks again.
ps Elusien - thanks. I don’t really code in XML so thanks for the pointer.