gstreamer output with VideoWriter?
Hi, is it possible to use VideoWriter to output directly to gstreamer, something like below? It would be a lot simpler than pushing buffers to appsrc, which I can't find any working code for (python, gstreamer 1.0).
#!/usr/bin/python import time, os, sys import cv2 fourcc = cv2.VideoWriter_fourcc(*'MJPG') stream = cv2.VideoWriter("appsrc ! x264enc ! h264parse ! rtph264pay config-interval=1 pt=96 ! udpsink host=192.168.1.x port=5000 sync=false", fourcc, 30, (1280,720)) capture = cv2.VideoCapture("v4l2src device=/dev/video0 ! image/jpeg,width=1280,height=720,framerate=30/1 ! decodebin ! videoconvert ! appsink") while True: ret,frame=capture.read() stream.write(frame) capture.release() stream.release() cv2.destroyAllWindows()
Did you get the streaming to work?
@ThomCastel, please do not post answers, if you don't have any