Search code examples
pythongstreamerpipelinepython-gstreamer

What is the proper way to link this gstreamer pipeline?


How do I need to link this gstreamer pipeline in python code? (Not by using gst.launch()! )

filesrc ! h264parse ! avimux ! filesink

When I try to create pad object -

h264parse.get_pad('src0') 

it returns NoneType. I am also attaching bufferprobe to this pad.


Solution

  • It is very straight forward, but rather than giving you the code, I suggest you go and read a bit on the topic, try this one: http://www.jonobacon.org/2006/08/28/getting-started-with-gstreamer-with-python/

    The srcpadname for h264parse is 'src', not 'src0' and that is why it returns NoneType. 'src0' is usually only used when you have an element with request-pads (like the Tee) but this is not the case for h264parse.

    Feel free to post a more complete code-attempt if you still can not make it work.