Unable to immediately decode stream after the encoding in a pipeline

• Hardware Platform (Corporation TU106GLM [Quadro RTX 3000 Mobile / Max-Q] )
• DeepStream Version 6.2.0
• TensorRT Version 8.5
• NVIDIA GPU Driver Version 525.60.13
• Issue Type (questions)

Hello, I’m trying to encode a screen capture and decode it immediately with the following pipeline:

GST_DEBUG=3 gst-launch-1.0 -v ximagesrc endy=600 endx=1000 use-damage=0 ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=I420, framerate=30/1" ! nvv4l2h264enc name=video iframeinterval=30 control-rate=1 bitrate=1000000 preset-id=1 tuning-info-id=3 ! h264parse ! nvv4l2decoder low-latency-mode=true ! nvvideoconvert ! autovideosink

but it is hanging and the log is:

Setting pipeline to PAUSED ...
0:00:00.054413374 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054429160 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat MJPG
0:00:00.054455117 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054460993 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat MJPG
0:00:00.054494183 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054500667 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat AV10
0:00:00.054504973 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054510842 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat AV10
0:00:00.054521057 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054526980 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat DVX5
0:00:00.054532293 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054537833 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat DVX5
0:00:00.054547145 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054552889 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat DVX4
0:00:00.054557616 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054562864 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat DVX4
0:00:00.054571978 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054577717 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat MPG4
0:00:00.054582504 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054587865 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat MPG4
0:00:00.054597990 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054603667 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat MPG2
0:00:00.054608459 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054630589 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat MPG2
0:00:00.054640986 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054646380 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat H265
0:00:00.054650898 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054656131 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat H265
0:00:00.054664497 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054669787 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat VP90
0:00:00.054674238 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054679341 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat VP90
0:00:00.054686657 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054691791 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat VP80
0:00:00.054696194 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054701108 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat VP80
0:00:00.054710037 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054715526 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat H264
0:00:00.054720040 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:00.054725398 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat H264
0:00:00.055081372 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:src> Unable to try format: Unknown error -1
0:00:00.055089963 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:src> Could not probe minimum capture size for pixelformat NM12
0:00:00.055094928 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:src> Unable to try format: Unknown error -1
0:00:00.055100362 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:src> Could not probe maximum capture size for pixelformat NM12
0:00:00.055107631 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2395:gst_v4l2_object_add_interlace_mode:0x563764603bf0 Failed to determine interlace mode
0:00:00.055202198 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<video:sink> Unable to try format: Unknown error -1
0:00:00.055211077 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<video:sink> Could not probe minimum capture size for pixelformat YM12
0:00:00.055216041 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<video:sink> Unable to try format: Unknown error -1
0:00:00.055221286 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<video:sink> Could not probe maximum capture size for pixelformat YM12
0:00:00.055227499 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2395:gst_v4l2_object_add_interlace_mode:0x5637645f5c00 Failed to determine interlace mode
0:00:00.055237642 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<video:sink> Unable to try format: Unknown error -1
0:00:00.055243097 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<video:sink> Could not probe minimum capture size for pixelformat NM12
0:00:00.055247892 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<video:sink> Unable to try format: Unknown error -1
0:00:00.055252950 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<video:sink> Could not probe maximum capture size for pixelformat NM12
0:00:00.055258271 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2395:gst_v4l2_object_add_interlace_mode:0x5637645f5c00 Failed to determine interlace mode
0:00:00.055292931 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<video:src> Unable to try format: Unknown error -1
0:00:00.055298726 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2942:gst_v4l2_object_probe_caps_for_format:<video:src> Could not probe minimum capture size for pixelformat H264
0:00:00.055303401 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:3057:gst_v4l2_object_get_nearest_size:<video:src> Unable to try format: Unknown error -1
0:00:00.055308603 23770 0x563764634c00 WARN                    v4l2 gstv4l2object.c:2948:gst_v4l2_object_probe_caps_for_format:<video:src> Could not probe maximum capture size for pixelformat H264
Pipeline is live and does not need PREROLL ...
0:00:00.055724847 23770 0x563764635300 FIXME                default gstutils.c:3980:gst_pad_create_stream_id_internal:<ximagesrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstXImageSrc:ximagesrc0.GstPad:src: caps = video/x-raw, format=(string)BGRx, width=(int)1001, height=(int)601, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/Gstnvvideoconvert:nvvideoconvert0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1001, height=(int)601, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, format=(string)I420, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)1001, height=(int)601, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, format=(string)I420, block-linear=(boolean)false
/GstPipeline:pipeline0/nvv4l2h264enc:video.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)NULL, level=(string)NULL, width=(int)1001, height=(int)601, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)NULL, level=(string)NULL, width=(int)1001, height=(int)601, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true
/GstPipeline:pipeline0/nvv4l2decoder:nvv4l2decoder0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)NULL, level=(string)NULL, width=(int)1001, height=(int)601, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, parsed=(boolean)true
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)NULL, level=(string)NULL, width=(int)1001, height=(int)601, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
Redistribute latency...
0:00:00.147488773 23770 0x563764635300 WARN          v4l2bufferpool gstv4l2bufferpool.c:1082:gst_v4l2_buffer_pool_start:<video:pool:src> Uncertain or not enough buffers, enabling copy threshold
/GstPipeline:pipeline0/nvv4l2h264enc:video.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1001, height=(int)601, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, format=(string)I420, block-linear=(boolean)false
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)1001, height=(int)601, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, format=(string)I420, block-linear=(boolean)false
/GstPipeline:pipeline0/Gstnvvideoconvert:nvvideoconvert0.GstPad:sink: caps = video/x-raw, format=(string)BGRx, width=(int)1001, height=(int)601, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1
0:00:00.172259643 23770 0x563764635580 WARN          v4l2bufferpool gstv4l2bufferpool.c:1533:gst_v4l2_buffer_pool_dqbuf:<video:pool:src> Driver should never set v4l2_buffer.field to ANY
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)constrained-baseline, level=(string)3.1, width=(int)1001, height=(int)601, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true

The pipeline works when I use avdec_h264 instead of nvv4l2decoder, so is it the problem of nvv4l2decoder of I just use it in a wrong way?

Could you try to use the cli below and check whether it works?

GST_DEBUG=v4l2videoenc:5, v4l2videodec:5 gst-launch-1.0 -e ximagesrc ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=I420, framerate=30/1" ! nvv4l2h264enc ! nvv4l2decoder ! nvvideoconvert  ! autovideosink

You can also change the last plugin to fakesink to position which plguin have problem.

Thanks for your reply. It doesn’t work. I tried:

export GST_DEBUG=1,v4l2videoenc:5,v4l2videodec:5
gst-launch-1.0 -e ximagesrc endx=1000 endy=500 ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=I420, framerate=30/1" ! nvv4l2h264enc ! nvv4l2decoder ! nvvideoconvert ! fakesink

and the log is:

0:00:00.040980855 159400 0x564643e7b960 DEBUG           v4l2videodec gstv4l2videodec.c:1891:gst_v4l2_video_dec_sink_getcaps:<nvv4l2decoder0> Returning sink caps image/jpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-h264, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], stream-format=(string){ byte-stream }, alignment=(string){ au }; video/x-h265, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], stream-format=(string){ byte-stream }, alignment=(string){ au }; video/mpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], mpegversion=(int)4, systemstream=(boolean)false, parsed=(boolean)true; video/mpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], mpegversion=(int)[ 1, 2 ], systemstream=(boolean)false, parsed=(boolean)true; video/x-divx, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], divxversion=(int)[ 4, 5 ]; video/x-av1, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-vp8, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-vp9, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:00.041048158 159400 0x564643e7b960 DEBUG           v4l2videodec gstv4l2videodec.c:1891:gst_v4l2_video_dec_sink_getcaps:<nvv4l2decoder0> Returning sink caps image/jpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-h264, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], stream-format=(string){ byte-stream }, alignment=(string){ au }; video/x-h265, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], stream-format=(string){ byte-stream }, alignment=(string){ au }; video/mpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], mpegversion=(int)4, systemstream=(boolean)false, parsed=(boolean)true; video/mpeg, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], mpegversion=(int)[ 1, 2 ], systemstream=(boolean)false, parsed=(boolean)true; video/x-divx, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ], divxversion=(int)[ 4, 5 ]; video/x-av1, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-vp8, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-vp9, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:00.041061558 159400 0x564643e7b960 DEBUG           v4l2videodec gstv4l2videodec.c:1867:gst_v4l2_video_dec_src_query:<nvv4l2decoder0> Returning src caps video/x-raw(memory:NVMM), width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:00.041163955 159400 0x564643e7b960 DEBUG           v4l2videodec gstv4l2videodec.c:1867:gst_v4l2_video_dec_src_query:<nvv4l2decoder0> Returning src caps video/x-raw(memory:NVMM), width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:00.041190022 159400 0x564643e7b960 DEBUG           v4l2videodec gstv4l2videodec.c:1867:gst_v4l2_video_dec_src_query:<nvv4l2decoder0> Returning src caps video/x-raw(memory:NVMM), width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
0:00:00.041208513 159400 0x564643e7b960 DEBUG           v4l2videodec gstv4l2videodec.c:1867:gst_v4l2_video_dec_src_query:<nvv4l2decoder0> Returning src caps video/x-raw(memory:NVMM), width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]
Setting pipeline to PAUSED ...
0:00:00.041245193 159400 0x564643e7b960 DEBUG           v4l2videodec gstv4l2videodec.c:593:gst_v4l2_video_dec_open:<nvv4l2decoder0> Opening
0:00:00.041816232 159400 0x564643e7b960 DEBUG           v4l2videoenc gstv4l2videoenc.c:528:gst_v4l2_video_enc_open:<nvv4l2h264enc0> Opening
0:00:00.041939684 159400 0x564643e7b960 DEBUG           v4l2videodec gstv4l2videodec.c:670:gst_v4l2_video_dec_start:<nvv4l2decoder0> Starting
0:00:00.041952280 159400 0x564643e7b960 DEBUG           v4l2videoenc gstv4l2videoenc.c:634:gst_v4l2_video_enc_start:<nvv4l2h264enc0> Starting
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.042328161 159400 0x564643af0b60 DEBUG           v4l2videodec gstv4l2videodec.c:1891:gst_v4l2_video_dec_sink_getcaps:<nvv4l2decoder0> Returning sink caps video/x-h264, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)[ 1/2147483647, 2147483647/1 ], stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true
0:00:00.042474762 159400 0x564643af0b60 DEBUG           v4l2videodec gstv4l2videodec.c:1891:gst_v4l2_video_dec_sink_getcaps:<nvv4l2decoder0> Returning sink caps video/x-h264, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)[ 1/2147483647, 2147483647/1 ], stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true
0:00:00.042730124 159400 0x564643af0b60 DEBUG           v4l2videodec gstv4l2videodec.c:1891:gst_v4l2_video_dec_sink_getcaps:<nvv4l2decoder0> Returning sink caps video/x-h264, width=(int)1001, height=(int)501, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true
0:00:00.042808961 159400 0x564643af0b60 DEBUG           v4l2videodec gstv4l2videodec.c:1891:gst_v4l2_video_dec_sink_getcaps:<nvv4l2decoder0> Returning sink caps video/x-h264, width=(int)1001, height=(int)501, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true
0:00:00.042826905 159400 0x564643af0b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:776:gst_v4l2_video_enc_set_format:<nvv4l2h264enc0> Setting format: video/x-raw(memory:NVMM), width=(int)1001, height=(int)501, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, format=(string)I420, block-linear=(boolean)false
0:00:00.042833951 159400 0x564643af0b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:1019:gst_v4l2_video_enc_negotiate:<nvv4l2h264enc0> Negotiating H264 profile and level.
0:00:00.042931040 159400 0x564643af0b60 DEBUG           v4l2videodec gstv4l2videodec.c:1891:gst_v4l2_video_dec_sink_getcaps:<nvv4l2decoder0> Returning sink caps video/x-h264, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ], stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true
0:00:00.042937160 159400 0x564643af0b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:1070:gst_v4l2_video_enc_negotiate:<nvv4l2h264enc0> Selected H264 profile (null) at level (null)
0:00:00.042944633 159400 0x564643af0b60 DEBUG           v4l2videodec gstv4l2videodec.c:1071:gst_v4l2_video_dec_drain:<nvv4l2decoder0> Draining...
0:00:00.042947372 159400 0x564643af0b60 DEBUG           v4l2videodec gstv4l2videodec.c:924:gst_v4l2_video_dec_flush:<nvv4l2decoder0> Flushed
0:00:00.043032054 159400 0x564643af0b60 DEBUG           v4l2videodec gstv4l2videodec.c:1891:gst_v4l2_video_dec_sink_getcaps:<nvv4l2decoder0> Returning sink caps video/x-h264, width=(int)1001, height=(int)501, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt601, chroma-site=(string)jpeg, stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true, profile=(string)NULL, level=(string)NULL, interlace-mode=(string)progressive
0:00:00.043043617 159400 0x564643af0b60 DEBUG           v4l2videodec gstv4l2videodec.c:730:gst_v4l2_video_dec_set_format:<nvv4l2decoder0> Setting format: video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)NULL, level=(string)NULL, width=(int)1001, height=(int)501, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg
Redistribute latency...
0:00:00.111134231 159400 0x564643af0b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:834:gst_v4l2_video_enc_set_format:<nvv4l2h264enc0> output caps: video/x-raw(memory:NVMM), width=(int)1001, height=(int)501, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, format=(string)I420, block-linear=(boolean)false
0:00:00.111155693 159400 0x564643af0b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:1557:gst_v4l2_video_enc_propose_allocation:<nvv4l2h264enc0> called
0:00:00.114865160 159400 0x564643af0b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:1362:gst_v4l2_video_enc_handle_frame:<nvv4l2h264enc0> Handling frame 0
0:00:00.115202330 159400 0x564643af0b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:1416:gst_v4l2_video_enc_handle_frame:<nvv4l2h264enc0> Starting encoding thread
0:00:00.115291577 159400 0x564643af0b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:1433:gst_v4l2_video_enc_handle_frame: NO META RETRIEVED BY ENCODER

0:00:00.117129809 159400 0x564643e81580 DEBUG           v4l2videodec gstv4l2videodec.c:1393:gst_v4l2_video_dec_handle_frame:<nvv4l2decoder0> Handling frame 0
0:00:00.117137870 159400 0x564643e81580 DEBUG           v4l2videodec gstv4l2videodec.c:1407:gst_v4l2_video_dec_handle_frame:<nvv4l2decoder0> Delta Unit Received, Dropping...
0:00:00.155437354 159400 0x564643af0b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:1362:gst_v4l2_video_enc_handle_frame:<nvv4l2h264enc0> Handling frame 1
0:00:00.155447900 159400 0x564643af0b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:1433:gst_v4l2_video_enc_handle_frame: NO META RETRIEVED BY ENCODER

0:00:00.156373612 159400 0x564643e81580 DEBUG           v4l2videodec gstv4l2videodec.c:1393:gst_v4l2_video_dec_handle_frame:<nvv4l2decoder0> Handling frame 1
0:00:00.156380915 159400 0x564643e81580 DEBUG           v4l2videodec gstv4l2videodec.c:1407:gst_v4l2_video_dec_handle_frame:<nvv4l2decoder0> Delta Unit Received, Dropping...
0:00:00.185769599 159400 0x564643af0b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:1362:gst_v4l2_video_enc_handle_frame:<nvv4l2h264enc0> Handling frame 2
0:00:00.185785389 159400 0x564643af0b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:1433:gst_v4l2_video_enc_handle_frame: NO META RETRIEVED BY ENCODER

0:00:00.187142931 159400 0x564643e81580 DEBUG           v4l2videodec gstv4l2videodec.c:1393:gst_v4l2_video_dec_handle_frame:<nvv4l2decoder0> Handling frame 2
0:00:00.187149817 159400 0x564643e81580 DEBUG           v4l2videodec gstv4l2videodec.c:1407:gst_v4l2_video_dec_handle_frame:<nvv4l2decoder0> Delta Unit Received, Dropping...

OK. I just use videotestsrc plugin, it works fine.

 GST_DEBUG=1,v4l2videoenc:5,v4l2videodec:5  gst-launch-1.0 -e videotestsrc ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=I420, framerate=30/1" ! nvv4l2h264enc ! nvv4l2decoder ! nvvideoconvert ! fakesink

Could you try to replace the plugin to fakesink from the back to the front to confirm which one caused the problem?

I’m wondering how I can see if the pipeline works or has problem with videotestsrc and fakesink? I just tried videotestsrc and it gave the same log as ximagesrc. Then I tried moving fakesink from the end till nvv4l2h264enc, the logs didn’t show any errors.

If you use the GST_DEBUG=1,v4l2videoenc:5,v4l2videodec:5 gst-launch-1.0 -e ... cli, you can get the log of frame processing below:

0:00:02.961517445   965 0x563b4921d580 DEBUG           v4l2videodec gstv4l2videodec.c:1393:gst_v4l2_video_dec_handle_frame:<nvv4l2decoder0> Handling frame 6296

0:00:02.962317816   965 0x563b48f76b60 DEBUG           v4l2videoenc gstv4l2videoenc.c:1362:gst_v4l2_video_enc_handle_frame:<nvv4l2h264enc0> Handling frame 6299

Okay, I do get the log of frame processing with either ximagesrc/videotestsrc or ximagesink/fakesink, but with ximagesrc and ximagesink, the display doesn’t show up, though i can see from cli the frame processing keeps going on. If I replace the nvv4l2decoder with avdec_h264, the display shows up.

One more interesting thing I found is that if I pass the stream through rtp like:

GST_DEBUG=1,v4l2videoenc:5, gst-launch-1.0 -e ximagesrc endx=1000 endy=500 ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=I420, framerate=30/1" ! nvv4l2h264enc ! queue ! rtph264pay ! udpsink host=127.0.0.1 port=1234

and receive it from another cli:

GST_DEBUG=1,v4l2videodec:5, gst-launch-1.0 -e udpsrc port=1234 ! application/x-rtp, media=video, clock-rate=90000, encoding-name=H264 ! rtph264depay ! nvv4l2decoder ! nvvideoconvert ! queue ! ximagesink

The display shows up, which proves that my nvv4l2decoder works. But again, if i remove all rtp elements and link the decoder right after the encoder, there is no display:

GST_DEBUG=1,v4l2videoenc:5,v4l2videodec:5 gst-launch-1.0 -e ximagesrc endx=1000 endy=500 ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=I420, framerate=30/1" ! nvv4l2h264enc ! nvv4l2decoder ! nvvideoconvert ! queue ! ximagesink

From the log attached, nvv4l2decoder dropped all the frame. We’ll debug and fix it. Thanks

This issue is fixed in next release, thanks for reporting.

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