I am a big fan of this software. I started using it when I teach in my classes.
And I wanted to implement the Exchage of EDL to Davinci Resolve.
However I was stuck with the MLT2EDL script giving me errors all the time.
I finally managed to get it running on python on my OSX El Capitan.
I want to share it with you, but I dont know where to upload it, and cannot contact the original author. If someone is in touch, just give it back.
I would like to make a more complex transcription of the tool. to take what is possible from effects to other EDL formats. Any suggestions?
I know the author and have his e-mail address. I will forward it to him. As for other converting effects, that is quite difficult because effect implementations are so different between tools. And when you can make some sort of conversion, there is often a big difference in the fidelity of the conversion. I think that opens a big door to headaches both for support and for simply your own usage. What do you think? I have no advice for how to actually proceed on that.
Before proceeding to make it much more complex, I wonder if it should be ported from Python to something else. As a python script, it has little hope of being integrated into Shotcut because I am not going to put something in that requires someone to install Python on their own, and neither am I willing to include Python in the installer just for this one feature that only advanced users would use. Let me think about what would be a betterâŚ
I completely agree. thank you for forwarding it to the author.
Python was a pain on my mac, and for my students I used pytoninstall.py to make the little executable. I am not really familiar with python. I am rather thinking of a XML Transformation. I have done this in the past to format and output information from FinalCut XML. Would this be more doable within this environment? Some manipulations could it also make it easier to rename and relink the files.
The question is, what would be a great output format? FinalCut has become a bit obsolete, although it was very useful.
I do not think another XML as the target is necessarily any easier than another text format. FCPXML does have a DTD to make validating the result easier. Meanwhile, EDL has some documentation and Blenderâs source code to make understanding it easier. Both FCPXML and EDL are popular interchange formats.
As for porting to another language, I think it is best to keep it as a high level language for other people to maintain. Qt apps such as Shotcut and Kdenlive make it possible to use Javascript to run a conversion, and there are npm modules (Javascript library) to make processing XML easy.
If you are thinking about trying to compile the Shotcut code, beware! It is not easy. We use a long and complicated bash script to make nightly and release builds [1]. And on OS X, it also requires MacPorts to provide many dependencies outside the script. Trust me when I say, I do not think this is the road you want to go down for this task.
I suggest if you want to look into porting the MLT2EDL code to Javascript, you do that separately using node.js and npm modules. In essence, node.js is simply a command line interpreter. There is plenty of good information about getting, running, and using node.js. It is quite a joy to use. After that, I will accept the burden of integration into Shotcut.
Great to hear that you turn that MLT2EDL script into something useful for you. Iâm not a python coder nor am I a coder in general, so that script is just a result of me tinkering with the kdenparse script(which I havenât touched since).
EDL may at first seem like a simple format, however itâs original purpose of carrying information on a celluloid footage reel and a frame number and later a tape name and a time code, is that archaic, that various softwares using this format have added several alterations, which makes it prone to errors.
What makes it even more difficult to work with is that the reel names and time codes listed in the edl file are read from embedded metadata in the source files. So unless you source material is in a format which canât carry reel name/time code - you canât be sure that the first frame of a source clip is 00:00:00:00 - which means that you would have to transcode your source material into a codec which allows embedded time code (and Shotcut would have to read the embedded time codes and adjust the in/out point in the EDL according to the start value of the time code).
With the reel name it is even more important to embed it into the sourcefile metadata because there is no common naming convention, however the reel name is limited to 8 characters, no spaces and no file extension. The limited reel name often means that you would manually have to point to the folder where you source files are located or even pointing to the specific file mentioned in the EDL. As an alternative to using the reel name for indicating the file name FCP is using a line before the edl line. Like this: * FROM CLIP NAME: CLIP NAME HERE(can contain the full path). But other softwares use clip name specified in a comment line but saying * COMMENT: instead of * FROM CLIP NAME: Some softwares read that from the line before the time code line and other softwares use the line after the time code line. And yet other softwares doesnât read this line at all(like the Blender edl import script), so you would have to add the file name information from the reel name tag. (http://eyeframeconverter.wordpress.com can transcode to ex. ProRes or DNxHD with embedded reel name and time code)
Another inconsistent value is the EditMode value written and read differently in different softwares. They can be written/read like this:
Blender: âVâ | âAâ | âVAâ | âBâ | âvâ | âaâ | âvaâ | âbâ which equals Video, Audio, Video_Audio edits (note B or b can be used in place of VA or va).
Or Lightworks:
AA/V â Video and audio on channel 1 and 2
VA1A2 â Video and audio on channel 1 and 2
A12V â Video and audio on channel 1 and 2
AUD3 â Audio only on channel 3
A3 â Audio only on channel 3
Or this:
NONE, A, B, V, A2, A2\V, AA, AA\V
So some softwares writes/reads what tracks goes where and some donât(Blender doesnât). I believe that Lightworks limits export to an EDL with 2 or 4 audio tracks.
Most of the pro NLEs out there support this format, and also most pro DAWs which means you can import this format into an audio editing software to edit your project natively in there. Unfortutately the author of Ardour hates the aaf format with passion: https://community.ardour.org/node/8491
I believe it is a huge undertaking to implement I/O of EDL or AAF, but maybe as a Google Summer of Code project it would be possible? Or maybe it would be better to implement it in MLT so all projects using MLT would be able to benefit from it?
So in other words at this time there is no perfect interchange format, which is kind of sad, since it would be really great if projects could be painless moved between ex. Shotcut, Blender, Natron, Resolve, OpenCine, OpenToonz and Ardour.
I think we should avoid going to extremes in this area. Apparently, conversion to EDL is useful to some people even when assuming start timecode is 00:00:00:00. As for the reel name, one can use an 8 character hash. Shotcut already computes a hash (of the file contents) into its MLT XML. Use the first 8 characters from that hash. Sure, this is not best way to EDL, but it solves many peopleâs itch to simply repurpose a Shotcut sequence. Again, if someone ports MLT2EDL to Javascript, I will integrate it in a manner that makes it easy for someone to hack on it by simply installing Shotcut.
Nice tutorial. So you save a mlt file pr track, convert them individually, and import them in Resolve one by one? I believe I have imported more tracks in one go, but maybe I remember it wrongâŚ
Dan, wouldnât you prefer a qt sollution? And the reading of a mlt file, wouldât be needed, right? Is there code included in shotcut to do math with time codes, like frames to TC?
Btw. There is a edl2aaf c++ code project here: https://sourceforge.net/p/edl2aaf/code/?source=navbar
Iâm unfamiliar with c++, but maybe this project would make it easier to get a head start with the edl format or even code a aaf exporter.
In connection to the above mentioned project there is a description of the edl cmx 3600 format edl2aaf can import: http://edl2aaf.sourceforge.net/
Javascript is a Qt solution. The Shotcut timeline and filter panels make use of Javascript. If you look into the share/shotcut subdir of a Shotcut installation, you will find many .qml and .js files.
I am not really volunteering to doing a lot in this area. I cannot do everything, or at least I have many higher priorities. All I offer to do is to embrace this related project (MLT2EDL and kdenparse) by integrating and giving it a new home for ongoing maintenance. But I am cannot integrate a Python solution.
True, but someone making a standalone Javascript port of this script needs to read a file (or paste the XML into one big string in the script). When I integrate, the script will likely take on quite a different shape. Upon integration, the MLT XML will probably be supplied as a string. How exactly this integrates is not important at this time.
Yes, to convert between frames and timecode given a fps.
Iâm sorry I do not have the time for learning java at this time, however I came across this project to convert the syntax from python to java: https://github.com/issmirnov/Python2Java
Running mlt2edl through that thing the syntax looks like this, however the functions etc. are not converted: http://codepaste.net/rgd7b4
OK, but Java and JavaScript are two very different things. I just took a look at the python script, and the core code (minus command line option processing and frames/timecode conversion) is only 300 lines. And I know Python well. So, I will give a crack myself.
Wow, that was quick! If you post an Shotcut saved EDL we can test it against Blender/Resolve/Avid if you like. Or is there a nightly build we can test?
Looking through your code, I realize that what youâve done is a complete rewrite in only one day. Thatâs downright impressive!
I worry that not all softwares will be able to digest the âAA/Vâ setting. Maybe âbâ will be more digestable for more softwares out there? Uwe, can you test if Resolve will accept âbâ for video+audio?
Another thing I found out is that ex. Premiere Pro writes the comment line after the edit decisions concerning that clip, followed by an empty line:
001 DL02_024 AA/V C 00:00:00:19 00:00:04:19 00:00:00:00 00:00:04:00
FROM CLIP NAME: DL02_024.MTS
002 DL02_002 AA/V C 00:00:10:16 00:00:23:14 00:00:04:00 00:00:16:23
FROM CLIP NAME: DL02_002.MTS
The more I look around, the more it seems to be a common way to do it. The other way around was, I believe, for Blender import. So this way around is probably better.
The old, scanned CMX3600 document is my baseline specification.
I am willing to add a submenu:
File > Export EDL > ToolA / ToolBâŚ
File > Export EDL > ToolCâŚ
File > Export EDL > Generic / CMX3600âŚ
However, at the moment, I do not have enough information (in my head) to differentiate them. Definitely, âAA/Vâ seems wrong to me, and âBâ more correct, and that is probably an area of difference. Also, which tools can accept a very long reel name? Do they accept an absolute file path? A quoted absolute file path? Which ones use the âFROM CLIP NAMEâ comment to resolve file links? Do they accept absolute file path?
A simple table based on those criteria will be a good start.
Will have to investigate further. Here are a few edlâs found on the net:EDLex.zip (1.2 KB)
As both Final Cut and Premiere has the comment line following the âtime codesâ line, this is probably the correct way to do it. One thing one must be very careful about when importing into Lightworks is that each column has the exact number of characters - which means that the reel name can contain spaces, however the Blender import script separates columns by locating the spaces. So thatâs the reason for strict 8 characters for the reel name and only containing characters a-Z and 0-9. another thing to note is that âcleaningâ your test.edl in EDLtoolkit AA/V gets translated to A12V. (A12V is not supported in Blender)
Iâve been trying to find an example with absolute paths, but unsuccessfully. This is one of the major shortcomings of this format. Maybe it was Sony Vegas, however their edl seems to be something completely different. This is the reason for the somewhat complicated import process Uwe mentioned in his Resolve write up. And same thing (but no media pool) when importing edl in Blender:
Lwks doesnât open it. Iâve tried to embed reel name and time code in the source files(which Lwks demands), but still without success. As I wrote earlier on Lwks is very picky on the exact number of spaces between columns. I managed to get something into Lightworks by adding the wildlife to the edl included in the zip above. (Lwks will import edl in the free version).
On the mlt project. I changed the absolute paths to relative paths and changed the file extension to mp4, but I havenât succeeded to load the video into the project. (running SC 16.04.01)
Will have to look more closely on the complicated EDL Manager to try to import the edl to Avid.
[Edit: Resolve appears to import the edl fine, with and without embedded meta data]