Combining projects through editing

Back awhile in a post about combining .mlt projects, the best advice seemed to be “Carefully edit the XML of the .mlt files in a text editor. It really helps alot to understand the principles of XML.”

Unfortunately, I’m not really up-to-speed in XML. I tried to place the clip block of a project into another projects text file so that the ‘master’ project would now contain two clips; it only displayed 1 when it was opened.

Are there other aspects of the xml that need to be altered to accommodate clip information from another project?

Thanks,
r

You are able to use existing MLT project files within a new project.
image

That’s brilliant! Thanks. I never noticed that option before. When I add a MLT project file to the source, it add all of the clips in that project as a continuous stream, so if I add that to the playlist the clips are nested together.

I can cut them apart in the source before moving them to the playlist, or in preparation create multiple MLT files - one clip to a file - and then open those individually.

Any other techniques would be greatly appreciated.
r.

The newest version also has the ability to cut and paste between open instances of Shotcut - or at least, that’s my understanding; I haven’t had a need to try it yet. To do this, you would open the previous project in Shotcut, then start a new instance of Shotcut and open the new project. Then copy from the previous project, and paste into the new.

Thanks - that does work and makes the process much easier. A few blips to document:

  • not all the possible ways to cut or paste work consistently. Copy from the edit menu doesn’t seem to cut the cliip, though copy from the addidtional actions menu does work consistently.
  • pasting places the clip in the timeline not the source. It must then be cut/copied from the timeline to the playlist if that’s where you want it.

So, a few extra steps and a little knowing where things are, but this is a welcome addition to my editing workflow.

Thanks Awake and Hudson 555x for helping me through this process!
r.

R., one thing to try - there are different paste commands for different parts of the UI. In particular, Ctrl-C and Ctrl-V always copy from / paste to the Timeline, but Shift-C and Shift-V always copy from / paste to the Playlist. (I’m not sure if the latter is what you meant by “source.”)

Thanks for the response awake, but I don’t seem to be able to get Shift-C & Shift-V to work in cutting and pasting from one project to another. This seems to work within a project, but not between them.

Thanks,
r.

1 Like

Copy & paste from timeline i working, but not copy and paste from playlist
(Tested on 21.12.24 / Flatpak / Fedora Linux 35)
(Use Ctrl - A to select all, Ripple Trim and drop on)

Thanks TimLau - that’s a convenient way to copy many clips from one project to another. My remaining challenge is to get each of these clips into the playlist of the receiving project from its timeline. The only way I can do that now is to cut/copy each one individually from the timeline, then paste (+) it into the playlist.

If there were a method to copy clips from the timeline in project 1 to the playlist in project 2, that’d be great; or from playlist to playlist would be perfect.

Thanks again for the help,
r.

Current Shotcut don’t support cut & paste from playlist between project, but it would be a nice feature request for a future version of shotcut, don’t think it would be hard to implement, as far as I can see in the .mlt file the playlist is stored the same way as a track on the timeline.

TimLau - this takes me back to my original question which was about a post about combining .mlt projects, the best advice (from the developer) seemed to be “Carefully edit the XML of the .mlt files in a text editor. It really helps alot to understand the principles of XML.”

This still seems the easiest and most direct way to solve this problem. I tried early on to copy the clip blocks from one .mlt file into the other one, but the added blocks were ignored. Does anyone know how this is done and what changes to the .mlt file need to be made besides adding the blocks describing the additional clips?

r.

The playlist in the .mlt is stored like

  <chain id="chain2" out="00:00:14.567">
    ..
    ..
  </chain>
  <playlist id="main_bin" title="Shotcut version 21.12.24">
    ..
    ..
    <entry producer="chain2" in="00:00:00.000" out="00:00:14.567"/>
  </playlist>

each clip in the playlist is stored as a <chain id="chainXX"></chain> block

so it is possible to copy the block from the source to the destination and the lines also.
but have to change the id=“chainXX” and all references so all chain id at numbered in sequence 1,2,3 etc.
And all timeline clips is also stored as <chain></chain> blocks , you need to change then also, it can be done, but will be hard on a big project with many clips.

If you take the original source and destination project and remove all tracks on the timeline and save them to new .mlt files, then it would be easier to merge them in a .txt editor, and if you open the merged project in shotcut , you can create the number of empty tracks needed and copy the timeline clips from the 2 orignal projects, into the new merged playlist project.

Thank you TimLau - it’ll take me some time to digest some of this, but I think what I was missing is that in addition to adding the clip block - each of those blocks needs to related to an entry in the chain and playlist sections.

I’ll give it a try and let you know how it goes.
Thanks again,
r.

Okay - I got the part about merging chain blocks. If they’re from the same file originally, you can add the chain blocks, but then you also need to add their info to the playlist block.
So where previously you had:
entry producer=“chain0” in=“01:01:02.135” out=“01:01:05.205”/
you also need to add the specifics of the second clip’s chain:
entry producer=“chain10” in=“01:39:21.822” out=“01:39:24.157”/
Then the .MLT file will load both clips.

I haven’t tried it yet, but I assume if the clips are origianally from 2 different video files, you need to define both separate: property name=“resource” ‘filelocation&filename’.

Now I need to work on your last paragraph, which will take some studying.
Thanks,
r.

1 Like

If you have defined an custom in and out point in the clips in the play list, you need them all, but if you copy the entry producer lines from the another .mlt, they sould be there already.
The most import part is that “chainXX” match the id=“chainXX” in the chain block that defines the physical video file on desk and each chain block in the .mlt has a unique id.

Ah, interesting. As you and Tim suggested, this would be a good extension of the cut & paste facility.

1 Like

Thank you all - using the tips and tricks we discussed I’ve been able to assemble clips from 3 different projects into a combined whole. The process(es) are still a little cumbersome, but fairly easy to use. I appreciate the help and, yes awake, the ability to copy and past directly between playlists would be a much better solution. That way clips could be properly sequenced in the playlist and then dropped as a whole into the timeline.

Best,
r.

1 Like

This topic was automatically closed after 90 days. New replies are no longer allowed.