Questions tagged [python-gstreamer]
Python bindings for the Gstreamer multimedia framework
python-gstreamer
221
questions
12
votes
1
answer
19k
views
Write opencv frames into gstreamer rtsp server pipeline
I'm trying to put opencv images into a gstreamer rtsp server in python.
I have some issue writing in the mediafactory, I'm new to gst-rtsp-server ancd there's little documentation so I don't know ...
12
votes
1
answer
10k
views
Gstreamer webrtcbin working sample pipeline
Can someone show up to date webrtcbin pipeline? At the moment i use these pipelines and they do not work.
Send:
gst-launch-1.0 webrtcbin bundle-policy=max-bundle name=sendrecv stun-server=stun://...
8
votes
3
answers
29k
views
gstreamer python bindings for windows
I am looking into gstreamer as a means to choose a video device from a list to feed it to an opencv script.
I absolutely do not understand how to use gstreamer with python in windows. I installed the ...
8
votes
2
answers
15k
views
Python send and receive RTP packets
I want to send multimedia data over RTP. What I wnat to know is how to send and receive RTP packets with Python. I found the python class DPKT. But couldn't able to find a good reference to visualize ...
6
votes
2
answers
680
views
How to write a GStreamer plug-in in Cython
I want to prototype a new type of audio filter. At the moment I use GStreamer to return a buffer of my audio, and Cython to apply the filter to it. Then I send the result back to GStreamer.
...
6
votes
2
answers
1k
views
Is it still possible to have standalone Python elements in GStreamer 1.0?
I have an application written with gst-python for GStreamer 0.10 that I am trying to port to GStreamer 1.0.
In my application, I have some custom elements written in Python (subclasses of gst....
5
votes
2
answers
6k
views
Enumerate over cameras in Python
I'm having some trouble enumerating over cameras in Python over multiple OS's.
Here's some of the approaches I've tried:
import cv2 as cv
num = 0
while 1:
cap = cv.VideoCapture(num)
if cap....
5
votes
1
answer
5k
views
Sink restart on failure without stopping the pipeline
today I decided to transform my little script, based on gst-launch, into a real Python/GStreamer application, in order to add some features.
I developed a little program which send the audio from my ...
5
votes
3
answers
18k
views
Gstreamer Missing plugins
I am trying to run certain pipelines on the Command prompt for playing a video and I am often getting these errors/messages/warnings :
WARNING: erroneous pipeline: no element "qtdemux"
WARNING: ...
5
votes
1
answer
8k
views
Python - No module named pygst
I'm using virtualenv on Ubuntu 14.04 with Python 2.7.13, and I'm trying to get import pygst to work (I'm a complete Python noob).
I downloaded:
https://gstreamer.freedesktop.org/src/gst-python/gst-...
5
votes
3
answers
7k
views
How to install python "gi" module in virtual environment?
I have looked at this, and tried the following code:
ln -s /usr/lib/python2.7/dist-packages/pygtk.pth tools/python_2_7_9/lib/python2.7/site-packages/
ln -s /usr/lib/python2.7/dist-packages/gobject ...
5
votes
1
answer
1k
views
gstreamer 1.0 + python: dynamic link and unlink queues from a PLAYING pipeline
Pipeline architecture I'm trying to implement
The script works well when both the queues are linked together before setting the pipeline to PLAYING, but I'm having a hard time understanding Gstreamer ...
5
votes
0
answers
4k
views
How to set channel positions/a channel mask in gstreamer?
I'm trying to get 28 channels out of a jackaudiosrc but as soon
as I connect, say, a deinterleave element, the source will fall back to
the 2-channel setup that works without any channel mask. My ...
4
votes
3
answers
10k
views
Seamless video loop in gstreamer
I'm trying to loop the video playback using gstreamer and it's python bindings. First attempt was to hook EOS message and generate seek message for the pipeline:
import gi
gi.require_version("Gst", "...
4
votes
1
answer
4k
views
python bindings for gstreamer: how to import typelib
I was building gstreamer latest version on my raspberry pi. I wanted to have python bindings, hence I installed gobject-introspection-1.0 and pygobject-3.18.2 before compiling the gstreamer and its ...
4
votes
1
answer
15k
views
How to RTSP stream a video using Gstreamer and Python?
I have a code that currently takes one video and show it in screen using the gstreamer bindings for Python. I can seek the video when a "Forward" button is clicked at the player opened, and that is an ...
4
votes
1
answer
1k
views
PyGObject or PyGtk
I need to write a program on my Raspberry Pi to get a video and audio stream with Gstreamer from network and play them.(I have two stream. one for video and one for audio) and i need a custom GUI. I ...
4
votes
1
answer
799
views
Play audio through muliple channels with python
Is there a way in python to play two different mono mp3 files through the left and right channels?
I have two mp3 files and I want to play one through the left speaker and the other mp3 through the ...
4
votes
1
answer
5k
views
Gstreamer Multifilesrc loop short video
I was wondering if it is possible to even get the multifilesrc to work. I am on the latest gstreamer version and cannot make a simple video loop. I've tried so many iterations of the above, to show a ...
4
votes
0
answers
2k
views
How to create GStreamer RTSP server with variable frame rate
I have an application which requires me to consume an RTSP stream, extract frames from the video, perform some processing on the video frames, annotate the frames, then restream the video as a new ...
4
votes
0
answers
2k
views
Pushing sample/ buffers from AppSink to AppSrc
I need to implement an architecture where I can push data from AppSink to
Appsrc.
Now, I can't figure out if it can be done within the same pipeline or I
would need two pipelines to achieve this. ...
4
votes
0
answers
2k
views
Play live h264 encoded video RTSP stream using kivy
I have a c++ program that uses live555 in a winapi kernel event-loop that passes images from a camera to libopenh264 and then served as an RTSP stream using ffmpeg. The stream can be viewed fine ...
4
votes
0
answers
615
views
Get the window handle in PyGI on MacOS
I use PyGObject/PyGI and GStreamer to show a video in my GUI. The video is shown in a Gtk.DrawingArea and therefore I need to get it's window-handle in the realize-signal-handler. On Linux I can ...
4
votes
0
answers
2k
views
Gstreamer with Bad Quality. Packet Loss
I'm new to Gstreamer and for some reason the quality of my stream is off. It looks like there are some packet loss. I created a pipeline on my Raspberry Pi 2 and another pipeline on my PC. Could ...
3
votes
3
answers
8k
views
Gstreamer EOS message handling in filesink to change location on the fly
Trying to switch output files on the fly, but can't handle EOS.
http://gstreamer-devel.966125.n4.nabble.com/Dynamically-updating-filesink-location-at-run-time-on-the-fly-td4660569.html
Quote:
...
3
votes
1
answer
2k
views
GStreamer Python decodebin, jpegenc elements not linking
I'm starting out using GStreamer using the gst-python bindings. An example I'm working on is reading in an .mp4 file, encoding it in a MJPEG stream and saving it in an .avi container. The pipeline I'...
3
votes
1
answer
2k
views
Drop buffers in gstreamer
I am developing a gstreamer application (plugin) that sinks from a video stream, analyzes each buffer for a certain condition and then if that condition is present passes the buffer to the plugin ...
3
votes
1
answer
2k
views
How to send data from a file to webrtcbin element in gstreamer?
I am a beginner with gstreamer so bear with me.
I have a working pipeline where audio and video from a test source is sent to the webrtcbin element used to send out offer. Pipeline is as follows:
...
3
votes
3
answers
8k
views
Restarting GStreamer Pipeline in Python on EOS
I am working on a Python script running on RPi3, and using gstreamer to connect to RTSP feed of my IP Camera, and serve decoded H264 frames to my Python script.
Here is the gstreamear pipeline used ...
3
votes
2
answers
1k
views
How to use pocketsphinx (5prealpha) with gstreamer-1.0 in python?
I am trying to create a small Python script that will receive an audio stream over the network, feed it through pocketspinx to translate speech to text and run some commands depending on the output of ...
3
votes
2
answers
2k
views
Gstreamer is installed but not built with OpenCV
I'm trying to stream a video from my PC to another
I started with a basic example, this one https://stackoverflow.com/a/51543002/9492711
I configured the udpsink host properly to map to my pc, but I'm ...
3
votes
2
answers
2k
views
In Python with GStreamer, how do I use a file object as the input source?
I am currently doing:
source_path = 'file:///home/raj/videos/sample.mpg'
descr = 'uridecodebin uri=%s ! videoconvert ! gdkpixbufsink name=sink' % (source_path)
pipeline = Gst.parse_launch(descr)
But ...
3
votes
0
answers
817
views
Gstreamer rtsp connection breaks if two gst clients are requesting for the rtsp stream
I have a question about gstreamer. I made a streaming server using gst-rtsp-server.
IP cameras were connected to server with opencv videocapture function.
class VideoCapture:
def __init__(self, ...
3
votes
0
answers
360
views
Gstreamer tee branch with appsink slows down the whole pipeline, how to process buffer async?
I have a deepstream pipeline which goes like this:
reading and processing video --> queue --> tee --> queue --> display
|----> queue --> ...
3
votes
0
answers
1k
views
How to change the currently playing file in a gstreamer pipeline without restarting the pipeline?
For some reason we have had trouble finding working solutions to this problem online.
Right now our source is a filesrc element. Our current non-solution is to change the pipeline's state to READY, ...
3
votes
1
answer
2k
views
Gsteamer rtp video mixer, found a working pipeline, however need improvement
I'm attempting to mix multiple rtp h264 payload video streams into a single video stream of 15FPS.
A working pipeline that mixes two video streams over a videotestsource pattern of 15FPS
VIDEO_CAPS=...
2
votes
1
answer
3k
views
DrawingArea Cannot Get XID
I have the following Python 2.7/PyGObject 3.0/PyGST 0.10 module:
from gi.repository import Gtk, Gdk, GdkPixbuf
import pango
import pygst
pygst.require('0.10')
import gst
import Trailcrest
import os, ...
2
votes
4
answers
6k
views
How to get error messages from python Gst.Bus
I have a program that is expected to fail with an error. I am writing the logic to handle those errors.
The program fails while doing, pipeline.set_state(Gst.State.READY). The return code confirms ...
2
votes
1
answer
4k
views
RTMP via GStreamer and Python
I am trying to port the following GStreamer command into a python program:
gst-launch-0.10 -v -m v4l2src ! queue ! ffmpegcolorspace ! queue ! x264enc pass=pass1 threads=0 bitrate=1536 tune=...
2
votes
2
answers
2k
views
TypeError: Gst.Bin.add() takes exactly 2 arguments (5 given)
I have been using gstreamer since some few weeks. Still I am not much aware of how things work internally. So I was following some tutorials online to learn how I can use it in efficient way. Here is ...
2
votes
3
answers
2k
views
gstreamer appsrc causes random crashes
I'm trying to setup a GStreamer appsrc as a video source, but even a trivial program does not work at all and produces random crashes or hangings so far. Could you please help to spot the problem? ...
2
votes
2
answers
2k
views
How to wait for x264enc to encode buffered frames on end-of-stream
I have a Python GStreamer application that uses appsrc to record mp4 files.
The issue is that despite specifying tune=zerolatency for x264enc, there is latency, and the output video is truncated ...
2
votes
1
answer
2k
views
How do you access Gstreamer Registry to get a list of what plugins are available programatically
I want to build a list of the audiovisualiser elements to be able to offer them in a dropdown list within a python program and same for audio effects but how do you access the gstreamer-1.0 registry.
2
votes
1
answer
3k
views
Improve OpenGL rendering speed
I've built a small video player that grabs frames (as a string/byte array) from a movie by using GStreamer and then renders each frame to an OpenGL texture. This goes fine up to 30 fps 1080p movies, ...
2
votes
2
answers
572
views
TypeError: unknown type GstFraction
I am trying to use Gstreamer with python bindings in order to search for available cameras on my system. As a result I would like to obtain a list of devices with their corresponding capabilities (...
2
votes
1
answer
3k
views
GStreamer Python record and save desktop video
I have the following command line code:
gst-launch-1.0 ximagesrc startx=0 use-damage=0 ! video/x-raw,framerate=30/1 ! videoscale method=0 ! video/x-raw,width=1280,height=1080 ! ximagesink
Is it ...
2
votes
1
answer
3k
views
Python GStreamer: getting Meta Api for appsink buffer
I am using GStreamer to capture video from a USB webcam (Logitech C920) in H264, and I want to analyze the h264 frames before potentially decoding or streaming them to the net.
Based on different ...
2
votes
0
answers
353
views
How to connect picamera2 with Gstreamer
I would like to use picamera2 together with Gstreamer, using a Raspberry Pi Zero 2W and a Picamera Module V2, having in mind that:
During the operation, I will need to change the resolution, crop the ...
2
votes
0
answers
299
views
How to properly terminate server instance in python gstreamer api and restart with new settings?
I have written a simple python API to control a gstreamer RTSP server.
I have a couple of configurable parameters for the stream that I want to change from the API.
The way I stop the stream does ...
2
votes
0
answers
266
views
How change source of file, while playing? - GStreamer
I am trying to create a program, that creates a HLS stream of two images, which switch when I input into the keyboard. I have this sample code:
import gi
gi.require_version("Gst", "1.0&...