Skip to content

Implementing Gstreamer command in OpenCV #5

@seabass1217

Description

@seabass1217

Hi,

I'm new to Gstreamer and OpenCV and I'm having problems with implementing gstreamer commands in OpenCV. The below command works fine on the command-line but I cannot figure out how to implement in OpenCV.

Gstreamer command:

st-launch-1.0 rtspsrc location=rtsp://192.168.0.79:8080/h264_ulaw.sdp protocols=udp latency=50 drop-on-latency=true ! queue ! rtph264depay ! h264parse ! nvv4l2decoder enable-frame-type-reporting=1 ! queue ! omxh264enc bitrate=4000000 ! video/x-h264 ! rtspclientsink location=rtsp://localhost:8554/mystream

My OpenCV Code:

cap = cv2.VideoCapture(" rtspsrc rtsp://192.168.0.79:8080/h264_ulaw.sdp ! appsink ") #gst_str = "appsrc ! videoconvert ! omxh264enc ! rtph264pay ! rtspclientsink location=rtsp://localhost:8554/mystream" #out = cv2.VideoWriter(gst_str, 0, 30, (640, 480), True)

Any help is greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions