gst-launch pipeline to gstreamer elements, I can't fix the caps

Katerina Voulgary katerina.voulgary at iccs.gr
Thu Sep 17 07:29:02 UTC 2020


Hello, I have the following pipeline in python/opencv that streamed correctly:

  writer = cv2.VideoWriter("appsrc caps=video/x-raw,format=GRAY8,pixel-aspect-ratio=1,width=80,height=60,framerate=9/1 \
   ! queue ! videoconvert ! queue ! videoscale ! capsfilter caps=video/x-raw,format=I420,width=640,height=480,framerate=9/1 \
   ! queue ! omxh264enc bitrate=160000 control-rate=2 profile=1 preset-level=0 ! capsfilter caps=video/x-h264,stream-format=byte-stream \
   ! queue ! rtph264pay pt=96 config-interval=-1 ! udpsink host=192.168.111.228 port=5600 sync=false async=false",cv2.CAP_GSTREAMER,fourcc,9.0,(80,60))

   while True:
     frame = capture(...) #this is from pylepton capture, returns numpy array
     frame = cv2.cvtColor(frame, cv2.COLOR_GRAY2BGR)
     writer.write(frame)

with listener as: udpsrc port=xxx ! application/x-rtp,encoding-name=H264,payload=96 ! queue ! rtph264depay ! decodebin ! videoconvert ! videoscale ! xvimagesink


Now I use gstreamer elements and output is warped like if the caps are wrong. Gstreamer is launched from within gst-build,both listener and transmitter.
I have tried several ways and didn't get anywhere: GST_DEBUG filtered on caps/videoconverter/appsrc,identity element and filesink along the pipeline.
It is probably something simple that I don't see,perhaps there is something that cv2.VideoWriter handles internally and that I missed in the elements?

I attach the test code, if someone wants to take a look or suggest a debug method I thank them very much.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200917/36eef59f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: send.py
Type: text/x-python
Size: 4712 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200917/36eef59f/attachment.py>


More information about the gstreamer-devel mailing list