Timestamp issue in recorded video using matroskamux

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) - Jetson Nano
• DeepStream Version - 6.0.1
• JetPack Version (valid for Jetson only) - 4.5.3
• TensorRT Version - 8.0.5
• NVIDIA GPU Driver Version (valid for GPU only) - 10.2
• Issue Type( questions, new requirements, bugs)
I’ve been using splitmuxsink to split the recordings of a live video stream by length or by the “split now” cmd. The resulting video files are all timestamped with the “global time” from when the pipeline started.

File1 00:00 - 05:00

File2 05:00 - 10:00

File3 10:00 - 15:00

This is causing issues when playing back the files in certain video players that are expected a time stamp starting at 0.

What I’d like to do is reset the time stamping every time the recordings are split and a new file is started.

File1 00:00 - 05:00

File2 00:00 - 05:00

File3 00:00 - 05:00

GStreamer Version - 1.14.5
can you help me to resolve this issue?

• 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)
my pipeline
streammux->nvvideoconvert->capsfilter->inference->demux->queue->nvvideoconvert->nv4l2h264enc->h264parse->splitmuxsink(matroskamux)

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

@ marmikshah
said to use offset-to-zero for matroskamux, but current version I don’t have this property.

So I manually installed gstreamer-1.16.2 using gst-install. Then I got another issue “no such element or plungin found :rtmpsink”

can you help to resolve timestamp issue in the video file?

This may be a bit complicated. You can try to add the probe function to the src_pad of matroskamux and change the pts of the gstbuffer like below.
https://github.com/GStreamer/gstreamer/blob/b75114983e85cef70da398c985e8ee7f8f68e3a1/subprojects/gst-plugins-good/gst/matroska/matroska-mux.c#L3328
Or you can try to use other media processing software to reprocess the generated video file.

1 Like

it will be helpful, if it is in python.

Any solution to resolve “no such element or plungin found :rtmpsink” in gstreamer1.16.2

Cause rtmp is a gst-plugins-bad plugin. You need to install gst-plugins-bad module in 1.16.2 too.

I already installed gst-plugins-bad, but rtmpsink is not working

Could you refer to the link below to migration to newer gstreamer version.

Error: gst-stream-error-quark: Could not multiplex stream. (10): gstqtmux.c(4561): gst_qt_mux_add_buffer (): /GstPipeline:pipeline0/GstSplitMuxSink:recording-sink2/GstMP4Mux:muxer:
Buffer has no PTS.

how to resolve this issue?

So have you resolved the Gstreamer version issue? How did this new issue occur?

due to this error, i use matroskamux instead of mp4mux, using matroskamux only I got timestamp issue in videos. so either I solve above error with mp4mux or timestamp issue with matroskamux

Could you just give us a gst-launch-1.0 command to run your pipeline? This error may be due to the adjustment of pts in your code.

gst-launch-1.0 uridecodebin uri=rtsp://admin:Sieora123@192.168.1.108:554/cam/realmonitor?channel=3&subtype=0 ! nvstreammux ! nvinfer ! nvvideoconvert ! video/x-raw(memory:NVMM), format=RGBA ! nvstreamdemux ! queue ! nvvideoconvert ! nv4l2h264enc ! h264parse ! splitmuxsink location=sample.mp4

I mean the pipeline to enconter this problem.
Did you try to migration to newer gstreamer version? If use the old gstreamer version, we suggest you try to use other media processing software to reprocess the generated video file.

sample code
deepstream_split_record.py (23.1 KB)

OK. Let’s go back to the initial issue. If you customize your code randomly, it will produce more new problems.
1.You can try to use migration to newer gstreamer version to upgrade the Gstreamer version.
2.You can try to use other media processing software to reprocess the generated video file.

After migrating to new Gstreamer version 1.19.2.

I installed deepstream using sudo apt-get install deepstream-6.0.
when I run,
deepstream-app --version
I got below error,
deepstream-app: error while loading shared libraries: libnvmedia.so: cannot open shared object file: No such file or directory

and I run gst-inspect-1.0 --version, I got below errors

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.429: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_infer.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.430: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_ofvisual.so’: libnvdsbufferpool.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.431: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_dewarper.so’: libnvdsbufferpool.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.432: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.433: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.434: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libcustom2d_preprocess.so’: libnvbufsurftransform.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.434: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_segvisual.so’: libnvdsbufferpool.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.498: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferaudio.so’: libnvmedia.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.504: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistreamtiler.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.505: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so’: librivermax.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.508: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_preprocess.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.509: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_tracker.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.511: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_deepstream_bins.so’: libnvdsbufferpool.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.515: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistream.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.517: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_dsexample.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.518: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideoconvert.so’: libnvdsbufferpool.so.1.0.0: cannot open shared object file: No such file or directory
sys:1: Warning: cannot register existing type ‘GstDashDemux’
sys:1: Warning: g_once_init_leave: assertion ‘result != 0’ failed

(gst-plugin-scanner:1693): GStreamer-CRITICAL **: 12:45:52.755: gst_element_register: assertion ‘g_type_is_a (type, GST_TYPE_ELEMENT)’ failed
gst-inspect-1.0 version 1.19.2
GStreamer 1.19.2
Unknown package origin

could anyone help me to resolve this issue.

We are not sure the command can install deepstream correctly: apt-get install deepstream-6.0.
Could you refer to the link below to install deepstream 6.0.1?
https://docs.nvidia.com/metropolis/deepstream/6.0.1/dev-guide/text/DS_Quickstart.html#id3

tried but same thing happen, when I run gst-inspect-1.0 --version

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.429: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_infer.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.430: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_ofvisual.so’: libnvdsbufferpool.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.431: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_dewarper.so’: libnvdsbufferpool.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.432: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.433: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.434: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libcustom2d_preprocess.so’: libnvbufsurftransform.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.434: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_segvisual.so’: libnvdsbufferpool.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.498: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferaudio.so’: libnvmedia.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.504: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistreamtiler.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.505: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so’: librivermax.so.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.508: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_preprocess.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.509: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_tracker.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.511: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_deepstream_bins.so’: libnvdsbufferpool.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.515: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_multistream.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.517: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_dsexample.so’: libnvbufsurface.so.1.0.0: cannot open shared object file: No such file or directory

(gst-plugin-scanner:1693): GStreamer-WARNING **: 12:45:51.518: Failed to load plugin ‘/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libgstnvvideoconvert.so’: libnvdsbufferpool.so.1.0.0: cannot open shared object file: No such file or directory
sys:1: Warning: cannot register existing type ‘GstDashDemux’
sys:1: Warning: g_once_init_leave: assertion ‘result != 0’ failed

(gst-plugin-scanner:1693): GStreamer-CRITICAL **: 12:45:52.755: gst_element_register: assertion ‘g_type_is_a (type, GST_TYPE_ELEMENT)’ failed
gst-inspect-1.0 version 1.19.2
GStreamer 1.19.2
Unknown package origin

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

Could you check if there are libnvbufsurface.so.1.0.0, libnvdsbufferpool.so.1.0.0, libnvbufsurftransform.so.1.0.0… in the path: /usr/lib/aarch64-linux-gnu/tegra/?
If there are these libraries, please use the ldd command to check if the dependent libraries exist.
Why can’t you try to use other media processing tools to process the generated video file?

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