I am currently working on a Tool which creates a huge randomized collection of video-parts from a pre-made collection of videos.
Collection of Videos → My Tool → Huge Collection of randomized Video-Parts inside a MLT-File
I am using a custom-made C# Console Application to edit an MLT-“Template”-File. I call it a template because it has some placeholders like a ChainCollection or EntryCollection which are used to determine where to put the Video-Chain Entries or the Playlist-Entry Entries into the resulting MLT-File which is then used to render the Output-Video.
In my C# App I am loading all of the Input Videos (around 140 Videos) and generate Video-Parts which are used to determine which Parts should be used from an Input-Video.
In the above Screenshot you can see the “randomGeneratedMillisecondList”-List which holds the Amount of Milliseconds which are available for each of the input Videos.
I am then using this List to create a List of Parts of each of the Input Videos which are basicly just a split of the previous Amount of Milliseconds per Video and a random selection of Groups of Milisecond inside one Input Video.
The Output of this Method is the following List:
This List is as of now more or less the represantation of the resulting PlaylistEntry-Collection. The Start- and End-Times of the PlaylistEntries and the Videofile-Reference. There are 734 Elements in this List because each Video can result in 1-12 Groups of Video-Parts.
The next step is to place these Informations into the MLT-File (which I have appended to this post).
YoutubeShortsRandomize_638288277018814864.mlt (144.5 KB)
In this example I have following “numbers”:
Amount of Input Videos: 120
Length of Resulting Video: 15 Seconds
Average Amount of Milliseconds by each Input-Video: 125
Amount of Milliseconds used by all Video-Parts:
(The Amount is not 15000 because there are some rounding Issues in the Code but nothing related)
So you can see that the Video itself shouldn’t be longer than 15 Seconds.
But I have an Issue with the Project in Shotcut when I open it up.
Even the rendered Video is around 38 Seconds long.
How can this be?
Is there something with the Milliseconds of each of the Playlist-Entries?