Avimux is not working in cp plus dvr

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) - Jetson Nano
• DeepStream Version - 6.0
• JetPack Version (valid for Jetson only) - 4.6.1-b110
• TensorRT Version - 8.2.1.8
• NVIDIA GPU Driver Version (valid for GPU only) - 10.2
• Issue Type( questions, new requirements, bugs)
I am using avimux muxer to save video in deepstream, also I test in three different dvr’s such as hikvision, dahua and cp plus. In both hikvision and dahua, there is no problem when the code and saving video, but in cp plus I am getting 0 fps.
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
this is my pipeline,
streammux->nvvideoconvert->capsfilter->nvstreamdemux->queue->nvvideoconvert->nvv4l2h264enc->h264parse->avimux->filesink

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
In the above pipeline, it is working in hikvision and dahua dvr, but not working in cp plus.
I need to run same pipeline in cp plus dvr also. could you please help me to resolve this issue

Can the raw H264 stream be save to file use your pipeline and remove the avimux with cp plus?

no problem when using matroskamux muxer in cp plus, stream is save to file and get 23 fps.

but in avimux I got 0 fps

Can you get the detailed log with “GST_DEBUG=3”?

avimux_log.txt (199.3 KB)

Seems the pipeline is working. Can you check the log with “export GST_DEBUG=v4l2videodec:5,v4l2videoenc:5”?

when using matroskamux muxer with GST_DEBUG=3, I got this results
matroskamux_log.txt (179.1 KB)

export GST_DEBUG=v4l2videodec:5,v4l2videoenc:5

with avimux
avimux_log.txt (100.7 KB)

with matroskamux
matroskamux_log.txt (53.1 KB)

Can you dump a complete pipeline graph( DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums) to show the details of your pipeline?

pipeline.dot (663 Bytes)

The dot file is not correct. Please “add “GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(gst_objs.pipeline), GST_DEBUG_GRAPH_SHOW_ALL, “demo-app-pipeline”);” at the point where want to export the dot file” DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums

avimux pipeline
pipeline.dot (15.8 KB)

matroskamux pipeline
pipeline.dot (15.7 KB)

OK. Please debug with “export GST_DEBUG=v4l2videodec:5,v4l2videoenc:5,avimux:7”, seems something wrong with avimux.

avimuxlog.txt (48.7 KB)

Can you capture the video from cp plus for us to analysis?

In the log, there is no framerate with caps

0:00:00.832643458 14230 0x7f180035e0 DEBUG avimux gstavimux.c:417:gst_avi_mux_vidsink_set_caps:<mux> mux:video_0, caps=video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)NULL, level=(string)NULL, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, parsed=(boolean)true

Avimux needs correct framerate to calculate timestamp. Can you check whether there is correct framerate in caps with Dahua or hikvision cameras?

avimux_dahua.txt (88.2 KB)

attached dahua with avimux debug
export GST_DEBUG=v4l2videodec:5,v4l2videoenc:5,avimux:7

how to capture the video from cp plus?

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

cp plus stream is not needed now. We’ve got the reason of failure.

AVI format needs framerate to generate correct timestamp for the video. Dahua camera can provide correct frame rate, you can see the framerate is 25FPS from the log
0:00:04.285179159 32060 0x7f20009680 DEBUG avimux gstavimux.c:417:gst_avi_mux_vidsink_set_caps:<mux> mux:video_0, caps=video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)constrained-baseline, level=(string)4, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true

But cp plus camera stream does not provide correct frame rate, the frame rate is 0 in the log, it is not correct.
0:00:00.832643458 14230 0x7f180035e0 DEBUG avimux gstavimux.c:417:gst_avi_mux_vidsink_set_caps:<mux> mux:video_0, caps=video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, profile=(string)NULL, level=(string)NULL, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, parsed=(boolean)true

You need to ask cp plus for the reason. We can not help you any more.

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