我有小型计算机(类似于Arduino或Raspberry pi),上面安装了Linux,摄像头和gstreamer.我需要使用WebRTC技术将h264视频从此设备传输到浏览器.此外,我使用NodeJS作为信令服务器.
简单来说,我需要从我的设备上做一个WebRTC客户端.做这个的最好方式是什么?我可以使用WebRTC Native API实现此目标吗?如何在我的小型设备上安装它?或者,也许,我只需要玩我的gstreamer并为它安装一些webrtc插件?
我想编写一个需要播放跟踪结果的对象跟踪程序.由于gstreamer是一个很好的多媒体框架工作,我想在我的演示程序中使用它.但我不知道如何详细实现视频显示.任何人都可以帮忙吗?
Avidemux插件可以将音频和视频部分与avi文件分开,但接下来该怎么做?
如果我打开一个未压缩的avi文件,如果我直接将avidemux插件的输出板链接到视频接收器,它是否有效?
那么哪个视频接收器在效率方面更好?我查了一下插件参考,发现了很多视频接收器:glimagesink,osxvideosink,sdlvideosink,ximagesink,xvimagesink,dfbvideosink,fbdevsink,gconfvideosink autovideosink是否总能正常工作?我的平台是ubuntu 9.04.
TIA〜
我想使用Qt创建一个可以播放本地视频文件的简单GUI应用程序.我可以使用Phonon完成幕后的所有工作,但我需要更多的控制.我已经使用decodebin和autovideosink元素成功实现了GStreamer管道.现在我想使用Qt小部件将输出引导到.
有没有人成功过这样做?(我想是因为有基于Qt的视频播放器建立在GStreamer之上.)有人能指出我正确的方向如何做到这一点吗?
注意:此问题类似于我之前发布的有关如何将Qt与传入RTP流连接的问题.这似乎非常具有挑战性.我想这个问题会更容易回答.
Patrice建议使用libVLC非常有用.这是VLC网站上的代码的一个更简洁的版本: Qt + libVLC的示例.但是,我原来的问题仍然存在:如何将GStreamer连接到Qt小部件?
经过一些实验,我最终得到了这个工作样本.它取决于我自己的小GstSupport库中的GstWidget.h和GstWidget.cpp.但请注意,目前仅在Mac版的Qt上进行了测试.
我正在使用Python连接gstreamer应用程序.我得到一个LinkError与以下代码:
import pygst
pygst.require('0.10')
import gst
import pygtk
pygtk.require('2.0')
import gtk
# this is very important, without this, callbacks from gstreamer thread
# will messed our program up
gtk.gdk.threads_init()
def main():
pipeline = gst.Pipeline('pipleline')
filesrc = gst.element_factory_make("filesrc", "filesrc")
filesrc.set_property('location', 'C:/a.mp3')
decode = gst.element_factory_make("decodebin", "decode")
convert = gst.element_factory_make('audioconvert', 'convert')
sink = gst.element_factory_make("autoaudiosink", "sink")
pipeline.add(filesrc, decode, convert, sink)
gst.element_link_many(filesrc, decode, convert, sink)
pipeline.set_state(gst.STATE_PLAYING)
gtk.main()
main()
Run Code Online (Sandbox Code Playgroud)
而错误:
ImportError: could not import gio
Traceback (most recent call last):
File "H:\workspace\ggg\src\test2.py", line 37, in <module> …Run Code Online (Sandbox Code Playgroud) gstreamer文档中有很多关于构造和运行静态管道的例子.然而,在实时管道中改变/重新链接元素并没有多少- 而媒体实际上正在流动.这绝对是可能的,所以问题是:
接受的答案将是勺子喂,全面,并与源代码
我想在Gstreamer中播放mp4视频,但是我找不到x264dec的错误.我写了这个管道
gst-launch filesrc \
location=/media/thesis/Gstreamer/pub_Irma.mp4 \
! qtdemux name=demux demux. ! queue ! faad \
! audioconvert ! audioresample ! autoaudiosink demuxer. \
! queue ! x264dec ! ffmpegcolorspace ! autovideosink
Run Code Online (Sandbox Code Playgroud)
在此步骤之后,我的目标是生成mp4视频解码的执行跟踪.我不知道x264dec的问题在哪里.
我从他们的网站下载并安装了Gstreamer iOS库.我将教程复制到我自己的文件夹,并尝试在Xcode中构建项目.我收到以下链接器错误.
我没有找到关于此的线索.Gstreamer.framework与所有目标相关联.
Undefined symbols for architecture armv7:
"_iconv_open", referenced from:
__nl_find_msg in GStreamer(libintl_a_armv7_-dcigettext.o)
(maybe you meant: _g_iconv_open)
"_iconv", referenced from:
__nl_find_msg in GStreamer(libintl_a_armv7_-dcigettext.o)
(maybe you meant: _iconv_canonicalize, _g_iconv_close , _g_convert_with_iconv , _g_iconv , _g_iconv_open )
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)
我在这里错过了什么?
没有框架问题.我只需要在Build Phases中添加libiconv.dylib - >使用库链接二进制文件.之后没有链接器错误!
我需要为Xamarin Studio(Gtk #project)安装gstreamer-sharp.我安装了OSSBuild并添加到引用gstreamer-sharp.dll,调试后我得到了异常:
Gst.GLib.GException:Gst.Parse.Launch中没有元素"playbin"(String pipeline_description)
输出:
0:00:00.010000000 6224 0748AA00 ERROR GST_REGISTRY gstregistrybinary.c:557:gst_registry_binary_read_cache: Binary registry type not recognized (invalid magic) for file at C:\Users\Admin\.gstreamer-0.10\registry.i686.bin
** (gStremTest:6224): WARNING **: Failed to load plugin 'C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\libgsf-win32-1-114.dll': `C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\libgsf-win32-1-114.dll': ?? ?????? ????????? ??????.
** (gStremTest:6224): WARNING **: Failed to load plugin 'C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\libpangocairo-1.0-0.dll': `C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\libpangocairo-1.0-0.dll': ?? ??????? ????????? ?????????.
** (gStremTest:6224): WARNING **: Failed to load plugin 'C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\librsvg-2-2.dll': `C:\Program Files (x86)\OSSBuild\GStreamer\v0.10.6\bin\librsvg-2-2.dll': ?? ?????? ????????? ??????.
0:00:02.501003000 6224 0748AA00 …Run Code Online (Sandbox Code Playgroud) 我需要通过RTSP从我的相机获取视频流并将其保存到文件中.所有这些都需要通过gstreamer来完成.
经过一些谷歌搜索,我尝试了以下内容:
gst-launch-1.0 rtspsrc location=rtsp://192.168.1.184/live2.sdp ! queue ! rtph264depay ! avdec_h264 ! mp4mux ! filesink location=result3.mp4
Run Code Online (Sandbox Code Playgroud)
但它给出了错误:"错误的管道:无法将avdec_h264-0链接到mp4mux0"
gst-launch-1.0 rtspsrc location=rtsp://192.168.1.184/live2.sdp ! queue ! rtph264depay ! h264parse ! mp4mux ! filesink location=result3.mp4
Run Code Online (Sandbox Code Playgroud)
它开始工作,但结果文件无法通过VLC播放.
什么是正确的命令?如果你在h264parse和avdec_h264之间做出选择,你能解释一下原因吗?
我正在尝试使用opencv和python以及简单的代码来使用网络摄像头拍摄视频
import numpy as np
import cv2
cap = cv2.VideoCapture(0)
print('cap.isOpened')
if cap.isOpened():
print ('cap is opened')
while(True):
re,img=cap.read()
cv2.imshow("video output", img)
k = cv2.waitKey(10)&0xFF
if k==27:
break
cap.release()
cv2.destroyAllWindows()
Run Code Online (Sandbox Code Playgroud)
如果我尝试播放现有的视频,如.mp4文件,它工作正常.但是当我尝试使用网络摄像头时出现错误
GStreamer-CRITICAL**:gst_element_get_state:断言'GST_IS_ELEMENT(element)'cap.isOpened失败
有关更多信息,我正在使用odroid xu4和ubuntu 16.04,网络摄像头我使用logitech c170(它在网络摄像头测试和使用guvcview正常工作)认为它不适用于奶酪和camorama.
需要帮助,请...