Streaming from opencv with gstreamer

70 views
Skip to first unread message

Venelin Spiridonov

unread,
Sep 27, 2022, 2:12:07 PM9/27/22
to meetecho-janus
Hi,

using the basic setup (VideoRoom->rtp_forward->opencv with gstreamer->streaming plugin), I am able to consume rtp in opencv component correctly. When I stream to streaming plugin tho, I have bad results (see attached).

Here is my writer pipeline:
fourcc = cv2.VideoWriter_fourcc(*'VP80')
out = cv2.VideoWriter('appsrc ! video/x-raw, format=BGR ! videoconvert ! vp8enc ! video/x-vp8 ! rtpvp8pay ! udpsink host=172.18.0.4 port=7777',
fourcc, 30, (640, 480), True)

My question - may I have some advice on how to construct properly the pipeline in order to be understood/visualised correctly by the Streaming plugin?


Best,
Venelin
Screenshot 2022-09-27 at 21.03.46.png

Lorenzo Miniero

unread,
Sep 28, 2022, 4:45:25 AM9/28/22
to meetecho-janus
That may be more of a question for a GStreamer audience. The only suggestion I can give is to check whether or not the problem is the source, so the image you get via appsrc: try putting something that saves the result to a series of images, rather than encoding to video, and that should tell you if the artifacts are in there too (if so, it's not a video encoding problem).

L.

Venelin Spiridonov

unread,
Oct 20, 2022, 6:48:26 AM10/20/22
to meetecho-janus

For the sake of community - this was fixed with apsink drop=True flag. And YES - it is more for the GStreamer guys. Apologies.

Lorenzo Miniero

unread,
Oct 21, 2022, 9:25:22 AM10/21/22
to meetecho-janus
No need to apologize, I do appreciate you coming back to share a fix -- that's always helpful to people looking for solutions to their problems!
Reply all
Reply to author
Forward
0 new messages