Buffer has no PTS warning using interpipesrc

Hello!

DISCLAIMER: I understand interpipe is not NVIDIA’s product. I’m hoping someone here has some insights into my problems though.

I started using interpipe in my application to have a dedicated component that streams from a camera and then implement multiple different components that could connect to the stream independently from each other.

I ran into some problems when I tried to create a component that would encode the stream and write to a file.

Platform: NVIDIA Jetson Orin NX device running JetPack 5.
Kernel: 5.10.104-tegra
Version of interpipe: 1.1.8

Here’s the source pipeline:

nvarguscamerasrc aeregion="1200 1000 2800 2000 1" sensor-id=0 wbmode=0 exposurecompensation=0.5 tnr-strength=0.4 ee-strength=0.1 gainrange="1 4" ispdigitalgainrange="1 4" aelock=0 ! video/x-raw(memory:NVMM), width=(int)4032, height=(int)3040, framerate=10/1, format=(string)NV12 ! tetonvideofilter ! nvvidconv flip-method=0 ! video/x-raw(memory:NVMM) ! interpipesink name=tetonshutter

This is the receiving part:

interpipesrc name=tetonshuttersrc is-live=true do-timestamp=true format=3 listen-to=tetonshutter ! video/x-raw(memory:NVMM), format=(string)NV12 ! nvv4l2h265enc name=encoder bitrate=10000000 maxperf-enable=true ! video/x-h265 ! h265parse ! qtmux ! filesink location=demo.mp4

This pipeline doesn’t play. I get the following warning from the qtmux plugin saying:
qtmux gstqtmux.c:4832:gst_qt_mux_add_buffer:<qtmux0> error: Buffer has no PTS.​

I should say that leaving the interpipe parts out and launching a single pipeline does record as expected.

I have attached 2 logs: 1 for the pipeline that doesn’t work and uses interpipe​, and 1 for the pipeline without the interpipe​ part that does work (all other plugins are the same).

fail.log
success.log

Hi,
You may try the pipelines and see if either one works:

  1. Use matroskamux plugin:
interpipesrc name=tetonshuttersrc is-live=true do-timestamp=true format=3 listen-to=tetonshutter ! video/x-raw(memory:NVMM), format=(string)NV12 ! nvv4l2h265enc name=encoder bitrate=10000000 maxperf-enable=true ! video/x-h265 ! h265parse ! matroskamux ! filesink location=demo.mkv
  1. Add videorate plugin:
interpipesrc name=tetonshuttersrc is-live=true do-timestamp=true format=3 listen-to=tetonshutter ! video/x-raw(memory:NVMM), format=(string)NV12 ! videorate ! nvv4l2h265enc name=encoder bitrate=10000000 maxperf-enable=true ! video/x-h265 ! h265parse ! qtmux ! filesink location=demo.mp4
  1. Add videorate + use matroskamux plugins
  2. Encode to h265 stream:
interpipesrc name=tetonshuttersrc is-live=true do-timestamp=true format=3 listen-to=tetonshutter ! video/x-raw(memory:NVMM), format=(string)NV12 ! nvv4l2h265enc name=encoder bitrate=10000000 maxperf-enable=true ! video/x-h265 ! h265parse ! filesink location=demo.h265
1 Like

Hi,

Thank you for your suggestions.

  1. Using matroskamux actually plays the pipeline and I get a video file. Only issue is that the .mkv file is not seekable. Playing it in VLC media player says the video is 0 seconds long (and not seekable). Yet it plays the frames in the right order (as much as I can tell).

  2. The videorate plugin does remove the PTS warning and I get a video file which has an expected file size. However, this .mp4 file is corrupt and not playable.

  3. Same as 1.

  4. What information could I extract from this stream that might help me debug the problem?

Hi,
For generating a valid mp4, you would need to send EoS signal. For C programming, you may refer to the sample:
GStreamer freeze when using qtmux and NVIDIA-accelerated h264/h265 encoding - #7 by DaneLLL

In gst-launch-1.0 command, please set -e
gst-launch-1.0(1) — gstreamer1.0-tools — Debian unstable — Debian Manpages

1 Like

Thank you.

Adding videorate to the pipeline and waiting on the EOS signal produces a valid and seekable .mp4 file.

1 Like

unrelated: where does tetonvideofilter come from ?

That’s a custom plugin I wrote. It applies TNR using the VPI library.

1 Like

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