Hi, I’m trying to get the GStreamer UDP running in Python.
I have a testing code which run with no problem
videomixer = 'videomixer name="mix"' sinkpad = 'sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=960 sink_1::ypos=0' videoconver = ' ! videoconvert ! xvimagesink' src1 = 'videotestsrc pattern="snow" ! videoconvert ! mix.sink_0' src2 = 'videotestsrc pattern="colors" ! videoconvert ! mix.sink_1' command = [videomixer, sinkpad, videoconver, src1, src2] command = ' '.join(command) p = Gst.parse_launch(command) p.set_state (Gst.State.PLAYING)
But i’d like to change the videotestsrc to my UDP src:
udpsrc port="8001" ! "application/x-rtp,payload=96,encoding-name=H264,clock-rate=(int)90000" ! rtph264depay ! h264parse ! avdec_h264 ! mix.sink_0 udpsrc port="8002" ! "application/x-rtp,payload=96,encoding-name=H264,clock-rate=(int)90000" ! rtph264depay ! h264parse ! avdec_h264 ! mix.sink_1
Directly replacing src1 and src2 didn’t work, it’s complaining the syntax error (0), which doesn’t help much to see why it’s not working. I’m guessing the problem is with “application/…” that line, not sure how to put in python properly?
Can someone please share some experience ? Thanks!