Fast playback of the video

I’m having a problem with the image playing fast.
Sender pipeline

gst-launch-1.0 v4l2src device=/dev/video8 io-mode=mmap 2 ! video/x-raw, width=1920, height=1080, framerate=25/1 ! nvvidconv ! nvv4l2h265enc ! mpegtsmux ! rtpmp2tpay ! udpsink  host= port=11002 

I do not run it as a parse launch, it has a very deep code structure. I wrote this to keep it short.
When the video is spread by appssink with emit signal, when I try to import it with opencv, the image fps looks high. And time is getting shorter.

gst-launch-1.0 udpsrc port=11002 ! application/x-rtp,encoding-name=MP2T,payload=33,clock-rate=90000 ! rtpjitterbuffer latency=300 ! rtpmp2tdepay ! tsdemux ! h265parse ! decodebin ! appsink emit-signal=true sync=false

When I filesink, it records properly from the terminal.
but when I try to import it with opencv, the image is saved very fast.
and time is slipping.
Everything is moving so fast as if it was taken in time lapse and the time is so short.

Probably related to appsink property sync=false. Try to set it as true and see if it changes.

On sender side, you may :

  • try setting v4l2src property do-timestamp to true
  • adding properties insert-sps-pps=1 insert-vui=1 idrintreval=15 to nvv4l2h265enc

and expect first seconds to be not accurate.

There have been some improvements, but there are still problems in time. Sometimes fast, sometimes slow. And it’s recording with a delay.
I wanted to confirm by seeing the image.
I thought of trying ximagesink.
I have encountered such an error.
Warning from element/Gstpipeline:pipeline0 Gstdecodebin:0/GstCapsFilter: capsfilter1: do not negotiated
Additional Debug info:
gstbasetransform .c(1415): gst_base_transform reconfigure (): Gstpipeline: pipeline0
GstDecodebin: decodebin0/GstCapsFilter capsfilter 1: not negotiated
Error : from element/Gstpipeline:pipeline0 GstUdpSrc: udpsrc0 : internal data stream error.
Additional debug info
gstbasesrc.c (3055) gst_base_src () : Gstpipeline:pipeline0/GstUdpSrc:udpsrc streaming stopped, reason not negotiated (-4)

I encountered this error.
I guess there is a problem with the buffer.
I need to spread and save the image without delay. Speed is very important to me, I can change the entire pipeline system if I continue to have a problem with it. It works on an embedded code, but I can change it if it will cause problems.

decodebin may use nvv4l2decoder that would output into NVMM memory in NV12 format. If your appsink can’t process buffers from NVMM memory, you may just use nvvidconv such as:

... ! decodebin ! nvvidconv ! video/x-raw,format=NV12 ! appsink

If your appsink expects another video format, nvvidconv can also convert into various formats. See SRC caps from:

gst-inspect-1.0 nvvidconv

for supported formats. If your expected format is not supported, you would trying adding further videoconvert such as (here converting into BGR):

... ! decodebin ! nvvidconv ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw,format=BGR ! appsink
1 Like

I’m doing tests and I’ll get back to you with the correct result.

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