JetPack on AGX Orin with RHEL: Hardware Video Encoding/Decoding (NVMPI) Fails in Headless Environment

Hi everyone,

I am trying to deploy JetPack on an NVIDIA AGX Orin running Red Hat Enterprise Linux (RHEL) instead of Ubuntu because our project requires a RHEL-based environment for security and deployment reasons.

Current Status

I have successfully:

  • Installed RHEL on the AGX Orin with headless.

  • Built and installed the jetson-ffmpeg library.

  • Patched and built FFmpeg 4.2.11 with NVMPI support.

  • Verified that the NVMPI codecs are available:

ffmpeg -encoders | grep nvmpi
h264_nvmpi
hevc_nvmpi
ffmpeg -decoders | grep nvmpi
h264_nvmpi
hevc_nvmpi
mpeg2_nvmpi
mpeg4_nvmpi
vp8_nvmpi
vp9_nvmpi

I also verified that software transcoding works correctly. For example:

ffmpeg -i input.ts -c:v libx264 -c:a copy output.mp4

completes successfully.

Problem

The issue occurs only when using the Jetson hardware codecs.

For example:

ffmpeg -i input.ts -c:v h264_nvmpi output.mp4

fails with

nvbufsurftransform: Could not get EGL display connection

and eventually ends with a segmentation fault.

Similarly,

ffmpeg -i input.ts -c:v hevc_nvmpi output.mp4

fails in the same way.

I also tested the V4L2 hardware encoders:

-c:v h264_v4l2m2m

and

-c:v hevc_v4l2m2m

but FFmpeg reports:

Could not find a valid device
can't configure encoder

Environment

The Orin is currently accessed through SSH in a headless configuration.

There is no active graphical session:

echo $DISPLAY
DISPLAY: Undefined variable.

Also,

ls /dev/video*

returns no devices, and

ls /dev/nvhost-msenc

reports that the device does not exist.

However, other NVIDIA device nodes (such as /dev/nvhost-gpu) are present, and tegrastats runs normally.

My Questions:

  1. Has anyone successfully used NVMPI hardware encoding/decoding on AGX Orin running RHEL?

  2. Does the NVMPI implementation require an active EGL/X11 display, or should it also work in a completely headless environment?

  3. Is there any additional JetPack component, kernel driver, or multimedia package that must be installed on RHEL to expose the hardware video encoder?

  4. Should /dev/nvhost-msenc (or equivalent encoder device nodes) exist on a properly configured RHEL installation?

Any guidance or suggestions would be greatly appreciated.

Thank you!

Thanks for the detailed report. I can see you’ve already verified that NVMPI codecs are available and that software transcoding works, which is helpful. To help diagnose why hardware encoding is failing in your headless environment, I need a few more details:

  1. JetPack version: What exact JetPack version are you running on RHEL? (e.g., JetPack 5.1.2, 6.0, etc.) Also, has NVIDIA officially certified this JetPack release for RHEL on AGX Orin, or are you running an Ubuntu-based JetPack on RHEL?

  2. Kernel version: Please share the output of uname -r so I can check if the multimedia and video encoder drivers are available for your kernel.

  3. Device enumeration: Can you run ls -la /dev/nvhost-* /dev/video* and share the full output? This will show which hardware encoder/decoder devices are present or missing.

  4. Multimedia packages: Please confirm whether nvidia-l4t-multimedia (or equivalent RHEL package) is installed. Run rpm -qa | grep -i nvidia or dpkg -l | grep -i nvidia to list installed NVIDIA packages.

  5. Headless NVMPI support: The EGL display error suggests NVMPI may require an active X11 display or EGL context. Have you tried using a dummy X11 display (e.g., Xvfb) or an offscreen EGL context? If not, that might be the root cause.

Once I have these details, I can point you toward the right solution—whether that’s a missing driver, a configuration change, or a known limitation with RHEL support.

Thanks for the quick response, here are the answers of your questions:

  1. Jetpack version: I followed this Link to install, i think i downloaded an Ubuntu-based JetPack
$ cat /etc/nv_tegra_release
# R36 (release), REVISION: 4.0, GCID: 37537400, BOARD: generic, EABI: aarch64, DATE: Fri Sep 13 04:36:44 UTC 2024
# KERNEL_VARIANT: oot
TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib64/nvidia

$ uname -r
5.14.0-427.42.1.el9_4.aarch64

$ uname -r
5.14.0-427.42.1.el9_4.aarch64
162 osi@aerostat()[osi_sys26_0_0_int_tml3:tml3.AEROSTAT_APY11:10] ~ $ ls -la /dev/nvhost-* /dev/video*
crw-rw----. 1 root video 501,  0 Dec 31  1969 /dev/nvhost-as-gpu
crw-rw----. 1 root video 501,  2 Dec 31  1969 /dev/nvhost-ctrl-gpu
crw-rw----. 1 root video 507,  0 Mar 17  2024 /dev/nvhost-ctrl-nvdla0
crw-rw----. 1 root video 505,  0 Mar 17  2024 /dev/nvhost-ctrl-nvdla1
crw-rw----. 1 root video 504,  0 Mar 17  2024 /dev/nvhost-ctrl-pva0
crw-rw----. 1 root root  501,  3 Dec 31  1969 /dev/nvhost-ctxsw-gpu
crw-rw----. 1 root root  501,  4 Dec 31  1969 /dev/nvhost-dbg-gpu
crw-rw----. 1 root video 501,  1 Dec 31  1969 /dev/nvhost-gpu
crw-rw----. 1 root video 501, 10 Dec 31  1969 /dev/nvhost-nvsched_ctrl_fifo-gpu
crw-rw----. 1 root video 501,  9 Dec 31  1969 /dev/nvhost-nvsched-gpu
crw-rw----. 1 root video 502,  0 Dec 31  1969 /dev/nvhost-power-gpu
crw-rw----. 1 root root  501,  6 Dec 31  1969 /dev/nvhost-prof-ctx-gpu
crw-rw----. 1 root root  501,  7 Dec 31  1969 /dev/nvhost-prof-dev-gpu
crw-rw----. 1 root root  501,  5 Dec 31  1969 /dev/nvhost-prof-gpu
crw-rw----. 1 root root  501,  8 Dec 31  1969 /dev/nvhost-sched-gpu
crw-rw----. 1 root video 501, 11 Dec 31  1969 /dev/nvhost-tsg-gpu
$ rpm -qa | grep -i nvidia
pcp-pmda-nvidia-gpu-6.2.0-1.el9.aarch64
libnvidia-container1-1.17.8-1.aarch64
libnvidia-container-tools-1.17.8-1.aarch64
nvidia-container-toolkit-base-1.17.8-1.aarch64
nvidia-container-toolkit-1.17.8-1.aarch64
nvidia-jetpack-core-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-cuda-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-init-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-multimedia-utils-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-nvsci-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-multimedia-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-camera-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-x11-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-wayland-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-3d-core-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-gbm-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-gstreamer-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-pva-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-vulkan-sc-sdk-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-nvfancontrol-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-nvpmodel-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-cuda-utils-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-dla-compiler-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-firmware-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-nvml-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-tools-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-kmod-modprobe-36.4.0_5.14.0_427.42.1~20240912212859-1.el8.aarch64
nvidia-jetpack-kmod-36.4.0_5.14.0_427.42.1~20240912212859-1.el8.aarch64
nvidia-jetpack-all-36.4.0~20240912212859-1.el8.aarch64

$pkg -l | grep -i nvidia
dpkg: Command not found.
  1. I did not use a dummy X11 display (e.g., Xvfb) or an offscreen EGL context. I even do not know how to setup. Will definitely investigate this approach.

Thanks for your willingness to investigate this further. Here are the concrete next steps to help diagnose the NVMPI hardware encoding issue on your RHEL system:

1. Test Xvfb (Dummy X11 Display)
Since the error mentions missing EGL display connection, try creating a virtual X11 display:

Xvfb :99 -screen 0 1024x768x24 &
export DISPLAY=:99
# Then retry your NVMPI encoding test

If this resolves the EGL error, it confirms the issue is display-related rather than a missing driver.

2. Check Device Nodes
Verify which device nodes are present on your system:

ls -la /dev/video*
ls -la /dev/nvhost-*

Compare this output with a working Ubuntu JetPack system if possible. Missing /dev/nvhost-msenc suggests a kernel driver or module loading issue.

3. Verify RHEL-Specific Packages
Confirm all multimedia packages are installed:

rpm -qa | grep nvidia-jetpack
rpm -qa | grep multimedia

Check if there are RHEL-specific kernel modules that need to be loaded for hardware encoding support.

4. Check Kernel Modules
List loaded NVIDIA modules:

lsmod | grep nvidia

If nvhost_msenc or similar encoding modules are missing, they may need to be explicitly loaded or compiled for your RHEL kernel version.

Please share the output of these commands, and we can narrow down whether this is a RHEL support gap, a configuration issue, or a missing kernel module.

  1. I tried your suggestion, but still has errors by running a h264_nvmpi decoder. here is my log
Splitting the commandline.
Reading option '-hide_banner' ... matched as option 'hide_banner' (do not show program banner) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'lavfi'.
Reading option '-i' ... matched as input url with argument 'testsrc=size=1280x720:rate=30'.
Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '5'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv420p'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'h264_nvmpi'.
Reading option 'encoder_test.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option hide_banner (do not show program banner) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url testsrc=size=1280x720:rate=30.
Applying option f (force format) with argument lavfi.
Successfully parsed a group of options.
Opening an input file: testsrc=size=1280x720:rate=30.
detected 8 logical cores
[Parsed_testsrc_0 @ 0x2b223c30] Setting 'size' to value '1280x720'
[Parsed_testsrc_0 @ 0x2b223c30] Setting 'rate' to value '30'
[Parsed_testsrc_0 @ 0x2b223c30] size:1280x720 rate:30/1 duration:-1.000000 sar:1/1
[AVFilterGraph @ 0x2b293f50] query_formats: 2 queried, 1 merged, 0 already done, 0 delayed
[lavfi @ 0x2b2937d0] All info found
Input #0, lavfi, from 'testsrc=size=1280x720:rate=30':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0, 1, 1/30: Video: rawvideo, 1 reference frame (RGB[24] / 0x18424752), rgb24, 1280x720 [SAR 1:1 DAR 16:9], 0/1, 30 tbr, 30 tbn, 30 tbc
Successfully opened the file.
Parsing a group of options: output url encoder_test.mp4.
Applying option t (record or transcode "duration" seconds of audio/video) with argument 5.
Applying option pix_fmt (set pixel format) with argument yuv420p.
Applying option c:v (codec name) with argument h264_nvmpi.
Successfully parsed a group of options.
Opening an output file: encoder_test.mp4.
[file @ 0x2b21c000] Setting default whitelist 'file,crypto'
Successfully opened the file.
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvmpi))
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[rawvideo @ 0x2b297a60] PACKET SIZE: 2764800, STRIDE: 3840
[graph 0 input from stream 0:0 @ 0x2b221a20] Setting 'video_size' to value '1280x720'
[graph 0 input from stream 0:0 @ 0x2b221a20] Setting 'pix_fmt' to value '2'
[graph 0 input from stream 0:0 @ 0x2b221a20] Setting 'time_base' to value '1/30'
[graph 0 input from stream 0:0 @ 0x2b221a20] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x2b221a20] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x2b221a20] Setting 'frame_rate' to value '30/1'
[graph 0 input from stream 0:0 @ 0x2b221a20] w:1280 h:720 pixfmt:rgb24 tb:1/30 fr:30/1 sar:1/1 sws_param:flags=2
[format @ 0x2b29b280] Setting 'pix_fmts' to value 'yuv420p'
[auto_scaler_0 @ 0x2b29cc00] Setting 'flags' to value 'bicubic'
[auto_scaler_0 @ 0x2b29cc00] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x2b29b280] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x2b293dd0] query_formats: 5 queried, 3 merged, 1 already done, 0 delayed
[auto_scaler_0 @ 0x2b29cc00] w:1280 h:720 fmt:rgb24 sar:1/1 -> w:1280 h:720 fmt:yuv420p sar:1/1 flags:0x4
Failed to query video capabilities: Inappropriate ioctl for device
libv4l2: error getting capabilities: Inappropriate ioctl for device
~/test_nvmpi $ ls -la 
/dev/video*/bin/ls: No match.

~/test_nvmpi $ ls -la /dev/nvhost-*
crw-rw----. 1 root video 501,  0 Dec 31  1969 /dev/nvhost-as-gpu
crw-rw----. 1 root video 501,  2 Dec 31  1969 /dev/nvhost-ctrl-gpu
crw-rw----. 1 root video 507,  0 Mar 17  2024 /dev/nvhost-ctrl-nvdla0
crw-rw----. 1 root video 505,  0 Mar 17  2024 /dev/nvhost-ctrl-nvdla1
crw-rw----. 1 root video 504,  0 Mar 17  2024 /dev/nvhost-ctrl-pva0
crw-rw----. 1 root root  501,  3 Dec 31  1969 /dev/nvhost-ctxsw-gpu
crw-rw----. 1 root root  501,  4 Dec 31  1969 /dev/nvhost-dbg-gpu
crw-rw----. 1 root video 501,  1 Dec 31  1969 /dev/nvhost-gpu
crw-rw----. 1 root video 501, 10 Dec 31  1969 /dev/nvhost-nvsched_ctrl_fifo-gpu
crw-rw----. 1 root video 501,  9 Dec 31  1969 /dev/nvhost-nvsched-gpu
crw-rw----. 1 root video 502,  0 Dec 31  1969 /dev/nvhost-power-gpu
crw-rw----. 1 root root  501,  6 Dec 31  1969 /dev/nvhost-prof-ctx-gpu
crw-rw----. 1 root root  501,  7 Dec 31  1969 /dev/nvhost-prof-dev-gpu
crw-rw----. 1 root root  501,  5 Dec 31  1969 /dev/nvhost-prof-gpu
crw-rw----. 1 root root  501,  8 Dec 31  1969 /dev/nvhost-sched-gpu
crw-rw----. 1 root video 501, 11 Dec 31  1969 /dev/nvhost-tsg-gpu

~/test_nvmpi $ rpm -qa | grep nvidia-jetpack
nvidia-jetpack-core-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-cuda-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-init-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-multimedia-utils-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-nvsci-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-multimedia-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-camera-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-x11-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-wayland-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-3d-core-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-gbm-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-gstreamer-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-pva-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-vulkan-sc-sdk-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-nvfancontrol-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-nvpmodel-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-cuda-utils-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-dla-compiler-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-firmware-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-nvml-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-tools-36.4.0~20240912212859-1.el8.aarch64
nvidia-jetpack-kmod-modprobe-36.4.0_5.14.0_427.42.1~20240912212859-1.el8.aarch64
nvidia-jetpack-kmod-36.4.0_5.14.0_427.42.1~20240912212859-1.el8.aarch64
nvidia-jetpack-all-36.4.0~20240912212859-1.el8.aarch64

~/test_nvmpi $ rpm -qa | grep  multimedia
qt5-qtmultimedia-5.15.9-1.el9.aarch64
nvidia-jetpack-multimedia-utils-36.4.0~20240912212859-2.el8.aarch64
nvidia-jetpack-multimedia-36.4.0~20240912212859-2.el8.aarch64
~/test_nvmpi $ lsmod | grep nvidia
nvidia_drm            102400  1
nvidia_vrs_pseq        16384  0
drm_kms_helper        192512  4 drm_display_helper,tegra_drm,nvidia_drm
nvidia_modeset       1302528  3 nvidia_drm
nvidia               1589248  5 nvidia_modeset
tsecriscv              40960  1 nvidia
host1x_nvhost          40960  4 nvidia,nvhost_nvdla,nvhost_pva,nvidia_modeset
host1x                217088  8 host1x_nvhost,host1x_fence,nvgpu,tegra_drm,nvhost_nvdla,nvidia_drm,nvhost_pva,nvidia_modeset
video                  65536  1 nvidia_modeset
drm                   598016  12 drm_kms_helper,drm_display_helper,nvidia,tegra_drm,nvidia_drm
mc_utils               16384  3 nvidia,nvgpu,tegra_camera_platform
tegra_dce             110592  2 nvidia

Update

Thank you for the suggestion regarding using a dummy X11 display.

I tried running Xvfb and set:

DISPLAY=:99

This changed the behavior, which suggests that the EGL/display issue was at least partially addressed. The previous error:

nvbufsurftransform: Could not get EGL display connection

no longer appears.

However, the hardware encoder still fails during initialization. I tested using a synthetic source to eliminate any input stream issues:

ffmpeg -hide_banner -loglevel debug \
    -f lavfi -i testsrc=size=1280x720:rate=30 \
    -t 5 \
    -pix_fmt yuv420p \
    -c:v h264_nvmpi \
    encoder_test.mp4

The encoder now fails with:

Failed to query video capabilities: Inappropriate ioctl for device
libv4l2: error getting capabilities: Inappropriate ioctl for device

From the debug log, FFmpeg successfully:

  • generated the test pattern,

  • converted RGB24 to YUV420P,

  • initialized the filter graph,

and then failed while initializing the NVMPI encoder.

I also checked the available device nodes:

ls /dev/video*

returns no devices, and

ls /dev/nvhost-msenc

reports that the device does not exist.

Other NVIDIA device nodes (such as /dev/nvhost-gpu) are present, and tegrastats runs normally.

My questions are:

  1. On JetPack 6.x with RHEL, should /dev/nvhost-msenc (or another hardware encoder device node) exist?

  2. Does h264_nvmpi rely on a specific V4L2 device that may not be present on RHEL?

  3. Is there an additional JetPack multimedia package, driver, or kernel module that must be installed to expose the hardware video encoder on RHEL?

  4. Has anyone successfully used h264_nvmpi/hevc_nvmpi on an AGX Orin running RHEL in either a local desktop session or a headless environment?

Any suggestions would be greatly appreciated.

Some of this might be helpful. This was to built ffmpeg release/9.0 on Thor with Jetpack 7.2.

git clone https://github.com/FFmpeg/nv-codec-headers.git
cd nv-codec-headers.git
git fetch --tags
git checkout n13.0.19.0   # NOTE: pick tag that corresponds to your nvidia-driver
sudo make install PREFIX=/usr/local

git clone --depth 1 https://github.com/KhronosGroup/Vulkan-Headers.git
cmake -S Vulkan-Headers -B Vulkan-Headers/build -DCMAKE_INSTALL_PREFIX=/usr/local
sudo cmake --install Vulkan-Headers/build

git clone https://github.com/google/shaderc
cd shaderc
./utils/git-sync-deps
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
  -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON
cmake --build build -j$(nproc)
sudo cmake --install build

git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
  make -C nv-codec-headers install PREFIX=/usr/local
git clone https://github.com/FFmpeg/FFmpeg.git ffmpeg
cd ffmpeg
git switch release/9.0  # Use the release you need.

./configure --prefix=/usr/local --enable-nonfree --enable-vulkan \
    --enable-cuda-nvcc \
    --nvccflags="-gencode arch=compute_110,code=sm_110 -O2" \
    --extra-cflags=-I/usr/local/cuda/include \
    --extra-ldflags=-L/usr/local/cuda/lib64 \
    --disable-static --enable-shared

make -j10
sudo make install
sudo ldconfig
# Then test

ffmpeg -init_hw_device vulkan -f lavfi -i testsrc=d=1 \
  -vf 'format=nv12,hwupload,scale_vulkan=1280:720,hwdownload,format=nv12' -f null -

ffmpeg -init_hw_device vulkan -f lavfi -i testsrc=d=1 \
    -vf 'hwupload,scale_vulkan=w=1280:h=720:format=yuv420p,hwdownload,format=yuv420p' -f null -

1. NVENC (encode test) — generate a clip and encode on the GPU:
ffmpeg -f lavfi -i testsrc2=d=5:s=1920x1080:r=30 \
    -c:v h264_nvenc -preset p4 -b:v 5M ~/nvenc_test.mp4
2. NVDEC → CUDA filter → NVENC (full GPU pipeline) — decode that file on GPU, scale without leaving VRAM, re-encode as HEVC:
ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i ~/nvenc_test.mp4 \
    -vf scale_cuda=1280:720 -c:v hevc_nvenc ~/nvdec_test.mp4

`-hwaccel_output_format cuda keeps decoded frames in GPU memory so scale_cuda and
the encoder consume them directly (zero copies to system RAM).`

Reference:
https://developer.nvidia.com/ffmpeg
https://developer.nvidia.com/video-codec-sdk#section-get-started
  • Orin and earlier (JetPack ≤ 6): the NVENC/NVDEC hardware existed but was only exposed via the Tegra-specific V4L2 Multimedia API. FFmpeg’s nvenc/cuvid couldn’t talk to it, so the community h264_nvmpi patches bridged the gap. That is no longer needed on Jetpack 7.*
  • Thor (JetPack 7): NVIDIA moved Jetson to the standard desktop driver stack, so the codec engines are exposed through nvcuvid/nvidia-encode/nvidia-decode — plain upstream FFmpeg now works with them, no patches.

Hi,
If you don’t use Ubuntu OS, we would suggest buildffmpeg from source code. Please refer to
Jetson AGX Orin FAQ

You can download the package on developer kit with Ubunut OS and then copy to the RHEL target to build it. The hardware decoder is h264_nvv4l2dec on Orin.

Please note hardware encoder is not supported in ffmpeg. If you need hardware encoder, please use jetson_multimedia_api.

Thanks a lot, which OS your Thor is? Ubuntu or RHEL? I am working on RHEL.

Yes, I fully rebuilt the FFMPEG.

Hi,
Please ensure you follow the steps to download correct package and build it:
【jetpack 5.1.2】Error while loading shared libraries: libnvbuf_utils.so.1.0.0 - #10 by DaneLLL

And you shall be able to use h264_nvv4l2dec to run hardware decoding:

ffmpeg-4.2.7$ ./ffmpeg -c:v h264_nvv4l2dec -i /home/nvidia/test.mp4 a.yuv