FFmpeg vs GStreamer for GMSL camera encoding

I should start by saying I’m new in the NVIDIA Jetson ecosystem. Recently I have acquired the BOXER-8645AI machine, from AAEON. It runs NVIDIA Jetson AGX Orin.

In a previous project, I was capturing videos from USB cameras using FFmpeg. Now, I am trying to take advantage of the GMSL camera inputs in the new machine, so I also acquired GMSL cameras to go with it.

I started by trying the same approach from before, and capture from the GMSL cameras using FFmpeg as well. But the frame rate was always around 10. Then I found out the vendor of the computer suggests using GStreamer when working with theses cameras, and even suggests a specific capturing command. It works very well, reaching 30 fps, although the quality of the video seems lower than the one I got with FFmpeg.

In short, what I’d like to know is if that’s expected in this case. Should I expect to be able to reach 30 fps using FFmpeg by tweaking my command, or is it just better to stick to GStreamer? The reason I’m asking is that later steps in my workflow will have to change in case I can’t get FFpeg to work, because GStreamer does not have some functionalities I was used to.

For reference, these aere the commands I use:

  • FFmpeg command:
    ffmpeg -f v4l2 -pixel_format uyvy422 -video_size 1920x1080 -i /dev/video0 -c:v libx264 -vsync vfr video.mkv

  • GStreamer command:
    gst-launch-1.0 v4l2src device=/dev/video0 ! \
    “video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1080” ! \
    nvvidconv ! “video/x-raw(memory:NVMM), format=(string)I420, width=(int)1920, height=(int)1080” ! \
    nvv4l2h264enc ! h264parse ! matroskamux ! filesink location=video.mkv

Hi,

For the camera basic functionality first needs to check the device and driver configuration.
You can reference to below program guide for the detailed information of device tree and driver implementation.
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html?highlight=programing#sensor-software-driver-programming

Please refer to Applications Using V4L2 IOCTL Directly by using V4L2 IOCTL to verify basic camera functionality.
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html?highlight=programing#to-run-a-v4l2-ctl-test

Once confirm the configure and still failed below link help to get log and some information and some tips for debug.
https://elinux.org/Jetson/l4t/Camera_BringUp#Steps_to_enable_more_debug_messages

Thanks!

Hi,
We would suggest use gstreamer or jetson_multimedia_api. Please try nvv4l2camerasrc as suggested in

Jetson AGX Orin FAQ
Q: I have a USB camera. How can I launch it on AGX Orin?

Or try the sample:

/usr/src/jetson_multimedia_api/samples/12_v4l2_camera_cuda

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.