NVIDIA Jetson Xavier - Video Capture and Display using Libargus Multimedia API

From RidgeRun Developer Connection
Jump to: navigation, search



Previous: Video Capture and Display/Software Support/GStreamer Index Next: Processors



Nvidia-preferred-partner-badge-rgb-for-screen.png




Argus Samples

JetPack comes with a set of examples that demonstrate the usage of libargus in different scenarios including GStreamer, CUDA, snapshot, and face detection, among others.

You will find libargus in the Tegra Multimedia API package in jetpack_downloads. In order to build them follow the next steps:

1. Copy the Tegra Multimedia API package into your Xavier file system (for this guide we are using: Tegra_Multimedia_API_R31.0.2_aarch64.tbz2)

2. Install the following packages:

sudo apt-get install build-essential pkg-config libx11-dev libgtk-3-dev libjpeg-dev libegl1-mesa-dev libgles2-mesa-dev libgstreamer1.0-dev


3. Build argus:

 cd tegra_multimedia_api/argus/
 mkdir build
 cd build
 cmake ..
 make

Samples Description

Sample Description
00_video_decode

Decodes H.264/H.265/VP9 video from a local file and then either saves it to a file or displays it.

01_video_encode

Decodes video from a local file and then encodes it as a H.264/H.265 video file.

02_video_dec_cuda

Decodes H.264/H.265 video from a local file and then shares the YUV buffer with CUDA to draw a black box in the left corner.

03_video_cuda_enc

Use CUDA to draw a black box in the YUV buffer and then feeds it to the video encoder to generate an H.264/H.265 video file.

04_video_dec_trt

Uses simple TensorRT calls to save the bounding box info to a file.

05_jpeg_encode

Uses libjpeg-8b APIs to encode JPEG images from software-allocated buffers.

06_jpeg_decode

Uses libjpeg-8b APIs to decode a JPEG image from software-allocated buffers.

07_video_convert

Uses V4L2 APIs to do video format conversion and video scaling.

08_video_dec_drm

Uses the NVIDIA® Tegra® Direct Rendering Manager (DRM) to render video stream or UI.

09_camera_jpeg_capture

Simultaneously uses Libargus API to preview camera stream and libjpeg-8b APIs to encode JPEG images.

10_camera_recording

Gets the real-time camera stream from the Libargus API and feeds it into the video encoder to generate H.264/H.265 video files.

12_camera_v4l2_cuda

Captures images from a V4L2 Camera and shares the stream with CUDA engines to draw a black box in the upper left corner.

13_multi_camera

Captures multiple cameras and composites them to one frame.

Backend

Performs intelligent video analytics on four concurrent video streams going through a decoding process using the on-chip decoders, video scaling using on-chip scalar, and GPU compute.

Frontend

Performs independent processing on four different resolutions of video capture coming directly from the camera.

v4l2cuda (capture-cuda)

Uses V4L2 image capturing with CUDA format conversion.



Previous: Video Capture and Display/Software Support/GStreamer Index Next: Processors