All Questions

Tagged with
Filter by
Sorted by
Tagged with
46 votes
3 answers
23k views

Create rtsp stream based on opencv images in python

My goal is to read frames from an rtsp server, do some opencv manipulation, and write the manipulated frames to a new rtsp server. I tried the following based on Write in Gstreamer pipeline from ...
Max la Cour Christensen's user avatar
38 votes
5 answers
93k views

Python extract wav from video file

Related: How to extract audio from a video file using python? Extract audio from video as wav How to rip the audio from a video? My question is how could I extract wav audio track from video file, ...
xolodec's user avatar
  • 843
25 votes
1 answer
467 views

Scheduled pause in Gnonlin

I am using Gnonlin to play two videos. At one moment, I would like to pause one video and run another. However, I don't want to manually pause the pipeline, as the other video also will be paused. ...
Thothadri Rajesh's user avatar
14 votes
4 answers
8k views

How do I find the length of media with gstreamer?

How do I find the playback time of media with gstreamer?
joeforker's user avatar
  • 41.2k
13 votes
5 answers
29k views

ModuleNotFoundError: No module named 'gi'

I am trying to run the following program: import gi gi.require_version('Gst', '1.0') from gi.repository import GObject, Gst Bu I am getting: Traceback (most recent call last): File "...
Gabrielle's user avatar
  • 812
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 ...
WisdomPill's user avatar
12 votes
2 answers
32k views

GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1

I am using the OpenCV package with the face_recognition package to detect faces on my laptop webcam. Whenever I run it, the code runs fine but I run into the same GStreamer error. from imutils.video ...
Kai Strachan's user avatar
11 votes
1 answer
4k views

Why does python gstreamer crash without "gobject.threads_init()" at the top of my script?

I have written a python script to use gstreamer (pygst and gst modules) to calculate replaygain tags, and it was crashing inconsistently with various gobject errors. I found somewhere that you could ...
Ryan C. Thompson's user avatar
11 votes
1 answer
14k views

How to pipe live video frames from ffmpeg to PIL?

I need to use ffmpeg/avconv to pipe jpg frames to a python PIL (Pillow) Image object, using gst as an intermediary*. I've been searching everywhere for this answer without much luck. I think I'm close ...
Ryan Martin's user avatar
  • 1,663
11 votes
1 answer
12k views

gstreamer critical error when trying to capture video using webcam python opencv

i'm trying to take a video with webcam using opencv and python with a simple code import numpy as np import cv2 cap = cv2.VideoCapture(0) print('cap.isOpened') if cap.isOpened(): print ('cap is ...
Shinogami Rei's user avatar
10 votes
2 answers
27k views

Problems with Gst in python program

I'm in trouble making a simple server/client socket python program. Basically, my server (RPi3) has to stream a video (with Gstreamer) to the client (Fedora 24). The problem is that in my Fedora, I ...
fedejinkis's user avatar
10 votes
1 answer
6k views

Gstreamer of python's gst.LinkError problem

I am wiring a gstreamer application with Python. And I get a LinkError with following code: import pygst pygst.require('0.10') import gst import pygtk pygtk.require('2.0') import gtk # this is ...
Fang-Pen Lin's user avatar
  • 13.9k
10 votes
2 answers
22k views

How to convert a video (on disk) to a rtsp stream

I have a video file on my local disk and i want to create an rtsp stream from it, which i am going to use in one of my project. One way is to create a rtsp stream from vlc but i want to do it with ...
shahidammer's user avatar
  • 1,066
9 votes
5 answers
7k views

How to create video thumbnails with Python and Gstreamer

I'd like to create thumbnails for MPEG-4 AVC videos using Gstreamer and Python. Essentially: Open the video file Seek to a certain point in time (e.g. 5 seconds) Grab the frame at that time Save the ...
David Planella's user avatar
9 votes
5 answers
18k views

Play audio and video with a Pipeline in Gstreamer

Is there a way make a pipeline that will play any video file (which will contain audio too)? I have tried linking elements like: filesrc -> decodebin along with queue -> audioconvert -> ...
D K's user avatar
  • 5,630
9 votes
3 answers
4k views

Gst-python is installed, but can't find plugins

I'm trying to run some Gstreamer examples for the Google Coral USB accelerator - I'm not using the Coral dev board. The driver is installed and works and I can classify images from my camera using ...
Josh's user avatar
  • 2,703
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 ...
Raoul's user avatar
  • 1,892
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 ...
Huá dé ní 華得尼's user avatar
8 votes
1 answer
5k views

Use (Python) Gstreamer to decode audio (to PCM data)

I'm writing an application that uses the Python Gstreamer bindings to play audio, but I'm now trying to also just decode audio -- that is, I'd like to read data using a decodebin and receive a raw PCM ...
adrian's user avatar
  • 1,457
8 votes
1 answer
3k views

Python having trouble accessing usb microphone using Gstreamer to perform speech recognition with Pocketsphinx on a Raspberry Pi

So python is acting like acting like it can't hear ANYTHING from my microphone at all. Here's the problem. I have a Python ( 2.7 ) script that is suppose to be using Gstreamer to access my microphone ...
Malcolm Jones's user avatar
8 votes
2 answers
5k views

Add some OpenCV processing to a gstreamer video stream

I'm trying to have OpenCV process a frame in the middle of a gstreamer pipe. I have one gstreamer pipe generating the stream, sending it to appsink for OpenCV code to receive: v4l2src ! ...
SMiLE's user avatar
  • 1,083
7 votes
3 answers
8k views

Python: Detect codecs used in a video container

I have a couple of video container files which contain audio and video in various codecs. Now I'd like to inspect the container from a Python script to know which codec is used for audio+video. This ...
Felix Schwarz's user avatar
7 votes
3 answers
7k views

gstreamer uri vs files: Cannot play local video file

I am new to gstreamer and trying to use it for some GPU accelerated video decoding on my NVIDIA Jetson ARM based board. I found some python code online which creates a gstreamer pipeline and I was ...
Luca's user avatar
  • 10.8k
7 votes
1 answer
2k views

Playing video in Gtk in a window with a menubar

I have created a video player in Gtk3 using Gstreamer in Python3. It works except when I add a GtkMenuBar (place 2). It will then either show a black screen, or fail with an exception. The exception ...
Aaron Schif's user avatar
  • 2,431
7 votes
1 answer
1k views

Display image without gtk

I would like to display an image in Python using gstreamer bindings, but without using GTK+ (I'm on ARM). I know how to listen to music with python and gstreamer : #!/usr/bin/python # Simply ...
jlengrand's user avatar
  • 12.4k
7 votes
2 answers
4k views

WARNING: erroneous pipeline: no element "kvssink"

I'm trying Kinesis Video Stream via https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/gs-send-data.html I have already installled it Success in building the Kinesis Video Streams Producer ...
huynv's user avatar
  • 71
6 votes
5 answers
38k views

No module named gi

i have try all the possible command given below: pip install pgi , pip install PyGObject , pip install python-gi Still not able to install the module in python . Installed python 3.7 also try to ...
HARSH BHATNAGAR's user avatar
6 votes
1 answer
13k views

Write in Gstreamer pipeline from opencv in python

I'm trying to stream some images form opencv using gstreamer and I got ome issues with the pipeline. I'm new to gstreamer and opencv in general. I compiled opencv 3.2 with gstreamer for python3 on a ...
WisdomPill's user avatar
6 votes
3 answers
23k views

Install gstreamer support for opencv python package

I have built my own opencv python package from source. import cv2 print(cv2.__version__) prints: 3.4.5 Now the issue I am facing is regarding the use of gstreamer from the VideoCapture class of ...
Basti Vagabond's user avatar
6 votes
4 answers
4k views

Cannot load python gstreamer elements

I'm following a guide at https://mathieuduponchelle.github.io/2018-02-01-Python-Elements.html?gi-language=undefined to create a sample gstreamer element in Python. However, I can't get GStreamer to ...
JDong's user avatar
  • 2,304
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. ...
Flavian Hautbois's user avatar
6 votes
4 answers
8k views

Python + QT + Gstreamer

I'm working with PyQt and trying to get video from a webcam to play within a QT widget. I've found tutorials for C and Qt, and for python and gtk, but NOTHING for this combo of pyQt and gstreamer. ...
Ptterb's user avatar
  • 336
6 votes
4 answers
6k views

How to rip the audio from a video?

I am on ubuntu and want to convert a mp4 video to an mp3 audio file but can't figure out how. I tried installing ffmpeg but it failed to encode the mp3. I've read the gstreamer does it but I can't ...
lovefaithswing's user avatar
6 votes
1 answer
5k views

How te retrieve stream statistics in Gstreamer?

First of all I would like to start by saying that I'm really new to Gstreamer and its capabilities so pardon my ignorance if my understanding or implementation was wrong, I am still learning . I ...
Andi Domi's user avatar
  • 741
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....
Joppe's user avatar
  • 1,495
6 votes
2 answers
5k views

How to prebuffer an incoming network stream with gstreamer?

I'm using gstreamer to stream audio over the network. My goal is seemingly simple: Prebuffer the incoming stream up to a certain time/byte threshold and then start playing it. I might be overlooking a ...
Nir's user avatar
  • 1,416
6 votes
2 answers
277 views

use maemo camera by python

I wrote a simple program for Maemo by Python to check some pixel's color every time that my function is called. But this function runs very slowly (3-5 seconds each call). Is there any faster way to ...
LABOOOOX's user avatar
6 votes
1 answer
2k views

How do I read a GStreamer RTSP video stream as WebRTC data using Python aiortc?

I'm trying to create a low latency stream (sub second) using GStreamer and Python's aiortc library for creating a WebRTC peer for the stream data. I've modified the server example from aiortc and can ...
ahanson's user avatar
  • 2,138
6 votes
1 answer
634 views

Creating Segments in Video

I'm using Python 2.7, PyGTK 2.24, and PyGST (Gstreamer). To ensure smooth playback from one clip to another (without a blink), I combined all the clips I needed into one larger video. This lets me ...
CodeMouse92's user avatar
  • 6,878
6 votes
0 answers
3k views

Have trouble streaming RTP/ RTSP stream from OpenCV-Python

I am trying to use this sample script I found here in order to take OpenCV images and convert them into a rtp/rtsp stream: https://github.com/madams1337/python-opencv-gstreamer-examples/blob/master/...
user3377126's user avatar
  • 2,131
6 votes
0 answers
854 views

Python OpenCV memory leak

After each execution of the code, 150 MB of memory leaks out. cam = cv2.VideoCapture('rtsp://admin:[email protected]:554/Streaming/Channels/101') ret_val, img = cam.read() ret_val = cv2.imwrite(str(...
Ruslan Z.'s user avatar
6 votes
1 answer
3k views

ImportError: [libraryname].so: undefined symbol: [function name]

I'm extending my Python program with a C module that uses the GstPhotography interface for GStreamer. My C module compiles fine, but when I try running it from Python, I get this error: $python ...
13guppies's user avatar
5 votes
2 answers
10k views

ImportError: cannot import name GstRtspServer, introspection typelib not found

Im trying to get a simple GstRtspServer program working on an external amazon linux EC2 server at the moment, but I am having serious issues getting it to actually run. No matter what I do I keep ...
CaptainScags's user avatar
5 votes
2 answers
10k views

Not able to install new wxpython

I am working on Debian Stable Linux and python 3.5 and I am trying to install the new wxpython (phoenix) using following command: pip3 install --upgrade wxpython However, it stops with following ...
rnso's user avatar
  • 24k
5 votes
2 answers
13k views

How to create x264 RTSP server with OpenCV Python with GStreamer backend

My goal is to create a RTSP server using OpenCV Python using the GStreamer backend. I have RGB images stored as OpenCV Mat, and I would like to create a VideoWriter which can write to a RTSP sink. The ...
cyrusbehr's user avatar
  • 1,201
5 votes
2 answers
30k views

Playing RTSP with python-gstreamer

I use gstreamer for playing RTSP stream from IP cameras (like Axis.) I use a command line like this: gst-launch-0.10 rtspsrc location=rtsp://192.168.0.127/axis-media/media.amp latency=0 ! decodebin !...
tirlototo's user avatar
  • 111
5 votes
2 answers
1k views

How do I use the Discoverer module with pygi GstPbutils?

I'm trying to port some pygtk music player code to pygi which uses gst's discoverer module. from gi.repository import Gst, GstPbutils def on_discovered(discoverer, ismedia): print("%s -- %s" %( ...
bryce's user avatar
  • 468
5 votes
1 answer
8k views

Adding and removing audio sources to/from GStreamer pipeline on-the-go

I wrote a little Python script which uses an Adder plugin to mix two source streams together. After starting the program, you hear a 1kHz tone generated by the audiotestsrc plugin. When you press ...
NagyI's user avatar
  • 5,937
5 votes
2 answers
7k views

Python GStreamer webcam viewer

I'working on this nice example that shows a webcam output in a GTK widget with python and GStreamer: http://pygstdocs.berlios.de/pygst-tutorial/webcam-viewer.html here is the code: #!/usr/bin/env ...
Mauro Bianchi's user avatar
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....
aczh's user avatar
  • 61

1
2 3 4 5
13