DRIVE 5.0 Linux Open Source Software

Development Guide Release

Image Play (nvmimg_play)
Command Line Options
Required Commands
Optional Commands
Basic Playback
Display Option Examples
Playback Duration Examples
This topic describes how to use the nvmimg_play sample application for stream decoding. The sample supports the following bitstream types:
Command Line Options
The following shows the command syntax.
$ ./nvmimg_play [options]
Required Commands
The following table describes the required command line arguments.
Specifies numeric or textual codec type. You can specify it with integers:
1: H.264
2: H265
Or with strings:
Specifies the input file to decode.
Optional Commands
The following table describes the optional command line arguments.
Specifies the frame rate, in frames per second.
Specifies the minimum number of frames to decode. Default: Whole stream.
Specifies a filename where output YUV is saved.
Specifies verbose logging. Higher logging levels also include the lower-level logging messages.
0: Errors (default)
1: Warnings
2: Info
3: Debug
Specifies the display ID. Default: No display.
Specifies the window ID. Default: 1.
Specifies the display window position, in pixels. Default: full screen. Input format:
Specifies window depth. Permissible values are [0-255]. Default: 1.
Prints usage and help information.
Specifies nvdec instance id to be used for decoding. Permissible values are 0 and 1. Default: 0
The nvmimg_play application performs stream decoding. It can display decoded frames on the screen (playback) and/or save decoded frames to an output YUV file. This section provides examples on how to run the application.
Basic Playback
The following command starts a playback of the disney.264 file on window ID 0.
$ ./nvmimg_play -c 4 -f disney.264 -d 0
Display Option Examples
This section provides two examples of display option usage.
Display Window Manipulation
This command is an example of display window manipulation:
$ ./nvmimg_play -c 4 -f disney.264 -d 0 -w 2 -z 20 -p 100:200:500:600
In this example:
Playback starts on display ID 0.
Window number is 2.
Position is:
Window depth is set to 20 (depth range is 0-255).
Save Decoded Frames to Output File
$ ./nvmimg_play -c 4 -f disney.264 -s disney_out.yuv
This example decodes the disney.264 stream and saves the decoded frames to the disney_out.yuv file.
Playback Duration Examples
Number of Frames to Decode
$ ./nvmimg_play -c 4 -f disney.264 -d 0 -n 100
This example streams to display ID 0 the first 100 frames from the disney.264 file.
Number of Loops
$ ./nvmimg_play -c 4 -f disney.264 -d 0 -l 10
This example plays disney.264 10 times and streams the video to display ID 0.