gstreamer

Gstreamer官方教程汇总基本教程3---Dynamic pipelines

删除回忆录丶 提交于 2019-12-07 04:26:43
Goal 本教程介绍剩下的的使用GStreamer的所需的基本概念,它允许随时地建立管道,作为信息变得可用,而不必在你的应用程序的开头定义一个全局的管道。 本教程后,您将具备必要的知识,开始 Playback tutorials 。这个教程将讨论的是: 如何在链接元素时进行更好的控制。 有兴趣的事件如何得到通知,以便您能及时作出反应。 一个元素可以有的不同的状态 Introduction 正如你将要看到的,本教程中的管道没有完全建成之前,它被设置为播放状态。这是确定。如果我们不采取进一步行动,数据将达到管道的末端,只是被丢弃。但是,我们要采取进一步行动... 在这个例子中,我们打开一个复合(或复用)的文件,这就是,音频和视频是 一起 存放在 一个容器文件里面。负责开这样的容器被称为分路器( demuxers )的元素, 一些这样 容器格式的例子是的Matroska(MKV), Quick Time (QT,MOV),OGG,或 Advanced Systems Format (ASF,WMV,WMA)。 如果容器嵌入多个数据流(一个视频和两个音频轨道,例如),分路器将它们分开,并通过不同的输出端口揭露他们。以这种方式,不同的分支可以在管道中被创建,处理不同类型的数据。 通过它的GStreamer元件彼此连通的端口称为 衬垫 ( GstPad )。存在接收端 衬垫( sink

Unable to play .wav file using gstreamer apis

廉价感情. 提交于 2019-12-06 16:45:24
Following code is written to play a .wav file but it doesn't seem to work. I would like to know if i am missing something in it. Code: #include <gst/gst.h> #include <glib.h> int main(int argc , char *argv[]) { GMainLoop *loop; GstElement *source,*audioparser,*sink,*pipeline; GstBus *bus; gst_init(&argc,&argv); // create a pipeline loop = g_main_loop_new (NULL, FALSE); pipeline = gst_pipeline_new ("wav-player"); source = gst_element_factory_make("filesrc","file-source"); audioparser = gst_element_factory_make("wavparse","wav-parser"); sink = gst_element_factory_make("alsasink","sink1"); g

Could not join Multicast group : No such Device

瘦欲@ 提交于 2019-12-06 16:30:57
I would like to stream camera data over UDP multicast using gstreamer. For that i used below pipeline, gst-launch-1.0 v4l2src ! videoconvert ! video/x-raw,width=720,height=576,framerate=25/1 ! x264enc ! mpegtsmux ! rtpmp2tpay ! udpsink host=224.1.1.1 port=9090 auto-multicast=true sync=true async=false qos=true But, I am getting below error, could not get/set settings from/on resource : gstmultiudpsink.c(948): gst_multiudpsink_configure_client (): Could not join Multicast group : No such Device But, the same pipeline is working in Ubuntu14.10 64 bit PC. It didn't work on RHEL7 64 bit PC. These

GStreamer stream audio and video via UDP to be able to playback on VLC

非 Y 不嫁゛ 提交于 2019-12-06 15:43:52
I am trying to stream audio and video via Gstreamer via UDP but playback on VLC only returns video without audio. Currently I am using a sample of Big Buck Bunny and have confirmed that it does have audio. I am planning to use Snowmix to feed media to Gstreamer output in the future. Streaming from file source via UDP to playback on VLC I currently perform by: gst-launch-1.0 -v uridecodebin uri=file:///home/me/files/Snowmix-0.5.1/test/big_buck_bunny_720p_H264_AAC_25fps_3400K.MP4 ! queue ! videoconvert ! x264enc ! mpegtsmux ! queue ! udpsink host=230.0.0.1 port=4012 sync=true which allows me to

Gstreamer官方教程汇总2---GStreamer concepts

为君一笑 提交于 2019-12-06 14:44:28
Manual Hello World 将下面代码copy到一个命名为 basic-tutorial-1.c的文件中。 #include <gst/gst.h> int main(int argc, char *argv[]) { GstElement *pipeline, *source, *sink; GstBus *bus; GstMessage *msg; GstStateChangeReturn ret; /* Initialize GStreamer */ gst_init (&argc, &argv); /* Create the elements */ source = gst_element_factory_make ("videotestsrc", "source"); sink = gst_element_factory_make ("autovideosink", "sink"); /* Create the empty pipeline */ pipeline = gst_pipeline_new ("test-pipeline"); if (!pipeline || !source || !sink) { g_printerr ("Not all elements could be created.\n"); return -1; } /* Build

Gstreamer官方教程汇总1---Hello World

北城以北 提交于 2019-12-06 14:44:11
这个教程是建立在已经安装并配置好gstreamer sdk的基础上的,如果没有安装好 gstreamer sdk,请参看: http://docs.gstreamer.com/display/GstSDK/Installing+the+SDK 代码及操作示例 将下面代码copy到一个命名为 basic-tutorial-1.c的文件中。 #include <gst/gst.h> int main(int argc, char *argv[]) { GstElement *pipeline; GstBus *bus; GstMessage *msg; /* Initialize GStreamer */ gst_init (&argc, &argv); /* Build the pipeline */ pipeline = gst_parse_launch ("playbin2 uri=http://docs.gstreamer.com/media/sintel_trailer-480p.webm", NULL); /* Start playing */ gst_element_set_state (pipeline, GST_STATE_PLAYING); /* Wait until error or EOS */ bus = gst_element_get_bus

Implement multi-stream in Gstreamer

核能气质少年 提交于 2019-12-06 13:45:58
I've written a Gstreamer source plugin, it can produce buffers and transform to downstream elements and do preview. Recently I received a request to implement multi-stream, that one stream to do preview, and the other stream to do recording(using filesink, I suppose). I investigated 'tee' plugin before, but it turns out that it only supports multiple streams with the same formats/resolutions. What plugin should I use if two streams have different formats/resolutions , say, two capsfilters in one pipeline? If there are plugin could do that, could you provide some examples for how to use them?

Capturing jpegs from an h264 stream with gstreamer on a Raspberry Pi

浪尽此生 提交于 2019-12-06 13:40:47
问题 I have one of the new camera add-ons for a Raspberry Pi. It doesn't yet have video4linux support but comes with a small program that spits out a 1080p h264 stream. I have verified this works and got it pushing the video to stdout with: raspivid -n -t 1000000 -vf -b 2000000 -fps 25 -o - I would like to process this stream such that I end up with a snapshot of the video taken once a second. Since it's 1080p I will need to use the rpi's hardware support for H264 encoding. I believe gstreamer is

Needed environment for building gstreamer plugins in Windows

南笙酒味 提交于 2019-12-06 12:55:40
问题 I've been strugling for two weeks to create an environment for building a gstreamer plugin on windows (needed for a songbird addon). I've installed MSYS, MinGW and Cygwin, then installed GStreamer OSSBuild, and I also downloaded the sources for Songbird, which come with their own precompiled version of gstreamer. I was unable to run gst-inspect (or any other gstreamer applications) from the songbird sources and I figured I will settle for OSSBuild (as I was able to run gst-inspect from the

Gstreamer in Android. UDP stream

瘦欲@ 提交于 2019-12-06 12:41:49
I have setup my raspberry pi with the camera board. The code in rpi is: raspivid -t 999999 -h 720 -w 1080 -fps 25 -b 2000000 -o - | gst-launch-0.10 -v fdsrc fd=0 ! h264parse ! rtph264pay ! udpsink host=192.168.2.1 port=5000 and then I run in my mac: gst-launch-1.0 -v udpsrc port=5000 ! application/x-rtp,payload=96,media=video,clock-rate=90000,encoding-name=H264,sprop-parameter-sets=\"J2QAH6wrQCIC3y8A8SJq\\,KO4CXLA\\=\" ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=false The video is showing just fine. Now I have the tutorial 3 of Android Gstreamer and my pipeline is (udpsink