RTSP在Android上播放视频(编码)

时间:2012-05-22 20:49:16

标签: android rtsp darwin

我有 Darwin服务器,示例视频(来自Darwin安装)正在运行(它们可通过Android Media Player播放)。他们的编码(通过Android日志)是

05-22 02:23:50.544: I/ASessionDescription(117): v=0
05-22 02:23:50.544: I/ASessionDescription(117): o=StreamingServer 3546635030 1110207730000 IN IP4 192.168.1.6
05-22 02:23:50.544: I/ASessionDescription(117): s=\sample_100kbit.mp4
05-22 02:23:50.544: I/ASessionDescription(117): u=http:///
05-22 02:23:50.544: I/ASessionDescription(117): e=admin@
05-22 02:23:50.544: I/ASessionDescription(117): c=IN IP4 0.0.0.0
05-22 02:23:50.544: I/ASessionDescription(117): b=AS:96
05-22 02:23:50.544: I/ASessionDescription(117): t=0 0
05-22 02:23:50.544: I/ASessionDescription(117): a=control:*
05-22 02:23:50.544: I/ASessionDescription(117): a=mpeg4-iod:"data:application/mpeg4-iod;base64,AoJrAE///w/z/wOBdgABQNhkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCxBWUVDQVV3Rkh3TklBTWtnQUdVRUx5QVJBRzNkQUFFaytBQUJKUGdGSUFBQUFiRHpBQUFCdFE3Z1FNRFBBQUFCQUFBQUFTQUFoRUQ2S0RBZzhxSWZCaEFBUkFBQUFsZ0FBQUFBSUFBQUFBQURBVElDbndNdUFHVUFCSUNBZ0JSQUZRQVlBQUFBVGlBQUFFNGdCWUNBZ0FJVmtBWVFBRVFBQUI5QUFBQWZRQ0FnQUFBQUF3PT0EDQEFAADIAAAAAAAAAAAGCQEAAAAAAAAAAANpAAJARmRhdGE6YXBwbGljYXRpb24vbXBlZzQtYmlmcy1hdTtiYXNlNjQsd0JBU2daTUNvRmNtRUVIOEFBQUIvQUFBQkVLQ0tDbjQEEgINAABkAAAAAAAAAAAFAwAAYAYJAQAAAAAAAAAA"
05-22 02:23:50.554: I/ASessionDescription(117): a=isma-compliance:1,1.0,1
05-22 02:23:50.554: I/ASessionDescription(117): a=range:npt=0-  70.00000
05-22 02:23:50.554: I/ASessionDescription(117): m=video 0 RTP/AVP 96
05-22 02:23:50.554: I/ASessionDescription(117): b=AS:76
05-22 02:23:50.554: I/ASessionDescription(117): a=rtpmap:96 MP4V-ES/90000
05-22 02:23:50.554: I/ASessionDescription(117): a=control:trackID=3
05-22 02:23:50.554: I/ASessionDescription(117): a=cliprect:0,0,242,192
05-22 02:23:50.554: I/ASessionDescription(117): a=framesize:96 192-242
05-22 02:23:50.554: I/ASessionDescription(117): a=fmtp:96 profile-level-id=1;config=000001B0F3000001B50EE040C0CF0000010000000120008440FA283020F2A21F
05-22 02:23:50.554: I/ASessionDescription(117): a=mpeg4-esid:201
05-22 02:23:50.554: I/ASessionDescription(117): m=audio 0 RTP/AVP 97
05-22 02:23:50.554: I/ASessionDescription(117): b=AS:20
05-22 02:23:50.554: I/ASessionDescription(117): a=rtpmap:97 mpeg4-generic/8000/2
05-22 02:23:50.554: I/ASessionDescription(117): a=control:trackID=4
05-22 02:23:50.554: I/ASessionDescription(117): a=fmtp:97 profile-level-id=15;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1590
05-22 02:23:50.554: I/ASessionDescription(117): a=mpeg4-esid:101

然而,当我尝试流式传输视频(来自同一台服务器)时,它无法正常工作(它们被暗示和编码)。这是日志:/

05-22 02:24:21.865: I/ASessionDescription(117): v=0
05-22 02:24:21.865: I/ASessionDescription(117): o=StreamingServer 3546635061 1337206009000 IN IP4 192.168.1.6
05-22 02:24:21.875: I/ASessionDescription(117): s=\football_1.mp4
05-22 02:24:21.875: I/ASessionDescription(117): u=http:///
05-22 02:24:21.875: I/ASessionDescription(117): e=admin@
05-22 02:24:21.875: I/ASessionDescription(117): c=IN IP4 0.0.0.0
05-22 02:24:21.875: I/ASessionDescription(117): b=AS:304
05-22 02:24:21.875: I/ASessionDescription(117): t=0 0
05-22 02:24:21.875: I/ASessionDescription(117): a=control:*
05-22 02:24:21.875: I/ASessionDescription(117): a=x-copyright: MP4/3GP File hinted with GPAC 0.4.6-DEV (internal rev. 7) (C)2000-2005 - http://gpac.sourceforge.net
05-22 02:24:21.875: I/ASessionDescription(117): a=range:npt=0-   8.80000
05-22 02:24:21.875: I/ASessionDescription(117): m=video 0 RTP/AVP 96
05-22 02:24:21.875: I/ASessionDescription(117): b=AS:304
05-22 02:24:21.875: I/ASessionDescription(117): a=rtpmap:96 MP4V-ES/90000
05-22 02:24:21.875: I/ASessionDescription(117): a=control:trackID=65536
05-22 02:24:21.875: I/ASessionDescription(117): a=fmtp:96 profile-level-id=1; config=000001b001000001b58913000001000000012000c48d8800550c04241443000001b24c61766335312e34302e34
05-22 02:24:21.875: I/ASessionDescription(117): a=framesize:96 384-288

如何正确编码?

几秒钟后我得到

error (1, -2147483648)

这是(我相信) - 编码错误。

1 个答案:

答案 0 :(得分:0)

问题出在根深蒂固的HTC Desire(CyanogenMod) - RTSP的东西不太对劲:/