Questions tagged [python-gstreamer]

Python bindings for the Gstreamer multimedia framework

211 questions
2
votes
4 answers

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 that. What I am looking for is a means of…
Timothy Prime
  • 136
  • 1
  • 11
2
votes
0 answers

How to create MPEG2 Transport Stream in real-time?

I'd like to write software that generates audio in real-time and streams it over the network/internet as an MPEG2 Transport Stream. Ideally the solution would be in Python (though Java would be ok too). Basically I'd like to end up with code that…
aengus
  • 21
  • 1
2
votes
1 answer

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 sources on the internet, I constructed a python2.7…
user37544
  • 305
  • 4
  • 7
2
votes
1 answer

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, but when I try a 60 fps movie, it can't keep up…
2
votes
1 answer

Python + GStreamer: scale video to window

I'm having some trouble rescaling video output of GStreamer to the dimension of the window the video is displayed in (retaining aspect ratio of the video). The problem is that I first need to preroll the video to be able to determine its dimensions…
Daniel Schreij
  • 773
  • 1
  • 10
  • 26
2
votes
1 answer

How Do I Add and Remove Dynamic Audio Devices in Python Gstreamer

I am attempting to write a Gstreamer Python program that will control the Whole Home Audio system in my house. The basic premise is that I will have multiple different options for sources (Pandora, MP3, Google Music, etc.) and will be able to play…
Amazinzay
  • 85
  • 1
  • 7
2
votes
0 answers

Drawing pixels on top of Gstreamer

I'm trying to build an application in Python that can draw things on top of video. I have not found a way to do this using gstreamer + Tkinter; I don't think tk lets you do transparent Canvases. So I've looked at using gtk instead, but I'm a bit…
Roy
  • 305
  • 1
  • 6
2
votes
1 answer

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=zerolatency ! queue ! flvmux name=mux pulsesrc ! queue…
Dominik Schreiber
  • 769
  • 2
  • 15
  • 25
1
vote
1 answer

draw graph of encoded bit rate of video vs play location

I am trying to measure the variation in the bandwidth required when a video is played over the network. For this purpose, i need to make a graph of the bandwidth required to play the video continuously at any time during the video. I tried…
1
vote
0 answers

Save webcam snapshot to file

When I run this, I get the cam snapshot on the file: gst-launch-0.10 v4l2src num-buffers=1 ! jpegenc ! filesink location=pic.jpg I tried to put that in Python and instead of the pic I get an empty file. Can someone tell where the mistake is? It's a…
1
vote
1 answer

gstreamer - Wadsworth's constant thumbnailer

I'm trying to build a video thumbnailer using gst-python, it looks like this. from __future__ import division import sys import logging import pdb _log = logging.getLogger(__name__) logging.basicConfig() _log.setLevel(logging.DEBUG) try: …
joar
  • 15,077
  • 1
  • 29
  • 54
1
vote
1 answer

Gstreamer WebRTC callee can't send video to remote

We are writing a sample code of webrtc to transmit/receive video/audio to/from browser with GStreamer. We are referencing the demo: https://github.com/centricular/gstwebrtc-demos/blob/master/sendrecv/gst/webrtc_sendrecv.py. It works fine. But there…
Jim Jin
  • 1,249
  • 1
  • 15
  • 28
1
vote
0 answers

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 indeed prevent new connections from being made(so…
1
vote
0 answers

How to extract output data from a GStreamer pipeline in real time and assign to a variable in python

I'm trying to get the output from a pipeline in GStreamer and assign the data to a variable. Unfortunately, I'm getting an error saying the type should be in "float()" and not in Pipeline. Thanks In advance
1
vote
0 answers

gstreamer overlay alpha composite two webm VP9 files

What command do I need to overlay or alpha composite two vp9 webm video files on top of each other in gstreamer ? inputs foreground.webm background.webm output foreground_over_background.webm from reading the NVidia GStreamer documentation, page…
OneWorld
  • 163
  • 2
  • 12