?? [轉(zhuǎn)貼]rdt格式--perfect of imperfect.htm
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<title>[轉(zhuǎn)貼]RDT格式--Perfect of imperfect</title>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<META CONTENT="有什么比Vista的Glass效果更眩?那就是Xgl[轉(zhuǎn)貼]RDT格式 博客 博客中國 博客動力 blog blogdriver blogger 中國" NAME="description">
<META NAME="keywords" CONTENT="Perfect of imperfect 有什么比Vista的Glass效果更眩?那就是Xgl[轉(zhuǎn)貼]RDT格式 博客 博客中國 博客動力 blog blogdriver blogger 中國">
<link href="diary.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="/jsp/js/UBB.js"></script>
<script type="text/javascript" src="/jsp/js/blog.js"></script>
</head>
<body>
<div style="width:750px;margin-left:auto;margin-right:auto;text-align:right;font-size:12px;">
<a href="http://www.bokee.com" target="_blank">首頁</a> |
<a href="http://group.bokee.com" target="_blank">博客群</a> |
<a href="http://blogs.bokee.com" target="_blank">公社</a> |
<a href="http://column.bokee.com" target="_blank">專欄</a> |
<a href="http://bbs.bokee.com" target="_blank">論壇</a> |
<a href="http://photo.bokee.com" target="_blank">圖片</a> |
<a href="http://news.bokee.com/" target="_blank">資訊</a> |
<a href="http://reg.bokee.com/account/web/register.jsp"><FONT COLOR="#FF6600">注冊</FONT></a> |
<a href="http://help.bokee.com:8086/help/index.html" target="_blank">幫助</a> |
<a href="http://lianbo.booso.com" target="_blank"><FONT COLOR="#FF6600">博客聯(lián)播</FONT></a> |
<a href="http://ping.bokee.com:81/memcm/random.b"><FONT COLOR="#FF6600">隨機(jī)訪問</FONT></a>
</div>
<div id="container">
<div id="header"><h1 class="title"><a href="index.html">Perfect of imperfect</a></h1></div>
<div id="category"> <a href="4733671.html" title="上一篇">有什么比Vista的Glass效果更眩?那就是Xgl</a>- -|
<a href="index.html">回首頁</a> | <a href="catalog_2006.html">2006年索引</a>
| - -<a href="-1.html" title="下一篇"></a></div>
<div class="entity">
<h2 class="diaryTitle">[轉(zhuǎn)貼]RDT格式</h2><B>關(guān)鍵詞</B>: <a href="http://tag.bokee.com/tag/RDT" target="_blank">RDT</a>
<p>
RDT是Real的私有協(xié)議,這篇文檔并非對RDT格式的標(biāo)準(zhǔn)說明,而是基于MPlayer和Xine的開源代碼和自己對字段的理解而成,如發(fā)現(xiàn)和實際有所出入,請自己權(quán)衡判斷。如果哪位朋友發(fā)現(xiàn)哪里理解錯誤,歡迎指正。另外如果有朋友愿意翻譯一下貼到Xine或MPlayer的論壇,能為他們帶來一些幫助的話,不勝感激。(英文太爛了,)<br /> <br />再次感謝MPlayer和Xine開發(fā)者所做出的貢獻(xiàn)!Thanks MPlayer and Xine!<br /> <br />正常的RDT包應(yīng)該以0x40或0x42開頭(目前尚未發(fā)現(xiàn)其他字節(jié)開頭的正常包),該字節(jié)的第二位標(biāo)明了StreamId,即0x42=1000010,streamid=1;0x40=1000000,streamid=0。<br /> <br />第二和第三個字節(jié)表明了該流的傳輸編號(seq),依次遞增。我認(rèn)為該值應(yīng)該是根據(jù)PLAY RTSP Request的Response中RTP-Info字段中seq中值為基礎(chǔ)遞增的。典型的RTP-Info返回值如:<br /><br /> RTP-Info: url=rtsp://localhost/1.rm/streamid=0;seq=0;rtptime=0, url=rtsp://localhost/1.rm/streamid=1;seq=0;rtptime=0<br /><br />意味著stream 0和stream 1傳輸編號都是從0開始。如果在播放媒體文件當(dāng)中用戶跳轉(zhuǎn),會發(fā)送PAUSE,PLAY指令,該P(yáng)LAY指令返回值的RTP-Info指明了新的seq,意味著客戶端應(yīng)該丟棄該seq前的數(shù)據(jù)包,從該seq數(shù)據(jù)包開始解碼。<br /> <br /><br /> Virtual Example:<br /> --> PLAY rtsp://localhost/1.rm RTSP/1.0 ...... Range: npt=0- .....<br /> <-- RTSP/1.0 200 OK ....... RTP-Info: url=rtsp://localhost/1.rm/streamid=0;seq=0;rtptime=0, url=rtsp://localhost/1.rm/streamid=1;seq=0;rtptime=0<br /> <br /> <-- Transfer Protocol Header(Such as RTSP Embedded Binary Data, see RFC 2326 10.12) 0x40 0x00 0x00 ....<br /> <-- ... 0x40 0x00 0x01 ...<br /> <-- ... 0x42 0x00 0x00 ...<br /> <-- ... 0x40 0x00 0x02 ...<br /> <-- .......<br /> <-- ... 0x40 0x10 0x81 ...<br /> <-- ... 0x42 0x08 0x22 ...<br /> <br /> --> PAUSE rtsp://localhost/1.rm RTSP/1.0 ........<br /> <-- RTSP/1.0 200 OK ......<br /> --> PLAY rtsp://localhost/1.rm RTSP/1.0 ..... Range: npt=500- ...... //Jump to npt 500<br /> <-- RTSP/1.0 200 OK .......RTP-Info: url=rtsp://localhost/1.rm/streamid=0;seq=4227;rtptime=0, url=rtsp://localhost/1.rm/streamid=1;seq=2084;rtptime=0<br /> <br /> <-- ... 0x40 0x10 0x82 .... //Should ignore<br /> <-- ... 0x42 0x08 0x23 ... //Should ignore<br /> <-- ... 0x40 0x10 0x83 ... //That's the right message 0x1083=4227<br /> <-- ... 0x42 0x08 0x24 ... //And so on 0x0824=2084<br /> <-- ... 0x40 0x10 0x84 ...<br /><br />第4個字節(jié)還未研究透徹,但是該字節(jié)的最后一位代表著該包是否為關(guān)鍵幀(keyframe),如果最后一位為0則是keyframe,為1則不是。關(guān)鍵幀的作用是用來建立索引,所有Real媒體的播放和跳轉(zhuǎn)都是從關(guān)鍵幀開始,非關(guān)鍵幀都是根據(jù)關(guān)鍵幀圖像做一些移動和變換所生成,因此不能直接從非關(guān)鍵幀開始播放。<br /><br /> Virtual Example:<br /> <-- ... 0x40 0x00 0x00 0x80 .... //Keyframe<br /> <-- ... 0x42 0x00 0x00 0x00 .... //Keyframe<br /> <-- ... 0x40 0x00 0x00 0x01 ... //Not keyframe<br /><br />第5-8個字節(jié)表明該幀的時間(timestamp),毫秒為單位。<br /> <br />第9-10個字節(jié)常為0。<br /> <br />后面即為正常的數(shù)據(jù)包,根據(jù)不同編碼器而定。<br /> <br /><br /> Virtual Example:<br /> <-- ... 0x42 0x00 0x30 0x41 0x00 0x00 0x05 0x58 0x00 0x00 ......<br /> means: streamid=1, seq=48, keyframe=false, timestamp=1368ms<br /> <-- ... 0x40 0x00 0x20 0x00 0x00 0x00 0x0e 0x83 0x00 0x00 ......<br /> means: streamid=0, seq=32, keyframe=true, timestamp=3715ms<br /><br />非正常的RDT包是在正常的RDT包前面增加了若干字節(jié),猜想類似于RTCP的一些反饋消息,因為實際應(yīng)用中不增加這些字節(jié),RealPlayer的行為沒有發(fā)現(xiàn)任何變化。<br />非正常包的首字節(jié)第1位肯定是1,即>=80 (10000000)<br />Stream End: 0x??0xFF 0x06 0x?? 0x?? 0x00 0x00 0x00 0x00 0x00 0x00<br />判斷流結(jié)束可以判斷第1個字節(jié)不是0x40和0x42,并且第3個字節(jié)是0x06。<br />其中第1個字節(jié)的第3位可以用于判斷是哪個流結(jié)束。如0x82=10000010,0x84=10000100(streamid),第4-5個字節(jié)表示該流發(fā)送的最后一個包的seq。<br />Unknown Packet: 0x?? 0xff 0x08 0x00 0x09 0x?? 0x?? 0x?? 0x?? Normal RDT Packet<br />其中6-10個字節(jié)是一個timestamp,一般從0開始,隨著發(fā)送時間遞增,并越來越接近正常RDT包的timestamp。如,即使播放ntp=10-0,即normal RDT packet timestamp = 10000,unknown RDT packet timestamp = 0,但是越放到后面,該值越接近normal RDT packet,尚不知道其作用。<br />一般除了stream end外,其余非正常RDT可以忽略掉,目前尚未發(fā)現(xiàn)任何不良影響。<br /><br /><a href="http://crmky.blogdriver.com/crmky/435852.html">原文連接</a></p>
<p class="diaryFoot">【作者: <a href="javascript:void(0);" onClick="window.open('http://publishblog.blogchina.com/blog/postMessage.b?receiver=148492','發(fā)送短消息','width=520, height=455')">rockmen1</a>】【訪問統(tǒng)計:<script language="JavaScript" src="http://counter.blogchina.com/PageServlet?pageid=4961895&blogid=260281"></script>】【2006年04月28日 星期五 17:15】【<a href="http://reg.bokee.com/account/web/register.jsp"><FONT COLOR="#FF6600">注冊</FONT></a>】【<a href="javascript:window.print();" >打印</a>】 </td>
</p>
</div>
<div class="operation">
<a name="search"><H3>搜索</H3></a>
<script type="text/javascript">
<!--
function submitFormWithChannel(channelname) {
document.gform.channel.value=channelname;
document.gform.submit();
return;
}
//-->
<!-- End of Script for Clickable Google Logo -->
</script>
<form id="gform" name="gform" method="get" action="http://www.google.cn/search" target="_top">
<table border="0" bgcolor="#ffffff" width=700>
<tr>
<td nowrap="nowrap" valign="center" align="middle" height="32">
<!-- Clickable Google Logo -->
<a href="javascript:submitFormWithChannel('logo')">
<img src="http://blogteam.bokee.com/pub/images/logo_Google.gif" alt="Google" width="75" height="23" border="0" align="middle"> </a>
<!-- END of Clickable Google Logo -->
<!-- Google Web Union Search Box -->
<input type="text" name="q" size="40" maxlength="255" value=""></input>
<input type="button" name="sb" value="站內(nèi)搜索" onclick="javascript:document.getElementById('channel').value='sitesearch';document.getElementById('sitesearch').value='bokee.com';document.getElementById('gform').submit();">
</input>
<input type="button" name="sa" value="搜索" onclick="javascript:document.getElementById('channel').value='internetsearch';document.getElementById('sitesearch').value='';document.getElementById('gform').submit();">
</input>
<input type="hidden" id="sitesearch" name="sitesearch" value="" />
<input type="hidden" name="client" value="aff-bokee">
</input>
<input type="hidden" name="ie" value="gbk">
</input>
<input type="hidden" name="oe" value="gbk">
</input>
<input type="hidden" name="hl" value="zh-CN">
</input>
<input type="hidden" id="channel" name="channel" value="search">
</input></td>
<td nowrap="nowrap"><!-- End of Google Web Union Search Box --> </td>
</tr>
</table>
</form>
</div>
<div class="operation">
<a name="trackback"><H3>Trackback</H3></a>
<p class="trackback">你可以使用這個鏈接引用該篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=4961895
</p>
</div>
<div class="operation">
<a name="relatedDiary"><H3>博客手拉手</H3></a>
<table>
</table>
</div>
<div class="operation">
<a name="comment"><H3>回復(fù)</H3></a>
<table width="700" border="0" cellpadding="0" cellspacing="0">
<tr align="left">
<td rowspan="2" align="center">
<img src="http://blog.bokee.com/img/unknowman.gif">
</td>
<td colspan="4"><H4><a name="comment$(remark.remarkID)"> - 評論人:xiaoxiao</a>
<span> 2007-03-26 10:48:23 <a > <img src="http://blog.bokee.com/img/linkblog.jpg" border="0" > </a>
</span></H4>
</td>
</tr>
<tr align="left">
<td colspan="4" valign="top"><P class="comment">請問在什么情況,會出現(xiàn)stream-end?是不是在網(wǎng)絡(luò)速率不穩(wěn),帶寬不夠的情況下產(chǎn)生?<br>
</P></td>
</tr>
<tr align="left">
<td rowspan="2" align="center">
<img src="http://blog.bokee.com/img/unknowman.gif">
</td>
<td colspan="4"><H4><a name="comment$(remark.remarkID)"> - 評論人:xiaoxiao</a>
<span> 2007-03-26 10:47:31 <a > <img src="http://blog.bokee.com/img/linkblog.jpg" border="0" > </a>
</span></H4>
</td>
</tr>
<tr align="left">
<td colspan="4" valign="top"><P class="comment">請問在什么情況,會出現(xiàn)stream-end?是不是在網(wǎng)絡(luò)速率不穩(wěn),帶寬不夠的情況下產(chǎn)生?<br>
</P></td>
</tr>
</table>
</div>
<div class="operation">
<table width="700" border="0" cellpadding="0" cellspacing="0" class="comment">
<form id="replyForm" method="POST">
<input type="hidden" name="blogID" value="260281">
<input type="hidden" name="diaryID" value="4961895">
<input type="hidden" name="blogDomino" value="rockmen1">
<script>
if(getCookie('userID') == null){
document.write('<tr><td width="70">發(fā)布人:</td>');
document.write('<td width="150"> <input name="remark.authorNameFUI" type="text" size="20" class="inputStyle" maxlength="20"></td>');
document.write('<td width="70">郵箱:</td>');
document.write('<td width="435"> <input name="remark.authorEmail" type="text" size="20" class="inputStyle" maxlength="40"></td>');
document.write('</tr><tr><td>主 頁:</td>');
document.write('<td colspan="3"> <input name="remark.authorURL" type="text" class="inputStyle" value="HTTP://" size="63" maxlength="100"></td></tr>');
}else{
document.write('<input type="hidden" name="remark.authorNameFUI" value="Blogchina網(wǎng)友">');
}
</script>
<tr>
<td width="70">驗證碼:</td>
<td><input name="validateCode" type="text" class="inputStyle" maxlength="4" size="20"></td><td>  <img src="http://publishblog.blogchina.com/servlet/getValidateImg" border="0"></td>
</tr>
<tr align="left">
<td colspan="4">評論內(nèi)容:<br/> <textarea name="remark.remarkFUI" id="remark" cols="60" rows="8" class="textStyle" >
</textarea>
</td>
</tr>
<tr align="left">
<td colspan="4">
<input type="button" value="提交" onClick="reply()" >
<input type="reset" value="重置" > </td>
</tr>
</form>
</table>
</div>
</div>
<script type="text/javascript" src="http://rockmen1.blogchina.com/extend3.js"></script>
<div id="footer"><a href="http://blog.bokee.com/">2003-2004 BOKEE.COM All rights reserved</a><br/>
<a href="http://www.blogdriver.com/">Powered by BlogDriver 2.1</a>
</div>
<script type="text/javascript">
<!--
Empty_show = "empty.gif";
TelSense_ad_output = "ZoneID";
TelSense_ad_format = "";
Product_zoneID = "167";
Web_userID = "193";
//-->
</script>
<!-- <script type="text/javascript" src="http://luliangtest.bokee.com/show.php"> -->
</script>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -