Hello, I see that Jetson Orin Nano has no hardware video encode capabilities. It has only 1080p30 supported by 1-2 CPU cores. My first question is what does it mean and how can I use this supporting very efficiently? Second, how can I stream it from my Jetson to a different host PC at maximum speed using the gstreamer pipeline? Thanks for your answers.
*** Please note that this reply is generated by LLM automatically ***
The Jetson Orin Nano has limited hardware video encoding capabilities, which means it relies on software-based encoding for higher resolutions and frame rates. The 1080p30 support by 12 CPU cores indicates that the Jetson Orin Nano can encode 1080p video at 30 frames per second using the CPU cores.
To use this capability efficiently, you can utilize the Argus Camera Software Encode Sample, which provides a software-based encoding solution for the Jetson Orin Nano. This sample demonstrates how to use the Argus API to capture and encode video from a camera module.
Here’s a step-by-step guide to get you started:
- Build and run the Argus Camera Software Encode Sample:
- Clone the Jetson Linux repository and navigate to the
multimediadirectory. - Build the Argus Camera Software Encode Sample using the provided
Makefile. - Run the sample using the
argus_cameraexecutable.
- Clone the Jetson Linux repository and navigate to the
- Configure the encoding settings:
- Use the
argus_cameracommand-line options to configure the encoding settings, such as resolution, frame rate, and bitrate. - For example, you can use the
--resolutionoption to set the resolution to 1080p and the--framerateoption to set the frame rate to 30.
- Use the
- Stream the encoded video to a different host PC using GStreamer:
- Use the
gst-launch-1.0command to create a GStreamer pipeline that captures the encoded video from the Jetson Orin Nano and streams it to a different host PC. - For example, you can use the
udpsinkelement to stream the video over UDP to a host PC running a GStreamer receiver pipeline.
- Use the
Here’s an example GStreamer pipeline that captures the encoded video from the Jetson Orin Nano and streams it to a host PC:
gst-launch-1.0 -v arguscamerasrc ! video/x-raw(memory:NVMM) ! nvvidconv ! video/x-raw(memory:NVMM) ! omxh265enc ! rtph265pay ! udpsink host=192.168.1.100 port=5000
This pipeline captures the encoded video from the Jetson Orin Nano using the arguscamerasrc element, converts it to a format suitable for streaming using the nvvidconv element, encodes it using the omxh265enc element, and streams it to a host PC using the udpsink element.
On the host PC, you can use a GStreamer receiver pipeline to receive the streamed video and display it. For example:
gst-launch-1.0 -v udpsrc port=5000 ! application/x-rtp ! rtph265depay ! h265parse ! nvv4l2decoder ! video/x-raw(memory:NVMM) ! nvvidconv ! video/x-raw(memory:NVMM) ! xvimagesink
This pipeline receives the streamed video using the udpsrc element, depays the RTP packets using the rtph265depay element, parses the H.265 bitstream using the h265parse element, decodes the video using the nvv4l2decoder element, and displays it using the xvimagesink element.
Note that you may need to adjust the pipeline settings and parameters to optimize the streaming performance and quality for your specific use case.
*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***
Does 2 or 1 CPU core usage occur automatically? What should I do to ensure full power usage? How and by what criteria is core usage determined?
Also in HOST PC, can I use ffmpeg instead of gstreamer? (while still using gstreamer in jetson for stream)
Hi,
Please refer to
Software Encode in Orin Nano — NVIDIA Jetson Linux Developer Guide
If you would like to user gstreamer, you can use x264enc. There are examples of setting RTSP or UDP:
For RTSP, the server command is like:
$ ./test-launch "videotestsrc is-live=1 ! x264enc ! h264parse ! rtph264pay name=pay0 pt=96"
For UDP, it is like:
$ gst-launch-1.0 videotestsrc is-live=1 ! video/x-raw,width=1280,height=720,format=I420 ! x264enc ! h264parse ! rtph264pay ! udpsink host=10.19.106.10 port=5000 sync=0
You can run $ sudo tegrastats to get the CPU loading:
Tegrastats Utility — NVIDIA Jetson Linux Developer Guide
Hi, I discovered that there is a patch for ffmpeg for the Jetson series at GitHub - Keylost/jetson-ffmpeg: ffmpeg support on nvidia jetson with hardware support (i.e. use of the CUDA).
There is a complete how-to for the build BUT be aware that, if you are used to ffmpeg on Windows, and choose to patch the latest 7 or 8 version this has a few drawback like "-o file.jpg" stopped working · Issue #9053 · mpv-player/mpv · GitHub.
I recommend to build this version and NOT installing it so you can continue to use the “official” nvidia repository which is stuck to version 4.4 and when needed go to your ~/ffmpeg folder and run the built version. (NB: I am not a Linux expert and there might be better options but that one works!)
As for using your Jetson Orin Nano for streaming, and if you are as lazy as I am, I can only recommend PlexMediaServer which is free as long as you don’t need access from the internet (and even so it’s only some 80 USD/year). I have used it for years now (started on a Jetson Nano) for streaming movies, TV series and Music, and I wouldn’t go for anything else. The only drawback is that you have to follow their structure for storing media, but a few symlink would usually solve the issue.
Happy to help and/or answer questions if required …