Ubuntu编译mplayer

** ** mplayer出现如下错误,但是使用vlc则能正常播放 
sdpplin: bad stream_id 65536 (must be >= 0, < 2). Broken sdp? sdpplin: bad stream_id 65537 (must be >= 0, < 2). Broken
 sdp? librtsp: server responds: 'RTSP/1.0 404 Not Found'
 librtsp: server responds: 'RTSP/1.0 454 Session Not Found'
 librtsp: server responds: 'RTSP/1.0 455 Method Not Valid in This State' rtsp_session: session can not be established. 
解决:在configure中加入--enable-live
出现错误:libmpdemux/demux_rtp_internal.h:35:24: fatal error: liveMedia.hh: No such file or directory
./configure --enable-live --extra-cflags=-I/usr/include/liveMedia提示找不到NetCommon
无法解决,直接在软件库中找。
软件库中安装的软件出现的错误依然如上。
** 解决无法使用mplayer进行rtsp传输的问题
   ./configure --enable-live --extra-cflags="-I/usr/local/lib/live/liveMedia/include
   -I/usr/local/lib/live/UsageEnvironment/include 
-I/usr/local/lib/live/BasicUsageEnvironment/include -I/usr/local/lib/live/groupsock/include" 
--extra-ldflags="-L/usr/local/lib/live/liveMedia/libliveMedia.a
   -L/usr/local/lib/live/UsageEnvironment/libUsageEnvironment.a 
-L/usr/local/lib/live/BasicUsageEnvironment/libBasicUsageEnvironment.a 
-L/usr/local/lib/live/groupsock/libgroupsock.a"
** 出现大量的undefined reference to 错误
应该是live555生成的.a文件有问题,尝试在live555 make的时候在config.linux中加入-Wno-deprecated
If you're using "gcc" version 3.0 or greater: You may also wish to add the -Wno-deprecated flag to CPLUSPLUS_FLAGS.
结果:仍然出现相同的问题
原因:mplayer使用的是c语言,live555使用的使c++,详细原因参见:
http://blog.chinaunix.net/space.php?uid=20587912&do=blog&id=405003
解决:将live555编译以后拷贝到/usr/local/lib/
再在mplayer目录下进行编译,./configure不加用任何参数,mplayer会查找/usr/local/lib中的.a文件,并实现rtsp功能。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值