Rendering#

SIERRA's capabilities for rendering video outputs are detailed in this section. SIERRA can render frames (images) into videos from 3 sources:

Note

Using BOTH the engine and project rendering capabilities simultaneously IS possible, but discouraged unless you have multiple terrabytes of disk space available. --exp-range is your friend.

This plugin uses ffmpeg to do the actual rendering, and so it must be findable by the shell used to invoke SIERRA; an error will be thrown otherwise.

OS Packages#

apt-get install ffmpeg
brew install ffmpeg

Usage#

This plugin can be selected by adding prod.render to the list passed to --prod during stage 4.

This plugin creates <batchroot>/videos when active. Videos for each experiment will accrue in subdirectories under here. E.g.:

| -- <batchroot>
     |-- videos
         |-- c1-exp0
         |-- c1-exp1
         |-- c1-exp2
         |-- c1-exp3
         ...

Which videos will be rendered is read from the imagizing section of project graphs.yaml for --project-rendering. For engine-vc, all matching image directories within each experiment are unconditionally rendered. If you only care about some of them, you can use --exp-range to only render videos for some experiments.

Cmdline Interface#

sierra - CLI interface#

sierra [--render-cmd-opts RENDER_CMD_OPTS] [--project-rendering]
sierra Stage 4 options#

Options for generating products

  • --render-cmd-opts RENDER_CMD_OPTS -

    Specify the ffmpeg options to appear between the specification of the input image files and the specification of the output file. The default is suitable for use with ARGoS frame grabbing set to a frames size of 1600x1200 to output a reasonable quality video.

    (default: -r 10 -s:v 800x600 -c:v libx264 -crf 25 -filter:v scale=-2:956 -pix_fmt yuv420p)

  • --project-rendering -

    Enable generation of videos from imagized files created as a result of running the proc.imagize plugin. See Rendering for details.

Execution Engine Visual Capture#

SIERRA can direct execution engines to capture frames during experiments. The captured frames must:

  • Meet all of the requirements.

  • Output files in PNG format with a .png extension.

To use, pass --engine-vc during stage 4.

Project Rendering#

If a project has generated images using the imagize plugin in stage 3 via --proc proc.imagize, then they can be rendered into videos in stage 4.

To use:

  • Pass --project-rendering during stage 4 after running imagizing via --proc proc.imagize during stage 3, either on the same invocation or a previous one. SIERRA will take the imagized files previously created and generate a set of a videos in <batch_root>/videos/<exp>/<subdir> for each experiment in the batch which was run, where <subdir> corresponds to the src_stem of a configured imagizing directory.

Important

Rendering the heatmaps does not happen automatically every time as part of stage 4 because it can take a LONG time and is idempotent. You should only pass --project-rendering the first time you run stage 4 after having run stage 3 with --proc proc.imagize.

Examples#

From the ARGoS sample project, capturing the arena overhead:

Or, multiple cameras + interpolation: