All Questions
637
questions
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 ...
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, ...
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.
...
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?
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 "...
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
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 -> ...
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 ...
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 ...
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 ...
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 ...
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 ! ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
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. ...
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 ...
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 ...
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....
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 ...
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 ...
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 ...
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 ...
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/...
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(...
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 ...
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 ...
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 ...
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 ...
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 !...
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" %( ...
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 ...
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 ...
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....