Gstreamer pipeline(nvv4l2decoder) for .264 file

I’d like to use the gstreamer.
My file can be played, but it’s a little laggy.
My pipeline is as follows.

gst-launch-1.0 filesrc location=/home/nvidia/test264.h264 ! h264parse ! nvv4l2decoder enable-frame-type-reporting=1 ! nvvidconv output-buffers=20 ! ‘vid
eo/x-raw(memory:NVMM), format=RGBA, width=1920, height=1080, framerate=30/1’ ! queue ! nvoverlaysink

The log at that time is as follows.
What should I do ?

Setting pipeline to PAUSED …
Opening in BLOCKING MODE
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = I
(IDR)
nActiveRefFrames = 0
Frame 0
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = P
nActiveRefFrames = 0
Frame 1
NVMEDIA: NVMEDIABufferProcessing: 1096: Consume the extra signalling for EOS
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = I
(IDR)
nActiveRefFrames = 0
Frame 12
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = P
nActiveRefFrames = 0
Frame 13
NVMEDIA: NVMEDIABufferProcessing: 1096: Consume the extra signalling for EOS
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = I
(IDR)
nActiveRefFrames = 0
Frame 24
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = P
nActiveRefFrames = 0
Frame 25
NVMEDIA: NVMEDIABufferProcessing: 1096: Consume the extra signalling for EOS
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = I
(IDR)
nActiveRefFrames = 0
Frame 36
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = P
nActiveRefFrames = 0
Frame 37
NVMEDIA: NVMEDIABufferProcessing: 1096: Consume the extra signalling for EOS
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1

Hi,
Not sure but it probably is specific to the h264 stream. Please check if you observe the same in decoding the sample stream:

/usr/src/jetson_multimedia_api/data/Video/sample_outdoor_car_1080p_10fps.h264

In case of using /usr/src/jetson_multimedia_api/samples/00_video_decode/video_decode,
this content can be played normally.
So I think that this content itself is not special.

Hi,
You may set sync=0 for a try:

... ! nvoverlaysink sync=0

It’s same situation.
Sorry, it might be that my attached previous log was broken.
The log at this time is as follows.
A green image is sometimes displayed.
If necessary, I can send my test content to you directly.

nvidia@nvidia-nx3:~$ DISPLAY=:0.0 gst-launch-1.0 filesrc location=/home/nvidia/test264.h264 ! h264parse ! queue ! nvv4l2decoder disable-dpb=true enable-frame-type-reporting=1 ! nvvidconv output-buffers=20 ! ‘video/x-raw(memory:NVMM), format=RGBA, width=1920, height=1080’ ! queue ! nvoverlaysink sync=false
Setting pipeline to PAUSED …
Opening in BLOCKING MODE
Pipeline is PREROLLING …
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = I
(IDR)
nActiveRefFrames = 0
Frame 0
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = P
nActiveRefFrames = 0
Frame 1
FrameType = P
nActiveRefFrames = 1
Frame 2
FrameType = P
nActiveRefFrames = 2
Frame 3
FrameType = P
nActiveRefFrames = 2
Frame 4
FrameType = P
nActiveRefFrames = 2
Frame 5
FrameType = P
nActiveRefFrames = 2
Frame 6
FrameType = P
nActiveRefFrames = 2
Frame 7
FrameType = P
nActiveRefFrames = 2
Frame 8
FrameType = P
nActiveRefFrames = 2
Frame 9
FrameType = P
nActiveRefFrames = 2
Frame 10
FrameType = P
nActiveRefFrames = 2
Frame 11
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = I
(IDR)
nActiveRefFrames = 0
Frame 12
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = P
nActiveRefFrames = 0
Frame 13
FrameType = P
nActiveRefFrames = 1
Frame 14
FrameType = P
nActiveRefFrames = 2
Frame 15
FrameType = P
nActiveRefFrames = 2
Frame 16
FrameType = P
nActiveRefFrames = 2
Frame 17
FrameType = P
nActiveRefFrames = 2
Frame 18
FrameType = P
nActiveRefFrames = 2
Frame 19
FrameType = P
nActiveRefFrames = 2
Frame 20
FrameType = P
nActiveRefFrames = 2
Frame 21
FrameType = P
nActiveRefFrames = 2
Frame 22
FrameType = P
nActiveRefFrames = 2
Frame 23
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1
FrameType = I
(IDR)
nActiveRefFrames = 0
Frame 24
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
NvMMLiteNVMEDIADecSetAttribute:: Error status reporting set to 1

Hi,
Please try without disable-dpb=true:

$ DISPLAY=:0.0 gst-launch-1.0 filesrc location= /usr/src/jetson_multimedia_api/data/Video/sample_outdoor_car_1080p_10fps.h264 ! h264parse ! queue ! nvv4l2decoder enable-frame-type-reporting=1 ! nvvidconv output-buffers=20 ! 'video/x-raw(memory:NVMM), format=RGBA, width=1920, height=1080' ! queue ! nvoverlaysink sync=false

If there is B frames in the stream the property is not valid. sample_outdoor_car_1080p_10fps has B frames so it will not be well decoded when disable-dpb=true is set.

It’s same situation without disable-dpb=true;
I attached my test content.
Could you check it ?test264.h264 (21.7 MB)

Hi,
It looks to be an issue in the stream itself. If we parse it in JM decoder, it shows:

get_annex_b_NALU: no Start Code at the beginning of the NALU, return -1
Error while getting the NALU in file format Annex B, exit

In ffmpeg, it shows:

[h264 @ 0x3a53a60] sps_id 0 out of range
[h264 @ 0x3a53a60] SPS unavailable in decode_picture_timing
[h264 @ 0x3a53a60] non-existing PPS 0 referenced
[h264 @ 0x3a53a60] sps_id 0 out of range
[h264 @ 0x3a53a60] SPS unavailable in decode_picture_timing
[h264 @ 0x3a53a60] non-existing PPS 0 referenced
[h264 @ 0x3a53a60] decode_slice_header error
[h264 @ 0x3a53a60] no frame!

We would suggest send valid stream to decoder.

Although ffmpeg output their warning, it can be played normally.
In case of using /usr/src/jetson_multimedia_api/samples/00_video_decode/video_decode,
it can be played normally too.
Is there something workaround for gstreamer ?

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