NVIDIA Tegra
DRIVE 5.0 Linux Open Source Software

Development Guide
5.0.10.3 Release


 
Video Demo (nvmvid_play)
 
Command Line Options
Required Commands
Optional Commands
Examples
Basic Playback
Display Options
De-Interlacing Options
Save Decoded Frames to Output File
Playback Duration
This topic describes how to use the nvmvid_play sample application for stream decoding and playback. The following stream types are supported:
MPEG
MPEG-4
VC1
H.264
H.265
VP8
VP9
Command Line Options
The following shows the command syntax.
./nvmvid_play [options]
Required Commands
The following table describes the required command line arguments.
Option
Parameter
Description
-c
[codec_type]
Specifies numeric or textual codec type. You can specify it with integers:
1: MPEG
2: MPEG-4
3: VC1
4: H.264
5: VP8
6: H265
7: VP9
Or with strings:
mpeg
mpeg4
vc1
h264
vp8
h265
vp9
-f
[input_file]
Specifies the input file to decode.
Optional Commands
The following table describes the optional command line arguments.
Option
Parameter
Description
-t
N/A
Specifies to display decode timing information. Default: Not displayed.
-r
[frame_rate]
Specifies the frame rate (frames per second).
-n
[frames_number]
Specifies the minimum number of frames to decode. Default: Whole stream.
-l
[loops_number]
Specifies the number of playback loops. Default: 1.
-s
[output_file]
Specifies the output YUV file name. Default: No file produced.
-i
[mode]
Specifies De-Interlacing mode.
0: Off (default)
1: BOB
2: Advanced frame Rate
3: Advanced field Rate
-ia
[algorithm]
Specifies the de-interlacing algorithm. This parameter is used only for advanced de-interlacing modes.
1: Advanced1 (default)
2: Advanced2
-id
[instance_id]
Specifies the nvdec instance id to be used for decoding.
Permissible values are 0 and 1. Default: 0
-it
N/A
Specifies to use Inverse-Telecine. Default: Off.
-fq
[filter_quality]
Specifies the filter quality.
1: Low
2: Medium
3: High
-a
[aspect_ratio]
Specifies the aspect ratio.
-v
[logging_level]
Specifies verbose logging. Higher logging levels also include the lower-level logging messages.
0: Errors (default)
1: Warnings
2: Info
3: Debug
-d
[display_id]
Specifies the display ID. Default: No display.
-w
[window_id]
Specifies the window ID. Default: 1.
-p
[window_position]
Specifies the display window position, in pixels. Default: full screen. Input format: x0:y0:width:height
-z
[window_depth]
Specifies window depth. Permissible values are [0-255]. Default: 1.
-h
N/A
Prints usage and help menu.
Examples
The nvmvid_play application can be used for stream decoding. Decoded frames can be displayed on screen (playback) or saved to output YUV file. This section provides several usage scenarios.
Basic Playback
This command starts a playback of the disney.264 H.264 stream on display ID 0. By default, full-screen resolution is used on window ID 0.
./nvmvid_play -c 4 -f disney.264 -d 0
Display Options
This section provides two examples of display option usage.
Display Window Manipulation Example
This command is an example of display window manipulation:
./nvmvid_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 2 and position:
x0=100
y0=200
width=500
height=600 Window depth is set to 20 (depth range is 0-255).
De-Interlacing Options
This section provides four examples de-interlacing option usage.
Bob De-Interlacing
./nvmvid_play -c 1 -f HQV_Jaggies1.m2v -d 0 -i 1
This example performs BOB De-interlacing on the displayed content.
Field-Rate Mode, Advanced 2 De-Interlacing
./nvmvid_play -c 1 -f HQV_Jaggies1.m2v -d 0 -i 3 -ia 2
This example performs advanced2 field-rate de-interlacing on the displayed content.
Field-Rate Mode, Advanced 1 De-Interlacing + Inverse-Telecine
./nvmvid_play -c 1 -f HQV_Jaggies1.m2v -d 0 -i 3 -ia 1 -it
This example performs the following on the decoded frames:
Advanced2 field-rate de-interlacing, and
Inverse-Telecine.
Frame-Rate, Advanced 2 De-Interlacing
./nvmvid_play -c 1 -f HQV_Jaggies1.m2v -d 0 -i 2 -ia 1
This example performs advanced1 frame-rate de-interlacing on the decoded frames.
Save Decoded Frames to Output File
./nvmvid_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
This section provides four examples de-interlacing option usage.
Number of Frames to Decode
./nvmvid_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
./nvmvid_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.