Ffmpeg failed to decode with h264_nvv4l2dec, Segmentation fault!

I have installed ffmpeg according to Accelerated Decode with ffmpeg — Jetson Linux Developer Guide documentation.
When I used "ffmpeg -c:v h264_nvv4l2dec " to decode a video, Segmentation fault reported:

sudo ffmpeg -c:v h264_nvv4l2dec -i ~/Documents/sample1.mp4 ~/Documents/test.yuv
ffmpeg version n4.2.7-22-gc613a6774b-1ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
configuration: --prefix=/usr --enable-nvv4l2dec --enable-libv4l2 --enable-shared --extra-libs=‘-L/usr/lib/aarch64-linux-gnu/tegra -lnvbuf_utils’ --extra-cflags=-I/usr/src/jetson_multimedia_api/include/ --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘/home/hoi/Documents/sample1.mp4’:
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isom
creation_time : 2008-12-01T05:16:01.000000Z
Duration: 00:02:03.24, start: 0.000000, bitrate: 8236 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x816 [SAR 1:1 DAR 40:17], 7979 kb/s, 23.98 fps, 23.98 tbr, 2500k tbn, 47.95 tbc (default)
Metadata:
creation_time : 2008-12-01T04:50:08.000000Z
handler_name : GPAC ISO Video Handler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 258 kb/s (default)
Metadata:
creation_time : 2008-12-01T05:16:04.000000Z
handler_name : GPAC ISO Audio Handler
File ‘/home/hoi/Documents/test.yuv’ already exists. Overwrite ? [y/N] y
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
Stream mapping:
Stream #0:0#0:0 (h264 (h264_nvv4l2dec) → rawvideo (native))
Press [q] to stop, [?] for help
Segmentation fault

However, it is ok with other decoder, like h264.
What else should I to do when using the nvv4l2dec decoder?

Hi,
Please share which Jetpack release you are using. For Orin series, the latest release is Jetpack 5.1.1, IF you use previous release, please upgrade and give it a try.

Thank you reply. I am using Jetpack 5.1.1, installed with sdk manager.

Hi,
Thanks for reporting it. We can observe the issue. It is under investigation. Will udate when there is further finding.

Hi, is there any further finding with this issue? Where can I get the updates?

Hi,
The issue is under investigation. Will update when it is fixed.

Just wanted to say that I believe I’m encountering the same error. I experience it both when using ffmpeg and using libav directly. I tried with the binary ffmpeg package from the Nvidia repositories. I’m also using Jetpack 5.1.1, but on a Xavier AGX.

I have installed Jetpack 5.1, then nvdec runs normally
In same, gstreamer nvv4l2dec doesn’t run normally in 5.1.1
It seems 5.1.1 has some troubles in nvv4l2 codec

Hi,
The package is refreshed. Please check
【jetpack 5.1.2】Error while loading shared libraries: libnvbuf_utils.so.1.0.0 - #10 by DaneLLL

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