gstreamer

Unable to build GStreamer tutorials using Android Studio

非 Y 不嫁゛ 提交于 2019-11-28 01:13:55
问题 I am trying to build the tutorials that are bundled with gstreamer-sdk-android-arm-debug-2013.6 . The Android.mk file in the src/jni directory (tutorial 1 project) references environment variables such as GSTREAMER_SDK_ROOT . From what I have read, Android Studio does not use/pass environment variables to the build scripts. Is there a best practice for modifying makefiles and for defining/retrieving the key/value pairs required by the build scripts? 回答1: Ok, I have a working solution. You CAN

Write opencv frames into gstreamer rtsp server pipeline

对着背影说爱祢 提交于 2019-11-27 21:45:13
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 exactly if I'm using the right approach. I'm using a thread to start the MainLoop and I'm using the main thread to create a buffer to push in the appsrc element of the mediafactory pipeline. Am I using the right approach to obtain my objective? Can anyone help me? My code is below: from threading import Thread from time import clock import cv2 import gi gi.require_version('Gst', '1.0') gi.require

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

纵饮孤独 提交于 2019-11-27 21:26:57
问题 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 Enter, an another 500Hz test tone is connected to the Adder so you hear them together. (By the way, i don't really get why should i set the pipeline again to playing state here to hear the mix. Is there any way i can plug in new sources without having to restart the pipeline?) When you press Enter

Sending frame by VideoWriter; can't catching it again (OpenCV 3.1, c++)

空扰寡人 提交于 2019-11-27 19:33:35
问题 I am trying to write a simple video streaming application that performs the following tasks: Get a frame from camera this part is working); Modify frame; Send to a gstreamer pipeline. Code: VideoWriter writer; writer.open("appsrc ! rtpvrawpay ! host =localhost port=5000" , 0, 30, cv::Size(IMAGE_WIDTH, IMAGE_HEIGHT), true); while(true){ //get frame etc. writer.write(frame); } VLC player can't see anything with command: vlc -vvv rtp://@localhost:5000 I tried: cv::VideoCapture cap("udpsrc port

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

旧街凉风 提交于 2019-11-27 18:27:59
问题 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 buffer. Specifically, I want to read chunks of the file incrementally rather than reading the whole file into memory. Some specific questions: How can I accomplish this with Gstreamer? With pygst specifically? Is there a particular "sink" element I need to use to read data from the stream? Is

How to use AVSampleBufferDisplayLayer in iOS 8 for RTP H264 Streams with GStreamer?

大憨熊 提交于 2019-11-27 17:54:48
After getting notice of the HW-H264-Decoder being available to programmers in iOS 8, I want to use it now. There is a nice introduction to 'Direct Access to Video Encoding and Decoding' from WWDC 2014 out there. You can take a look here . Based on Case 1 there, I started to develop an Application, that should be able to get an H264-RTP-UDP-Stream from GStreamer, sink it into an 'appsink'-element to get direct access to the NAL Units and do the conversion to create CMSampleBuffers, which my AVSampleBufferDisplayLayer can display then. The interesting piece of code doing all that is the

Gstreamer examples in Android Studio

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 15:40:34
I have been trying to get Gstreamer working in Android studio, following their tutorials, see for example here: https://gstreamer.freedesktop.org/documentation/tutorials/android/link-against-gstreamer.html But in the latest Android studio there is no jni/Android.mk. Where do I put the code at the end of that web page? Should it go in the CMakeLists.txt? Or should something different go in there? Or do I just make an Android.mk file, and if so, where (as there is no jni folder, only a cpp folder)? And how do I tell Android studio where to find my Android.mk file? Thanks! I've made all tutorials

gstreamer python bindings for windows

十年热恋 提交于 2019-11-27 14:05:51
问题 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 Windows gstreamer 1.07 binaries from the gstreamer official website. However, I could not import the pygst and gst modules in python. >>> import pygst Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import pygst ImportError: No module named pygst >>> I checked the

Capturing h.264 stream from camera with Gstreamer

℡╲_俬逩灬. 提交于 2019-11-27 13:56:22
问题 I'm trying to capture H264 stream from locally installed Logitech C920 camera from /dev/video0 with Gstreamer 1.0 v4l2src element. v4l2-ctl --list-formats shows that camera is capable to give H264 video format: # v4l2-ctl --list-formats ioctl: VIDIOC_ENUM_FMT ... Index : 1 Type : Video Capture Pixel Format: 'H264' (compressed) Name : H.264 ... But pipeline # gst-launch-1.0 -vvv v4l2src device=/dev/video0 ! video/x-h264, width=800, height=448, framerate=30/1 ! fakesink keeps giving me not

Playing RTSP with python-gstreamer

荒凉一梦 提交于 2019-11-27 13:49:45
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 ! autovideosink and it work fine. I want to control it with a gui in pygtk so I use the gstreamer python bindings. I've wrote this piece of code: [...] self.player = gst.Pipeline("player") source = gst.element_factory_make("rtspsrc", "source") source.set_property("location", "rtsp://192.168.0.127/axis-media/media.amp") decoder = gst.element_factory_make("decodebin", "decoder") sink = gst.element