2008年9月3日星期三

live555 mplayer vlc

使用live555作为rtsp server, 使用VLC可以连接, 而mplayer却不行.

live555 + vlc 信令:
-> options
<- reply
-> describe
<- reply
-> setup
<- reply
-> play
<- reply
<============RTP
-> teardown
<- reply

live555 + mplayer signal:
-> options
<- reply
-> describe
<- reply
-> http get
<- reply rtsp/1.0 400 Bad Request

通过比较可以看出, mplayer的在送出options, describe之后, 并没有送出正常的setup信令, 而是发送了一个http get消息, 导致不能建立连接. 不知有没有解决办法?

在http://www.live555.com/mplayer/有解决方法:
Building MPlayer to support RTSP/RTP streaming
Please do the following steps, in order:

1. Download and build the "LIVE555 Streaming Media" libraries. You may wish to move the resulting "live/" directory to "/usr/local/", "/usr/local/lib/", or "/usr/lib/". (Note: If you do this, you must move the entire "live/" directory - not just the library files.)
2. Download the newest version of the MPlayer source code.
3. If, in Step 1, you moved the "live/" directory to "/usr/local/", "/usr/local/lib/", or "/usr/lib/", run

cd MPlayer* ; ./configure

and check to see whether the "live555" library was automaticaly detected. Otherwise, run

cd MPlayer* ; ./configure --with-extraincdir=

4. Now, build and install MPlayer as usual - i.e.,

make ; make install

(Note that you must build MPlayer with the same version of "gcc" that you used to build the LIVE555 Streaming Media code.)

从http://www.mplayerhq.hu/design7/dload.html下载MPlayer-1.0rc2
$ ./configure --with-extraincdir=/home/frank/exercise/test_live555/live/
$ make

编译成功后即可连接live555 rstp server
$ ./mplayer rtsp://10.0.4.236:8554/para.m4e

没有评论: