converting Gstreamer pipeline to python script?

yes_yes_yall roryw10 at gmail.com
Tue Apr 25 12:19:09 UTC 2017


Hi,

Im trying to convert a gstreamer pipeline that works to send a video stream
from a jetson tx2 to a reciever (laptop using osx via SSH) and been running
into several headaches. I feel like using Gst.launch() is the easiest way to
do this however ive hit on a brick wall

My original (working) pipelines are....

client_ip =<my_laptop_ip address)

sender

gst-launch-1.0 nvcamerasrc fpsRange="30 30" intent=3 ! nvvidconv
flip-method=6 ! 'video/x-raw(memory:NVMM), width=(int)1920,
height=(int)1080, format=(string)I420, framerate=(fraction)30/1' !
omxh264enc control-rate=2 bitrate=4000000 ! 'video/x-h264,
stream-format=(string)byte-stream' ! h264parse ! rtph264pay mtu=1400 !
udpsink host=$CLIENT_IP port=5000 sync=false async=false

reciever

gst-launch-1.0 udpsrc port=5000 !
application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse !
queue ! avdec_h264 ! autovideosink sync=false async=false -e

in python...

import gi
gi.require_version("Gst", "1.0")
from gi.repository import Gst
Gst.init(None)


CLIENT_IP="192.168.0.2"

pipeline = Gst.parse_launch("""nvcamerasrc fpsRange="30
30" intent=3 ! nvvidconv flip-method=6 ! 'video/x-raw(memory:NVMM),
width=(int)1920, height=(int)1080, format=(string)I420,
framerate=(fraction)30/1' ! omxh264enc control-rate=2 bitrate=4000000 !
'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! rtph264pay
mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false
async=false""")


at which point i hit....

(python:5786): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion
'gst_uri_is_valid (uri)' failed

(python:5786): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion
'gst_uri_is_valid (uri)' failed
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
GLib.Error: gst_parse_error: syntax error (0)


I know this probably seems very basic however i'm new to GStreamer and i
have found the documentation a bit confusing. Any help would be much
appreciated





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/converting-Gstreamer-pipeline-to-python-script-tp4682796.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list