Advertisment

Rendering video on a cluster

author-image
PCQ Bureau
New Update

Is your machine too slow to handle the workload of your video-editing application? Or, are your pockets too small for the mightily expensive Windows-based video editing/compositing solution? We gave the solution to the second problem in our last issue when we talked about Cinelerra (Video Editing in Linux, page 140, PCQuest September 2003), a full-featured video editing and compositing solution for Linux. In this article, we’ll look at the first problem and see how you can use the renderfarm capabilities of Cinelerra to plug in other systems to form a cluster and render the result of the video being rendered.

Advertisment

Set up Cinelerra 



For the test setup, we used only two nodes: one as the master node and the other as the client. But, since Cinelerra allows an unlimited number of nodes to be installed, you can set up as many as you require. An interesting part is that these nodes need not have their own storage, since the data will always be stored on a common shared volume.

We used very basic configurations for both the nodes: the master node was a P 4 at 2.8 GHZ with 256 MB RAM and a GeForce 2 Graphics card and the client node was a P 4 2.4 Ghz with 256 MB RAM and an onboard display. Both the machines ran PCQ Linux 8.0 (given with PCQuest, March 2003 issue) and Cinelerra (given in Unlimited OSs/Linux/Cinelerra, PCQXtreme DVD, September 2003).

Before you run Cinelerra, you need to set up an NFS share on the master node as this is the node that will have the common volume where all the data will be stored. Following are the steps to setting it up.

Advertisment

Create common storage

The perfomance monitor of one of the client nodes in the render farm

To create the NFS share, fire up your Web browser and open Webmin and enter 127.0.0.1:10000. Then go to the networking icon, click on ‘NFS Exports’ and then on ‘Add a new export’ hyperlink. A form will open up, on which fill the ‘Directory to Export’ field with a folder in your machine having full rights. Let it be /render. Be sure the ‘Export to’ option is selected as ‘Everyone’, ‘Asscee mode’ is in Read/Write mode and ‘Trust remote users’ is in ‘Everyone mode’. Now create the share by clicking on the ‘Create’ button. Finally, restart nfs by issuing the following command

Advertisment

#/etc/init.d/nfs restart

Mount NFS share



Now you have to mount the NFS share to each machine in your network to the same location. You can do that by running the ‘mount’ command from the command line of the client node. The command should look something like this:

#mount -t nfs Server>:/shareddirectory /shareddirectory

Advertisment

For example, let’s suppose the Cinelerra/NFS server’s IP address is 10.10.10.1 and the NFS shared folder is /render. So,

you have to run the following command in each node machine.

#mount -t nfs 10.10.10.1:/render /render

The render dialogue box showing the shared common volume, file format and other options
Advertisment

Create workflow



The master node is running the Cinelerra GUI. It is on this machine that the user will edit/composit the video and subsequently give the command for rendering. Basically, this is the front end for the user.

Cinelerra actually divides the timeline in the number of jobs specified by the user. These jobs are then dispatched to the various nodes depending upon the load balance. The jobs are then processed by the nodes individually and written to individual files on the mounted file system. These files are concatenated later after loading the various rendered files in ‘Concatenate mode’ for further editing. 

On the other hand, the client node runs Cinelerra on the command line. Use the following command. You will not find this command in the documentation.

Advertisment

Cinelerra <-d>



Eg. Cinelerra —d 400

This will start Cinelerra in command prompt mode and make it listen to port 400 for commands from the master node for rendering.

Configure rendering on master node



Once you enable the option of ‘Render Farm’ in the ‘Preference’ dialogue all the rendering jobs, by default, are rendered using the renderfarm. We assume that you have the network share enabled and the name of the directory that is shared is

/home/ani.

Advertisment

                  

STEP 1  
                  



Open the Cinelerra GUI by typing the following command on the terminal screen.


#Cinelerra

                  

STEP 2  
                  



Once the GUI is up, load the file that you had worked upon or you simply want to render using the file load file option.

                  

STEP 3  
                  



Open menu item Settings>Preferences or press Shift+P to open the preferences dialogue box. Choose Performance from the top-left dropdown. Click on the renderfarm option there.

                  

STEP 4  
                  



Add the IP of the client node in the Host name text box. Also add the port number that you want to use in the port number box. Press the Add node button. You will see the IP appear in the adjacent Nodes box. The ‘X’ in the first column of the nodes box denotes that the node is active. This is shown in the figure below. 

The Cinelerra preferences box showing the render farm optoins. There is currently one client node in the farm

                  

STEP 5  
                  



Enter the total jobs that you would like to create in the ‘Total jobs’ text box. This option is over-ridden when the new file at each label option is checked in the render options box.

Render using renderfarm



Once these options are set, you are ready to use the renderfarm. Click on File>Render… This will open the render options box. The most important part here is the giving the file name that you want to render to. This file name should be on the shared volume that is mounted on the client as well. Also, it is recommended that you keep all the resources being used in the same volume. Click on OK to render.

Happy Farming!

With contributions from  Shekhar Govindarajan

Advertisment