在android手机上播放rtsp视频流

finalbug 2010-12-13 01:41:36
已经连接成功,而且看RTSP的日志,已经进行PLAY了,可手机上的视频播放器一直显示buffering percentage=0,也就是一直没接收到服务器的视频信息。一串buffering percentage=0之后,连接被teardown了。这个有可能是什么问题呢?百思不得其解。在电脑上看是OK的。一到手机就是这个样子。
...全文
4459 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
yunnanboyit 2012-11-12
  • 打赏
  • 举报
回复
与server端通讯握手是成功的 应该是解码的问题 可以移植对应的解码库
bestilyq 2011-02-16
  • 打赏
  • 举报
回复
应该是UDP方式在内网的问题,试试TCP方式行不行?
zhumaomaozmm 2011-02-16
  • 打赏
  • 举报
回复
htc streaming player能播放H264纯码流么???谢谢!!!
zhumaomaozmm 2011-02-16
  • 打赏
  • 举报
回复
请问楼主在android上使用的是什么流媒体播放器啊?
夭夭 2011-01-08
  • 打赏
  • 举报
回复
是UDP在内网的问题,可以在局域网架一个服务器试试
NorZ 2011-01-07
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 oexpress 的回复:]

刚才试了一下rtsp://dicam.vicp.net:54207/mobile RTSP/1.0这个连接,结果vlcplayer,mplayer都播放不了,说明服务器端有问题,应该不是opencore的问题
[/Quote]

在连接上不需要带RTSP/1.0,这个是和服务器交互的时候自己加上的,表示客户端所使用的RTSP协议版本号
NorZ 2011-01-07
  • 打赏
  • 举报
回复
rtsp://192.168.2.67:54207/mobile 你得在这个连接上指明播放的文件撒,mobile应该是一个文件夹的名称吧?具体的哪一个mp4,得给出来啊
CyberLogix 2010-12-14
  • 打赏
  • 举报
回复
rtsp一些做到了PLAY这个阶段,但是客户端请求数据,server端没有相应,所以就TEARDOWN
至于具体原因可能是server端拒绝访问,具体情况的具体分析
finalbug 2010-12-14
  • 打赏
  • 举报
回复
PLAY rtsp://192.168.2.67:54207/mobile RTSP/1.0

一开始是dicam.vicp.net到后面就成了192.168.2.67. 这个应该是服务器端所在局域网的IP,我肯定访问不了。。。有没有可能是这个问题?

不过我昨天在电脑上用real player播放是OK的。

奇怪了。。
finalbug 2010-12-14
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 oexpress 的回复:]

你的RTSP使用的是什么格式的,MP4还是RMVB还是WMV的,打出LOG我看看
[/Quote]
是mp4格式的。
日志如下:
OpenCore buffer=,
OpenCore len2=0
OpenCore do not use rtsp Proxy
RTSP Server response:
PVMFStatus PVRTSPEngineNode::composeDescribeRequest =
DESCRIBE rtsp://dicam.vicp.net:54207/mobile RTSP/1.0
CSeq: 0
User-Agent: HTC Streaming Player chunghwa/1.0/htc_hero/Hero_2.15_Hiapk
Accept: application/sdp
Bandwidth: 384000
x-wap-profile: http://www.htcmms.com.tw/Android/Common/Bravo/ua-profile.xml
Accept-Encoding

RTSP Server response:
RTSP/1.0 200 OK
CSeq: 0
Date: Tue, Dec 14 2010 03:11:25 GMT
Content-Base: rtsp://192.168.2.67:54207/mobile/
Content-Type: application/sdp
Content-Length: 463

v=0
o=-1292296238890000 1 IN IP4 192.168.2.67
s=Session streamed by "RZ_RTSPServer"
i=mobile
t=0 0
a=tool:RongZhi Streaming Media v2010.01.15
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Session streamed by "RZ_RTSPServer"
a=x-qt-text-inf:mobile
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:512
a=rtpmap:96 MP4V-ES/90000
a=fmtp:96 profile-level-id=1;config=000001B001000001B5090000010000001200086C4003F185020F0A31F
a=control:track1

OpenCore RTP/video/MP4V-ES Bitrate = 512.00kps
OpenCore setPerformance(true)
OpenCore CFLAG_PROJECT_GENERAL
PVMFStatus PVRTSPEngineNode::composeSetupRequest =
SETUP rtsp://192.168.2.67:54207/mobile/trace1 RTSP/1.0
CSeq: 1
User-Agent: HTC Streaming Player chunghwa/1.0/htc_hero/Hero_2.15_Hiapk
Transport: RTP/AVP/UDP; unicast; client_port=7162-7163
Blocksize: 1400
x-wap-profile: http://www.htcmms.com.tw/Android/Common/Bravo/ua-profile.xml

RTSP Server response:
RTSP/1.0 200 OK
CSeq: 1
Date: Tue, Dec 14 2010 03:11:27 GMT
Transport: RTP/AVP;unicast;destination=117.136.0.9;source=192.168.2.67;client_port=7162-7163;server_port=6974-6975
Session: 7D7FEBDB

OpenCore codec name PVMFOMXVideoDecNode, OMX.PV.mpeg4dec
PVMFStatus PVRTSPEngineNode::composePlayRequest =
PLAY rtsp://192.168.2.67:54207/mobile RTSP/1.0
CSeq: 2
Session: 7D7FEBDB
User-Agent: HTC Streaming Player chunghwa/1.0/htc_hero/Hero_2.15_Hiapk
Range: npt=0.000-
x-wap-profile: http://www.htcmms.com.tw/Android/Common/Bravo/ua-profile.xml

(这里是播放器的日志,是buffering percentage=0)

RTSP Server response:
RTSP/1.0 200 OK
CSeq: 2
Date: Tue, Dec 14 2010 03:11:28 GMT
Range: npt=0.000-
Session: 7D7FEBDB
RTP-Info: url=rtsp://192.168.2.67:54207/mobile/track1;seq=47346;rtptime=3375095067

(这里是播放器的日志,buffering percentage=0,大量此日志)

PVMFStatus PVRTSPEngineNode::composeKeepAliveRequest =
OPTIONS rtsp://192.168.2.67:54207/mobile RTSP/1.0
CSeq: 3
Session: 7D7FEBDB
User-Agent: HTC Streaming Player chunghwa/1.0/htc_hero/Hero_2.15_Hiapk

(这里是播放器的日志,buffering percentage=0,大量此日志)

PVMFStatus PVRTSPEngineNode::METHOD_TEARDOWN =
TEARDOWN rtsp://192.168.2.67:54207/mobile RTSP/1.0
CSeq: 4
Session: 7D7FEBDB
User-Agent: HTC Streaming Player chunghwa/1.0/htc_hero/Hero_2.15_Hiapk
x-wap-profile:http://www.htcmms.com.tw/Android/Common/Bravo/ua-profile.xml
Connection: close
OpenCore Socket Error event=3 error=107

然后就是播放器报错了。

帮忙看看,谢谢啦~~
CyberLogix 2010-12-14
  • 打赏
  • 举报
回复
刚才试了一下rtsp://dicam.vicp.net:54207/mobile RTSP/1.0这个连接,结果vlcplayer,mplayer都播放不了,说明服务器端有问题,应该不是opencore的问题
lazyter1 2010-12-14
  • 打赏
  • 举报
回复
PLAY rtsp://192.168.2.67:54207/mobile RTSP/1.0

一开始是dicam.vicp.net到后面就成了192.168.2.67. 这个应该是服务器端所在局域网的IP,我肯定访问不了。。。有没有可能是这个问题?

不过我昨天在电脑上用real player播放是OK的。

奇怪了。。

===================================
real player 能播放的话,就抓一下包,看看它的参数都是怎样的。

比对一下。如果还不行,就说明rtsp 或 rtp包格式对于播放器不识别。

很多厂商的rtsp rtp都标准。好比微软的。
CyberLogix 2010-12-13
  • 打赏
  • 举报
回复
你的RTSP使用的是什么格式的,MP4还是RMVB还是WMV的,打出LOG我看看

2,543

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 多媒体/流媒体开发
社区管理员
  • 多媒体/流媒体开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧