Bug 354470 - Export multiple render scripts (based on top-level groups)
Summary: Export multiple render scripts (based on top-level groups)
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Display & Export (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-27 18:53 UTC by qubodup
Modified: 2022-08-29 09:40 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
mockup (413.84 KB, image/jpeg)
2015-10-27 18:54 UTC, qubodup
Details

Note You need to log in before you can comment on or make changes to this bug.
Description qubodup 2015-10-27 18:53:58 UTC
Kdenlive would benefit from allowing exporting multiple videos in one go from one project.

Since there is only one in and one out marker, this could be achieved by using groups. Each "top-level group" (that is a group that is not inside another group) would have a render script generated and those could then be processed in queue.

On one hand groups are easier to use (shortcuts available, automatic boundaries depending on clip lengths/positions, are moved when elements inside of them are moved) but on the other hand they are harder to see than zones. I would still recommend groups and see how they work out. I'm sure issues could be solved by adding a display of groups' boundaries similar to the in/out selection display.

I attached a mockup of how the ui might look like and highlighted the elements that are important (mirror at http://i.imgur.com/qweeScA.jpg )

I don't really like the "generate scripts" button, as it is very similar looking to the one left of it while its function is very different. Yet the button/function is related to the render project tab, as it would use the same parameters for all generated scripts.
An alternative would be to add "[ ] Groups" or "[ ] Top Groups" to fullproject/selzone/guidezone, which I'm guessing would disable "render to file" and possibly change "generate script" to plural.


Here is pseudocode for implementing this as part of the render interface:

///

on button "Generate Scripts" press:

  inOut = new list of lists // stores metadata like where to start rendering, where to stop, what file names to use

  nl = countDigits(countAllTopLevelGroups()) # number-length (for leading zeroes) counter

  i = 0 # just a counter

  for each group in timeline: #create metadata for all renders that would be generated

    i=i+1

    insert ({
      group's first frame index,
      group's last frame index,
      group's output file name (based on OUTPUT FILE path + outputFilenameWIthoutExtension + addLeadingZeroes(i,nl) + filenameExtension),
      group's .sh script file name (based on SCRIPTDIR path + outputFilenameWIthoutExtension + addLeadingZeroes(i,nl) + .sh),
      group's .sh.mlt script file name (based on SCRIPTDIR path + outputFilenameWIthoutExtension + addLeadingZeroes(i,nl) + .sh.mlt)
    }) into inOut

  toBeOverwritten = new list of strings

  for each item in inOut: #check for existing file names
    for filename in inOut[2], inOut[3], inOut[4]:
      if os.fileExists(filename):
        insert(filename) into toBeOverwritten

  if length(toBeOverwritten) > 0:
    pop-up-warning(message="The following files would be overwritten by generating the scripts or by running the scripts:"+formatAsList(toBeOverwritten) + "You can prevent this by canceling and changing the output file name",buttons={OVERWRITE,CANCEL}) // this is obviously more complicated
    if CANCEL:
      break

  generatedFiles = new list of strings

  for each item in inOut:
    createRenderScript(item) // obviously more complicated but basically uses the paramters saved in inOut and the settings in the render inteface.
    insert(item[3]) into generatedFiles
    insert(item[4]) into generatedFiles

  pop-up("The following script files have been generated:" + formatAsList(generatedFiles))

///


Here is one user story:

1. A video producer records 20 project presentations at a community tech event using one video track without interruptions
2. The track gets cut in Kdenlive for each of the presentations with just a watermark added.
3. Currently, each of the presentations requires setting the in/out markers, changing the export video file name and generating a render script (the filename of which luckily gets auto-iterated).


Here are some test scenarios, so the function wouldn't break too easy:

1. there are no groups
2. there is only one group
3. there is only one group of an element that is one frame long
4. there are two groups, they overlap by being on different tracks
5. there are two groups and each of them consists of two groups grouped together
6. there is one group and one ungrouped clip (non-overlapping) - the clip should be ignored
7. there is one group and one ungrouped clip (non-overlapping) - the clip should be part of the render just like it would normally be with full/selected/guide zone settings
8. there are 3 groups. the filename is /home/user/video.mp4 and the generated script name would be /home/user/kdenlive/scripts/video01.sh etc.  there are also the following files in the filesystem: /home/user/video02.mp4, /home/user/kdenlive/scripts/video01.sh and /home/user/kdenlive/scripts.video03.sh.mlt - the user should be warned about this by being presented a pop-up with a list (tableview?) of all files that already exist and they should be able to select "overwrite existing" or "cancel". cancel would mean that no scripts are created for the clips with matching script or output file names.

I volunteer to test these, should the function end up in git.

Reproducible: Always
Comment 1 qubodup 2015-10-27 18:54:55 UTC
Created attachment 95168 [details]
mockup
Comment 2 Ian 2017-11-11 17:31:34 UTC
I too would like to be able to create multiple videos from one project.  For example, you want to create a DVD with 'chapters' that are searchable from the DVD menu.  The simplest way (in my opinion) would be to have the complete video split into smaller pieces, and the time you would want to make those 'split decisions' would be while editing.  Maybe, markers would be a good way of determining where to make the splits.
Comment 3 Peter 2018-01-16 22:43:42 UTC
You can render multiple videos from one project using guides & the 'guide zone' radio button in the render dialog.
Comment 4 farid 2022-08-28 14:09:36 UTC
Does the new Guide Multi Export option solve your problem? If so, please close.
Comment 5 Ian 2022-08-29 09:40:17 UTC
The ability to use the guide zones certainly solved my initial problem (and I have been using that since 2018).

The Guide Multi-Export looks as though it will simplify exporting a number of clips (and not forgetting the odd one) and I expect that I will be making use of the feature.