Segmentation Fault in samples/00_video_decode

When I tried the sample 00_video_decode (of multimedia API R32.2.0) in my module (Jetpack 4.6 [L4T 32.6.1] ), it crashed with a segmentfault.

cidi@cidi:/media/cidi/data/tegra_multimedia_api/samples/00_video_decode$ ./video_decode H264 --disable-rendering --dbg-level 3 -o 1111_ench264_dec.yuv …/1111_enc.h264
Set governor to performance before enabling profiler
Creating decoder in blocking mode
[DEBUG] (NvV4l2Element.cpp:70) :Opened, fd = 14
[DEBUG] (NvV4l2Element.cpp:228) :Successfully subscribed to event 5
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
[DEBUG] (NvV4l2ElementPlane.cpp:376) :Output Plane:VIDIOC_S_FMT at capture plane successful
Setting frame input mode to 1
[DEBUG] (NvV4l2Element.cpp:190) :Set controls
[DEBUG] (NvVideoDecoder.cpp:207) :Setting decoder frame input mode to 1: success
[DEBUG] (NvV4l2ElementPlane.cpp:522) :Output Plane:Reqbuf returned 2 buffers
[DEBUG] (NvV4l2ElementPlane.cpp:627) :Output Plane:QueryBuf for 0th buffer successful
[DEBUG] (NvV4l2ElementPlane.cpp:665) :Output Plane:ExportBuf successful for Buffer 0, Plane 0, fd = 1047
[DEBUG] (NvBuffer.cpp:175) Mapped buffer 0, plane 0 to
[DEBUG] (NvV4l2ElementPlane.cpp:627) :Output Plane:QueryBuf for 1th buffer successful
[DEBUG] (NvV4l2ElementPlane.cpp:665) :Output Plane:ExportBuf successful for Buffer 1, Plane 0, fd = 1048
[DEBUG] (NvBuffer.cpp:175) Mapped buffer 1, plane 0 to
[DEBUG] (NvV4l2ElementPlane.cpp:556) :Output Plane:STREAMON successful
Starting decoder capture loop thread
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Output Plane:Qed buffer 0
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Output Plane:Qed buffer 1
Input file read complete
[DEBUG] (NvV4l2Element.cpp:110) :DQed event 5
[DEBUG] (NvV4l2ElementPlane.cpp:358) :Capture Plane:Getting format: success
[DEBUG] (NvV4l2ElementPlane.cpp:394) :Capture Plane:Getting crop params: success
Video Resolution: 720x1280
[DEBUG] (NvV4l2ElementPlane.cpp:535) :Capture Plane:Already in STREAMOFF
[DEBUG] (NvV4l2ElementPlane.cpp:916) :Capture Plane:Stopped DQ Thread
[DEBUG] (NvV4l2ElementPlane.cpp:522) :Capture Plane:Reqbuf returned 0 buffers
[DEBUG] (NvV4l2ElementPlane.cpp:458) :Capture Plane:deinit successful
[DEBUG] (NvV4l2ElementPlane.cpp:376) :Capture Plane:VIDIOC_S_FMT at capture plane successful
[DEBUG] (NvV4l2Element.cpp:171) :Got value 21 for control 9963815
[DEBUG] (NvVideoDecoder.cpp:215) :Getting decoder minimum capture plane buffers (21): success
Decoder colorspace ITU-R BT.601 with standard range luma (16-235)
[DEBUG] (NvV4l2ElementPlane.cpp:522) :Capture Plane:Reqbuf returned 22 buffers
[DEBUG] (NvV4l2ElementPlane.cpp:556) :Capture Plane:STREAMON successful
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 0
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 1
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 2
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 3
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 4
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 5
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 6
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 7
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 8
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 9
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 10
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 11
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 12
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 13
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 14
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 15
[DEBUG] (NvV4l2ElementPlane.cpp:260) :Capture Plane:Qed buffer 16
Segmentation fault (core dumped)

I produced this segmentfault as these steps:
First, run samples/01_video_encode/video_encode to produce a H264 file from a yuv stream file (1111.yuv of yuv420 8bit);
Second, try samples/00_video_decode/video_decode to recover a yuv stream file from this H264 file, it crashed.

Best regards!

The versions do not match. Please install the samples through SDKManager. After the installation, the samples will be present in


First, thx for your reply, it works!
However, I’ve met another problem. Now I can get the yuv stream from h264, however it seems to be abnormal.

Could u pls check this again? Attached two images were both decoded from sample_outdoor_car_1080p_10fps.h264, the former is by sample/00_video/decode, and the later is by ffmpeg(ffmpeg -i ./sample_outdoor_car_1080p_10fps.h264 -pix_fmt nv12 sample_h264_ffmpeg_dec.yuv)

We don’t observe the issue. Do you see this phenomenon in playback also? It is supposed to work fine in both saving to a file and video playback.

I’ve tried sample/00_video_decode on render display, it’s abnormal as well.

Hi, can you repeat this issue while sample/00_video_decode sample_outdoor_car_1080p_10fps.h264 as well?

Further more, I’ve tried on a jetpack 4.2.2 module, it run well.

We don’t observe the issue. You may try other version such as Jetpack 4.6.3 or 5.1. It should work well on either release.

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