Image Capture Sample#

Description#

The Image Capture sample shows how to record a video from an NVIDIA® CUDA® image or directly from the rendering window. To differentiate the two sources, the sample renders different text on the screen.

Running the Sample#

The command line for the sample is:

./sample_image_capture [options]

Options#

The sample accepts the following optional arguments:

--capture-bitrate={integer}[=10000000]#

Defines the suggested bitrate for the output file. The actual bitrate might be different, depending on the input. For example, if the input is a black windows the output frame rate will be very close to 0.

--capture-file={file.h264}[=capture.h264]#

Specifies the path to the captured video.

--capture-framerate={integer}[=30]#

Specifies the rate at which frames are captured.

--capture-screen=0|1[=0]#

Specifies whether to capture the current window on a synthetic CUDA image.

See also Common Options.

Note

Depending on --capture-file, you may need to start the sample with sudo.

Example#

To record with default parameters in a specific output file#

./sample_image_capture --capture-file=path/to/captureOutput.h264

Output#

The sample creates a window and renders a coloured pattern and a floating “DriveWorks” text.

  • When recording directly from screen, the text is also visible in the recording.

  • When recording from a synthetic CUDA image, there is no rendered text.

Image Screen Capture

Image Screen Capture#

Additional information#

For more information, see Image.