gst-rtsp-server编译测试

6 篇文章 0 订阅
2 篇文章 0 订阅

第一次写博客,留个爪印。

最近在做dm368的开发,打算在368上移植个gst-rtsp-server。先在电脑上折腾了一天,终于是可以运行了。

我的虚拟机上早先已经安装了gstreamer-0.10(gstreamer版本太新,有些插件不能用)。gstreamer和base,good,ugly,bad相关插件安装没碰到什么问题。下面是我编译gst-rtsp-0.10.8碰到的问题。

1,下载源码包

gst-rtsp-0.10.8.tar.bz2(源地址:http://people.freedesktop.org/~wtay/)

libtool-2.4.tar.gz

gtk-doc-1.18.tar.bz2

2.安装libtool和gtk-doc两个软件包

libtool顺利通过。gtk-doc配置时出错:

checking for DocBook XML DTD V4.3 in XML catalog... found
checking for DocBook XSL Stylesheets in XML catalog... not found

查看地gtk-doc的REAME有说软件的依赖包,可是提供的网址我访问不了。死马当活马医的试了下直接安装xsl竟然成功了。

sudo apt-get install docbook-xsl

再config编译通过。

2.安装gst-rtsp-0.10.8

解压后运行autogen.sh。如果没有安装上面两个包会分别出现下面两个错误。

没有安装libtool:

  checking for libtoolize >= 2.2.6 ...   checking for glibtoolize >= 2.2.6 ... libtoolize not found !

You must have libtoolize installed to compile gst-rtsp.
Download the appropriate package for your distribution,
or get the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/
  checking for pkg-config >= 0.8.0 ... found 0.27.1, ok.

- Please get the right tools before proceeding.
- Alternatively, if you're sure we're wrong, run with --nocheck.


没有安装gtk-doc:

checking for valgrind... no
checking for gobject-introspection... no
checking for gtkdoc-check... no
checking for gtkdoc-rebase... no
checking for gtkdoc-mkpdf... no
configure: error: You need to have gtk-doc >= 1.3 installed to build Gst-RTSP
  configure failed

autogen.sh脚本执行完成后运行make && sudo make install安装。

3.测试gst-rtsp

首先要看下gst-rtsp安装包中doc目录中的README.这个文档介绍了gst-rtsp的使用。examples目录中有示例程序,已经全部编译好了。

先运行个简单的:

$ ./test_readme

另开一终端运行:vlc rtsp://localhost:8554/test成功看到图像。九十年代电视台停播时的画面,好有感觉。

到此gst-rtsp-server是编译的没什么问题了。

示例程序中有个超好用的类似gst-lanuch的工具。

$ ./test_launch "( videotestsrc is-live=1 ! x264enc ! rtph264pay name=pay0 pt=96 )"

这个命令效果跟.test_readme是一样的。

我直接读取摄像头视频的命令就是它了:

$ ./test-launch "( v4l2src ! video/x-raw-yuv,format='fourcc'YUY2,width=640,height=480 ! ffmpegcolorspace ! x264enc ! rtph264pay name=pay0 pt=96 )"

用vlc打开vlc rtsp://localhost:8554/test成功看到图像。

另,gst-rtsp是多播放支持的。


评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值