Software encoding with x264enc Jetson Orin Nano Issue

Hi,

I have an OpenCV program that initializes 3 GStreamer pipelines that grab video streams and send them to a server on a Windows host PC using imagezmq. I am able to stream all 3 to the host but have a lot of latency when I show all 3 streams. With two it works almost real-time. I want to try encoding the stream so that I can send less data, then decode on the host PCs end which could hopefully help with latency.

My issue is that when I tried looking into how to do this, I saw that the Orin Nano only supports software encoding. So I am trying to create my pipeline with x264enc but cannot get it working.

I am using an Jetson Orin Nano with Jetpack 6.0. My current pipeline looks like

pipeline1 = (
    "v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=640,height=360,framerate=30/1 ! "
    "videoconvert ! queue max-size-buffers=2 ! appsink drop=1"
)
pipeline2 = (
    "v4l2src device=/dev/video2 ! video/x-raw,format=YUY2,width=640,height=360,framerate=30/1 ! "
    "videoconvert ! queue max-size-buffers=2 ! appsink drop=1"
)
pipeline3 = (
    "v4l2src device=/dev/video4 ! video/x-raw,format=YUY2,width=640,height=360,framerate=30/1 ! "
    "videoconvert ! queue max-size-buffers=2 ! appsink drop=1"
)

How can I get it working with encoding? Would this be the best solution for my problem or is there a better way I should look in to? Thanks in advance for any help!

Hi,
We would suggest run 3 gst-launch-1.0 commands to do UDP stream. Please refer to

Jetson AGX Orin FAQ
Q: Is there an example for running UDP streaming?

You can run the commands like:

// pipeline 1
$ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,width=640,height=360,framerate=30/1 ! videoconvert ! queue max-size-buffers=2 ! x264enc ! h264parse ! rtph264pay ! udpsink host=10.19.106.10 port=5000 sync=0

Please replace 10.19.106.10 with IP address of the host PC. And use different port(such as 5001, 5002) for pipeline 2 and pipeline 3.

Or you can consider use RTSP.

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