News | People | Our Github

Viewing Movies with Pixel Blaster

 

If you try to run a movie without distributing the tiled frames to each cluster machine, you will probably experience poor frame rates. When we run the "write mode" to distribute the ppm files, we'll use the /scrtch/<username>/<movie_name>/ directory. Be sure to make the /scrtch/<username>/ directories on each boba machine attached to the display wall.

The README.txt that comes with the tar file is a good reference for examples on syntax and usage.

 

Easy Way:

You can simply run the movie without distributing files by changing the command in "View Images" Step 2 to:
 python2.2 test_npb.conf "npb <files> <start_#> <end_#> <stride> "
Where <files> is a C-style formatted string (ie aMovie/frame%d.ppm).
The start_# and end_# correspond to the %d part of the file name, and stride skips that number of frames each time.

 

Better Way:

Make sure PATH and LD_LIBRARY_PATH variables are set to the bin and lib in the cr-1.2 directories.
Run the scripts and conf files from boba142.

"Write Mode":

Step 1: Create distribute directories:
 mkdir /scrtch/<username>/<movie_name>/
Do this command on each of the boba machines for the display wall or run:
 ./cluster_make_dir.sh <movie_name>"
to do this automatically.

Step 2: Run Chromium with NPB in Write mode:

 python2.2 test_npb.conf "npb -W /scrtch/<username>/<movie_name>/frame%d.ppm <start_#> <end_#> <stride>"

Step 3: Open another ssh connection to boba142 and run:

 ./setup_npb.sh 

The frames will show up on each monitor as the images are tiled, converted, and distributed to the scrtch folders across the cluster. The frames will look small in each monitor, but they will be sized and tiled properly when running in Distributed mode. Look at write_npbtest.sh as an example script that combines Steps 1 and 2.

"Distributed Mode":

Step 1: Run Chromium with NPB in Distributed mode.
 python2.2 test_npb.conf "npb -D -X <frame_res> -r <fps> /scrtch/<username>/<movie_name>/frame%d.ppm <start_#> <end_#> <stride>"
-X tells npb the resolution of the frames (the original frame size. eg. -X 800x600)
-r the frame rate to run the movie. (eg -r 25)

Step 2: Open another ssh connection to boba142 and run:

 ./setup_npb.sh 
The movie should run smoothly now that the files are located on the cluster machines. You may get warninging from the boba machines about missing files, but the movie still plays fine. The machines are just unable to find the files on the other machines. Look at run_npbtest.sh as an example script that performs Step 1.
After you are finished viewing the movie, the files will stay on the cluster machines for later use. Therefore unless you clean out the <movie_name> directories on the cluster machines, you will be able to run the movie in "Distributed Mode" without having to write first. If you want to clear out the space instead, then you can run:
 ./cluster_clean_dir.sh <movie_name>".