I wrote a small utility to convert EDL to MLT using edl-genius and node-mlt.

It generates MLT files like so 2012-03-17-Eating-Out_3.mlt (2.2 KB) that Shotcut could open. I couldn’t figure out how to make Shotcut add a timeline. Any ideas what am I missing?

I kinda figured out that to add clips to timeline I need something along the lines of the following

<tractor id="706ec64f-f2a3-4fe5-8eaa-f1ea42c4e1fb">
     <track producer="075c7515-8a9f-44c3-9cc3-0b02d23f4f59"/>
     <property name="shotcut">1</property>

However when I make my utility generate that, Shotcut is weirded out and I have to generate MLTs without tractor and add clips to timeline manually which is annoying. What exactly is required in MLT for Shotcut to add my cuts from EDL to a timeline?


You should make a simple project in Shotcut, save it, and study the XML in conjunction with


Is there similar documentation for filters?

At least for frei0r.colgate, frei0r.levels, frei0r.saturat0r, vidstab? :wink:

Also, do I really need to put in and out points for filters or setting just unique id is fine?

`<filter id="filter5" in="00:00:10.310" out="00:00:16.116">`

Documentation of filters is here

You will not be able to use two pass Stabilization unless you have the file generated by the first analysis pass using the vid.stab library. Generating that is not trivial and not documented outside of reading C source code.

do I really need to put in and out points for filters or setting just unique id is fine?

Um, in general with MLT XML if you do not give in and out points, the filter simply applies to the whole duration of whatever it is attached to, but there is a possibility Shotcut’s filter management when doing things in Timeline and Keyframes will need it. Try first without. Also, you do not need to use this time format of HH:MM:SS.ms. You can also use frame counts or SMPTE timecode.

The EDL exporter in Shotcut is written in JavaScript using node modules. You can read more about that here

export-edl.js is the generated/compiled script.

There is a chance you can improve upon it and also that we could add an import function too.

export-edl.js is the opposite of what I am trying to do.
Do I get it right that there is no MLT writer in JavaScript?

node-mlt is very basic, but good enough to at least create playlists.

My JS skills are pretty basic :slightly_frowning_face:However if someone else is also interested in adding support for EDL edl-genius is worth looking at, despite that it depends on detect-character-encoding and thus doesn’t work for me on Windows.

So I figured out what my problem was. Apparently

  <tractor id="tractor0">
    <property name="shotcut">1</property>

    <track producer="main_bin"/>
    <track producer="background"/>

Is not the same as

  <tractor id="tractor0">
    <property name="shotcut">1</property>

    <track producer="background"/>
    <track producer="main_bin"/>

First is what screws up timeline, while second works.

If anyone would be interested adding import EDL support to Shotcut, here is my code app.txt (3.5 KB) (sorry couldn’t upload .js)

I’ve been using edl-genius that is dependent on detect-character-encoding and I think that is the major problem as far as adding EDL support into Shotcut without some work arounds…

Here is package.json (again as .txt) package.txt (338 Bytes)

[I have an EDL that edl-genius craps on and the script doesn’t work]

1 Like