Using LibArgus or MMAPI for Live Camera Streaming, Image Capturing and Dynamic Parameter Adjustment on NVIDIA Jetson SOM

I am working with an NVIDIA Jetson SOM and need guidance on utilizing the ISP-related features for the following requirements:

  1. Capturing Images: Ability to capture high-quality still images.
  2. Live Streaming: Displaying live camera feeds.
  3. Dynamic Parameter Adjustment: Changing parameters like wbmode, saturation, exposure, etc., during live streaming.

I have seen references in the forums to use libargus or L4T Multimedia API. For example, commands like the following are useful for setting initial parameters:

gst-launch-1.0 nvarguscamerasrc wbmode=4 saturation=1 ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1’ ! nvvidconv flip-method=0 ! ‘video/x-raw, width=960, height=616’ ! nvvidconv ! nvegltransform ! nveglglessink -e

However, I want to know:

  1. How to dynamically change parameters like wbmode or saturation while the stream is running?
  2. How to utilize the tegra_multimedia_api and specifically the argus_camera application for these use cases?
  3. The best practices for integrating libargus or MMAPI in custom applications for advanced control over camera features.

I found suggestions about building the tegra_multimedia_api and using the argus_camera sample application. Can you provide:

  • Steps to install and build tegra_multimedia_api.
  • Guidance on how to modify the argus_camera example for custom needs.
  • Any additional resources or code samples that would help me get started.

Thank you for your assistance!

Which Jetson SoM and JetPAck SW you’re using?

I am using Jetson Nano SOM & SW: nvidia-l4t-core 32.7.6-20241104234540

Hi,
You may consider implement the advancing functions in nvarguscamerasrc. It is open source and you can manually build it. Please download the source code:

Jetson Linux R32.7.6 | NVIDIA Developer
Driver Package (BSP) Sources

Document of Argus APIs:

Jetson Linux API Reference: Libargus Camera API | NVIDIA Docs

The jetson_multimedia_api samples can be installed through apt commands:

$ sudo apt update
$ sudo apt install nvidia-l4t-jetson-multimedia-api

The samples are installed to

/usr/src/jetson_multimedia_api

I reviewed the Argus API documentation but need help understanding how to integrate it with nvarguscamerasrc.

Dynamic Parameter Adjustment:
    How can I use nvarguscamerasrc to implement dynamic parameter adjustments (e.g., changing wbmode or exposure during streaming)?
    Is there a specific example in the Jetson Multimedia API or Argus API documentation that demonstrates this?

Building and Modifying nvarguscamerasrc:
    Could you provide a step-by-step guide to manually build and modify nvarguscamerasrc from the BSP sources?
    Once modified, how can I integrate the rebuilt plugin back into the GStreamer framework?

Connecting Argus API to nvarguscamerasrc:
    The Argus API seems to allow direct access to ISP features. Should I focus on using Argus directly instead of modifying nvarguscamerasrc?
    If I modify nvarguscamerasrc, how do I call Argus API functions from within it?

Hi,
Please download the source code and follow README to build nvarguscamerasrc. The plugin is implemented through Argus APIs and you can add additional controls.

You mean to download “Driver Package BSP Sources” ? And follow the readme to build nvarduscamerasrc ?

https://developer.nvidia.com/embedded/linux-tegra-r3276

Hi,
Yes, please download the package and extract it.

I downloaded & extracted the source file.
Here is the screenshot image I attached below, have a look once…

Now guide me how to perform next step…

Thanks.

I also extracted “gst-nvarguscamera_src.tbz2”. Am I following right path ?

Here is the content I found inside “gst-nvarguscamera_src.tbz2”
ls
3rdpartyheaders.tbz2 gstnvarguscamera_utils.cpp Makefile README.txt
gstnvarguscamerasrc.cpp gstnvarguscamera_utils.h nvbufsurface.h
gstnvarguscamerasrc.hpp gstnvdsbufferpool.h nvbuf_utils.h

Please guide me how do I take next step !!

Thanks…

Hi,
Please follow README.txt to build the plugin. And you can check source code in gstnvarguscamerasrc.cpp

I try to build nvgstapp_src but it gives me some dependency error, how to solve this.
My l4tversion is : 35.6.0 I am using XavierNX SOM

/nvgstapps_src/nvgst_sample_apps/nvgstcapture-1.0$ gcc nvgstcapture.c nvgst_x11_common.c -o nvgstcapture-1.0 \

$(pkg-config --cflags --libs gstreamer-1.0 gstreamer-plugins-base-1.0 \
gstreamer-pbutils-1.0 x11 xext gstreamer-video-1.0) -ldl

In file included from nvgstcapture.c:25:
nvgstcapture.h:40:10: fatal error: eglapiinterface.h: No such file or directory
40 | include <eglapiinterface.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.

Hi,
The Jetson device is Xavier NX with r35.6? The topic is in Jetson Nano so we think you use Jetpack 4.

I switched to Jetson XavierNX but I wont be able to build.

I follow this instruction first:


                        Procedure to compile nvgstcapture-1.0:

On the target, execute the following commands:

sudo apt-get install libgstreamer-plugins-base1.0-dev
sudo apt-get install libegl1-mesa-dev
sudo apt-get install libx11-dev libxext-dev

As the above steps will overwrite the sym-links to the hardware accelerated libegl
binary, to point back to the tegra version, execute the following commands:

Export ARM application binary interface based on the Linux and ARM platform:
Linux 64bit userspace support:
export TEGRA_ARMABI=aarch64-linux-gnu
Linux 32bit userspace and ARM hardfp support:
export TEGRA_ARMABI=arm-linux-gnueabihf

cd /usr/lib/${TEGRA_ARMABI}
sudo rm -f libEGL.so
sudo ln -s tegra-egl/libEGL.so.1 libEGL.so
sudo rm -f libGLESv2.so
sudo ln -s tegra-egl/libGLESv2.so.2 libGLESv2.so

cd nvgstapps_src/nvgst_sample_apps/nvgstcapture-1.0
gcc nvgstcapture.c nvgst_x11_common.c -o nvgstcapture-1.0
$(pkg-config --cflags --libs gstreamer-1.0 gstreamer-plugins-base-1.0
gstreamer-pbutils-1.0 x11 xext gstreamer-video-1.0) -ldl

While compiling it gives error:

gcc nvgstcapture.c nvgst_x11_common.c -o nvgstcapture-1.0 \

$(pkg-config --cflags --libs gstreamer-1.0 gstreamer-plugins-base-1.0 \
gstreamer-pbutils-1.0 x11 xext gstreamer-video-1.0) -ldl

In file included from nvgstcapture.c:25:
nvgstcapture.h:40:10: fatal error: eglapiinterface.h: No such file or directory
40 | include <eglapiinterface.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
ubuntu:~/nvgstapps_src/nvgst_sample_apps/nvgstcapture-1.0$

I used this command to find eglapiinterface.h but couldn’t find that too. How to resolve this issue.

find ~/nvgstapps_src -name eglapiinterface.h

Hi,
This may be due to mismatch of version. Please download the source code from

Jetson Linux | NVIDIA Developer

And follow README to build nvarguscamerasrc

I downloaded L4T NV GST Apps sources 24.2.3
I downloaded from here: