Hey,
i am using the jetson agx xavier with jetpack 4.9.140-tegra, deepstream 5.0 and tensorrt 7.1.0.16
I try to do inference using a v4l2 logitech webcam which provides an h264 stream.
My pipeline looks as following:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-h264, width=1280, height=720, framerate=30/1 ! \
h264parse ! nvv4l2decoder ! m.sink_0 nvstreammux name=m batch-size=1 width=1280 height=720 ! \
nvinfer config-file-path=config_infer_primary_ssd.txt ! \
nvvideoconvert ! nvdsosd ! nvegltransform ! nveglglessink sync=0
My output:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-h264, width=1280, height=720, framerate=30/1 ! h264parse ! nvv4l2decoder ! m.sink_0 nvstreammux name=m batch-size=1 width=1280 height=720 ! nvinfer config-file-path= config_infer_primary_ssd.txt ! nvvideoconvert ! nvdsosd ! nvegltransform ! nveglglessink sync=0
Warn: ‘threshold’ parameter has been deprecated. Use ‘pre-cluster-threshold’ instead.
Setting pipeline to PAUSED …
Using winsys: x11
Opening in BLOCKING MODE
0:00:02.949437056 17622 0x557c1d1f60 INFO nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1577> [UID = 1]: deserialized trt engine from :/home/developer/deepstream/aravis/mobilenetv2/build-debayer_on_board_ssd-Desktop-Debug/ssd_mobilenetv2.uff_b1_gpu0_fp32.engine
INFO: [Implicit Engine Info]: layers num: 3
0 INPUT kFLOAT Input 3x300x300
1 OUTPUT kFLOAT NMS 1x100x7
2 OUTPUT kFLOAT NMS_1 1x1x1
0:00:02.949644608 17622 0x557c1d1f60 INFO nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1681> [UID = 1]: Use deserialized engine model: /home/developer/deepstream/aravis/mobilenetv2/build-debayer_on_board_ssd-Desktop-Debug/ssd_mobilenetv2.uff_b1_gpu0_fp32.engine
0:00:02.955842240 17622 0x557c1d1f60 INFO nvinfer gstnvinfer_impl.cpp:311:notifyLoadModelStatus: [UID 1]: Load new model:config_infer_primary_ssd.txt sucessfully
Pipeline is live and does not need PREROLL …
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING …
New clock: GstSystemClock
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
And then nothing happens. I need to CTRL + C two time to end the process.
I tried it on dGPU and it works without a problem.
If i change nvv4l2decoder to avdec_h264 the pipeline works but since the avdec_h264 element is not accelerated i have no use case for it.
Here the last lines of the Gstreamer Debug log:
0:00:04.347477280 19552 0x55ae1e88f0 DEBUG v4l2videodec gstv4l2videodec.c:648:gst_v4l2_video_dec_set_format: Setting format: video/x-h264, width=(int)1280, height=(int)720, framerate=(fraction)30/1, stream-format=(string)byte-stream, alignment=(string)au, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:7:1, interlace-mode=(string)progressive, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)constrained-baseline, level=(string)4
0:00:04.347493440 19552 0x55ae1e88f0 DEBUG GST_PADS gstpad.c:6258:gst_pad_get_task_state:>nvv4l2decoder0:src< pad has no task
0:00:04.347506400 19552 0x55ae1e88f0 DEBUG v4l2 gstv4l2object.c:4369:gst_v4l2_object_stop:>nvv4l2decoder0:sink< stopping
0:00:04.347517792 19552 0x55ae1e88f0 DEBUG v4l2 gstv4l2object.c:4377:gst_v4l2_object_stop:>nvv4l2decoder0:sink< deactivating pool
0:00:04.347531328 19552 0x55ae1e88f0 DEBUG bufferpool gstbufferpool.c:552:gst_buffer_pool_set_active:>nvv4l2decoder0:pool:sink< pool was in the right state
0:00:04.347561280 19552 0x55ae1e88f0 DEBUG bufferpool gstbufferpool.c:197:gst_buffer_pool_finalize:>nvv4l2decoder0:pool:sink< 0x7f10016450 finalize
0:00:04.347572192 19552 0x55ae1e88f0 DEBUG bufferpool gstbufferpool.c:552:gst_buffer_pool_set_active:>nvv4l2decoder0:pool:sink< pool was in the right state
0:00:04.347584224 19552 0x55ae1e88f0 DEBUG GST_POLL gstpoll.c:772:gst_poll_free: 0x7f1001f990: freeing
0:00:04.347657952 19552 0x55ae1e88f0 DEBUG v4l2 gstv4l2object.c:4369:gst_v4l2_object_stop:>nvv4l2decoder0:src< stopping
If someone needs the whole log, i will upload it.
PS:
My paths may look a bit confusing, just ignore that. I am looking forward to run this within an cpp application and thats just the folder where all needed files as the trt-engine etc are.
Thanks in advance