gst-rtsp-server编译测试

最近在做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 ! vpuenc codec=6 ! rtph264pay name=pay0 pt=96 )"

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

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

$ ./test-launch "(  mfw_v4lsrc device=/dev/video0 ! queue ! vpuenc codec=6 ! rtph264pay name=pay0 pt=96 )"

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

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

 

http://m.blog.csdn.net/blog/zhoudekuai_tjsd/8539432

 

posted @ 2015-07-25 11:26  苏博  阅读(4238)  评论(0编辑  收藏  举报