Batch Rendering

Batch Rendering as implemented in CINELERRA-GG is considered to be more of an advanced feature and careful usage is advised. It automates the rendering of audio/video files in that you can establish a set of job parameters, save them, and use them repeatedly (figure 7.6). It also allows for CINELERRA-GG to be run by external programs, with no need for the user to manually interact with the user interface.

Figure 7.6: Example of the Batch Render menu
Image batch01

If you want to render many projects to media files without having to constantly set up the render dialog for each one, batch rendering is a more efficient method of rendering. To use this feature you need to understand certain concepts.

  1. You must define a list of Batches (Job ) before starting the rendering. This is created using the New button and displayed in Batches to Render dialog.
  2. Each batch consists of a source project already created in CINELERRA-GG, e.g. aaa.xml, to which we assign the rendering parameters.
  3. Created the first batch, we will see it appear in the dialog Batches to Render.
  4. Using the New button again we create a second batch for another source project (bbb.xml) and configure it at will.
  5. We continue with the source projects ccc.xml, ddd.xml, etc. until we run out of projects that we want to render in batch.
  6. Note that each batch has its own name, path and rendering parameters.
  7. Now we have our Job, a list of batches. We can still configure it or modify it if we want to change something. In addition we can delete a batch from the list or we can disable it in the Enabled field so that it is not taken into account during rendering, but without deleting it.
  8. Finally we start batch rendering with the Start button.

Let's see in detail how to set the Batch Rendering.

The first thing to do when preparing to do batch rendering is to create one or more CINELERRA-GG projects to be rendered and save them as a normal project, such as aaa.xml. The batch renderer requires a separate project file for every batch to be rendered. You can use the same CINELERRA-GG project file if you are rendering to different output files, as in an example where you might be creating the same output video in different file formats.

You do not have to render an entire projects. We can limit ourselves to an active region that we can set through a selection in Cut and Paste mode, with labels or In/Out Points. Or the rendering will start from the Insert Point position until the end of the project. Remember: if we want to render the entire project (and not just one active region) it is important to bring the Insertion Point to the beginning of the timeline. This is the only way we are sure to include the whole project.

With all the CINELERRA-GG xml project files prepared with active regions, go to File Batch Render. This brings up the batch render dialog. The interface for batch rendering is more complex than for single file rendering. A list of batches must be defined before starting a batch rendering operation. The table of batches appears on the bottom of the batch render dialog and is called Batches to render. Above this are the configuration parameters for a single batch; a batch is simply a pairing of a project file with a choice of output file and render settings.

It may be advisable to start with a Delete so you don't have any problems. Set the Output path, File format, Audio, Video, and Create new file at each label parameters as if you were rendering a single file. These parameters apply to only one batch. In addition to the standard rendering parameters, you must select the EDL Path to be the project file (such as aaa.xml) that will be used in the batch job. In this case, EDL Path is not related in anyway with the EDL files as created by File/Export EDL. In batch render mode the program will not overwrite an existing output file and will simply fail, so make sure that no files with the same name as the output files exist before starting.

If the batches to render list is empty or nothing is highlighted, click New to create a new batch. The new batch will contain all the parameters you just set. Repeatedly press the New button to create more batches with the same parameters. When you highlight any batch, you can edit the configuration on the top of the batch render window. The highlighted batch is always synchronized to the information displayed. You can easily change the order in which the batch jobs are rendered, by clicking and dragging a batch to a different position. Hit Delete to permanently remove a highlighted batch. In the list box is a column which enables or disables the batch with an X meaning the batch job is enabled and will be run. This way batches can be skipped without being deleted. Click on the Enabled column in the list box to enable or disable a batch.

The description of each of the columns in the batch list are as follows:

Enabled:
an X in this column means the batch job will be run.
Labeled:
an X in this column goes hand in hand with create new file at each label.
Farmed:
to use or not the render farm.
Output:
path and filename for the generated output.
EDL:
the path and filename of the source EDL for the batch job.
Elapsed:
the amount of time taken to render the batch if finished. If field is empty, it did not run.

The File Batch Render pulldown brings up the Batch Render window to be used for batch rendering as well as DVD/BD creation. There are some additional buttons that can save time and mistakes. These are described next.

Save Jobs
when you have set up the batch jobs the way you want and you think you may have to run them more than once, it is beneficial to save the jobs for later use so you easily run them again. It is recommended to use a filename with .rc as the extension so that it is obvious that it is a list of batch jobs to be run.
Load Jobs
reload a previous set of saved jobs. This can come in handy if you did not have the time to render them when you originally set them up, if you need to rerun, or if you got interrupted.

To start rendering from the first enabled batch, hit Start. Once rendering, the main window shows the progress of the batch. After each batch finishes, the elapsed column in the batch list is updated and the next batch is rendered until all the enabled batches are finished. The currently rendering batch is always highlighted red. To stop rendering before the batches are finished without closing the batch render dialog, hit Stop. To stop rendering before the batches are finished and close the batch render dialog, hit Close. Or you can exit the batch render dialog whether or not anything is being rendered, by hitting Close.

You can automate CINELERRA-GG batch renders from other programs. In the batch render dialog, once you have created your list of batch render jobs, you can click the button Save Jobs and choose a file to save your batch render list to. It is recommended that you use a filename with the extension of .rc in order to make it obvious that this is a list of batch jobs to render. Once you have created this file, you can start up a batch render without needing to interact with the CINELERRA-GG user interface. From a shell prompt, from a script, or other program, execute:

{path_to_cinelerra}/cin -r batchjob.rc
substituting your actual filename for batchjob.rc. Warning this file will be modified so if you use any filename that is not a legitimate list of batch jobs to render, that file will be overwritten and its previous contents destroyed. When invoked with these parameters, CINELERRA-GG will start up and run the rendering jobs in the list contained in that file starting at the defined active region, without creating its usual windows. If you do not specify a filename, the default will be $HOME/.bcast5/batchrender.rc. Possible messages you might see where you started up the job are as follows.

The following files exist: - filename - Won't overwrite existing files
that batch job will not run in order to prevent writing over previous run.
"filename" No such file or directory
the specified batch job file does not exist.
"filename": Permission denied
the specified batch job file does not have write permission so can not be updated.
Render::run: filename
the batch job with the name of filename will be processed.
** rendered 0 frames in 0.000 secs, 0.000 fps
either you used a file that is not a list of batch jobs or the batch jobs within the file were not enabled.



Subsections
The CINELERRA-GG Community, 2021
https://www.cinelerra-gg.org