RidgeRun / gst-interpipe

GStreamer plug-in for interpipeline communication
Other
140 stars 63 forks source link

Buffer has no PTS warning using interpipesrc #154

Open Kajatin opened 10 months ago

Kajatin commented 10 months ago

Hello!

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

Kajatin commented 10 months ago

Adding videorate before the encoder actually removes the issue and the recording works.

I wonder if it's expected or if I'm missing something. I'd presume the do-timestamp=true adds valid timestamps on the buffers. 🤔

michaelgruner commented 10 months ago

Hey @Kajatin thanks for the reports, we are going to reproduce on our side. The do-timestamps=true will add timestamps only if the incoming timestamps are invalid (GST_CLOCK_TIME_NONE), which doesn't seems to be your case. I'll be back in a moment.