[gst-devel] rtsp / real

Matt Vinall matt at vinall.net
Fri Jul 28 10:33:19 CEST 2006


> My rdtdecode element does exactly that (will submit it if I get the
> whole thing working). I just don't know what do do with the remaining
> data (i.e. without the rdt header).
> 

I'm still very much on a learning curve in this area myself, but ...  I have an 
audio-only stream captured from the BBC (via NetTransport) which gets saved as 
a .ra file. I think this is the sort of thing that forms an input to rmdemux. I 
also have a tool that produces xml output from a realmedia file. The initial 
xml fragment is below, as is the output from hexdump on the .ra file. I've also 
shown some of the SDP from the response to RTSP/DESCRIBE, for a different BBC 
radio stream. The <fileHeader> and <streamHeaders> sections seem to match 
fields from the SDP, so I think you probably need to pass those on somehow. 
However, I don't know what you'd do about fields like "Duration" for a live 
stream. Note that the bufferSize attribute of <packet> = 640, which is close to 
some values 0x028C in the hexdump. So, I think the packet header in a realmedia 
file is probably 12 bytes, although haven't verified this in rmdemux. The first 
packet seems to start at offset 0x182 in the hexdump, with first data payload 
at 0x18e. That's about as much as I know, so I guess it's probably a case of 
sifting through rmdemux with this info.

Hope this helps.

Matt


xml fragment:
------------

<?xml version="1.0"?>
<mediaFile>
    <fileHeader>
        <properties>
            <propertyULONG32 name="Flags" value="9" />
            <propertyULONG32 name="IsRealDataType" value="1" />
            <propertyULONG32 name="StreamCount" value="1" />
            <propertyBuffer name="Author" value="QkJDIFJhZGlvIDQA"/>
            <propertyBuffer name="Copyright" 
value="KEMpIEJyaXRpc2ggQnJvYWRjYXN0aW5nIENvcnBvcmF0aW9uIDIwMDYA"/>
            <propertyBuffer name="Title" 
value="UmFkaW8gNCBXZWRuZXNkYXkgQ29tZWR5DQA="/>
        </properties>
    </fileHeader>
    <streamHeaders>
        <streamHeader>
            <properties>
                <propertyULONG32 name="ActualPreroll" value="2321" />
                <propertyULONG32 name="AvgBitRate" value="44100" />
                <propertyULONG32 name="AvgPacketSize" value="640" />
                <propertyULONG32 name="Duration" value="1801866" />
                <propertyULONG32 name="EndOneRuleEndAll" value="1" />
                <propertyULONG32 name="EndTime" value="1799894" />
                <propertyULONG32 name="MaxBitRate" value="44100" />
                <propertyULONG32 name="MaxPacketSize" value="640" />
                <propertyULONG32 name="Preroll" value="4642" />
                <propertyULONG32 name="StreamNumber" value="0" />
                <propertyBuffer name="OpaqueData" 
value="LnJh/QAFAAAucmE1AAAAEAAFAAAATgAXAAACgACXaAAABQv+AAAAAAAQAoAAgAAAAACsRAAAr
EQAAAAQAAJnZW5yY29vawECAAAAAAAQAQAAAwgAACUAAAAAAAIABA=="/>
                <propertyBuffer name="RMFF 1.0 Flags" value="AAIAAgAA"/>
                <propertyCString name="ASMRuleBook" 
value="priority=5,averagebandwidth=44100,PNMKeyFrameRule=T;priority=5,averageban
dwidth=0,PNMNonKeyFrameRule=T,OnDepend="0",OffDepend="0";" /
>
                <propertyCString name="intrinsicDurationType" 
value="intrinsicDurationContinuous" />
                <propertyCString name="MimeType" value="audio/x-pn-realaudio" />
                <propertyCString name="StreamName" value="audio/x-pn-multirate-
realaudio logical stream" />
            </properties>
        </streamHeader>
    </streamHeaders>
    <packets>
        <packet streamNum="0" timestamp="0"  asmFlags="0x03" asmRuleNum="0" 
bufferSize="640" crc32="2003460540" />
        <packet streamNum="0" timestamp="116"  asmFlags="0x03" asmRuleNum="1" 
bufferSize="640" crc32="2907348201" />

Output from hexdump:
--------------------

00000000  2e 52 4d 46 00 00 00 12  00 00 00 00 00 00 00 00  |.RMF............|
00000010  00 05 50 52 4f 50 00 00  00 32 00 00 00 00 ac 44  |..PROP...2....¬D|
00000020  00 00 ac 44 00 00 02 8c  00 00 02 8c 00 00 3c 90  |..¬D..........<.|
00000030  00 1b 76 d6 00 00 09 11  00 9a 40 42 00 00 01 70  |..vÖ...... at B...p|
00000040  00 01 00 09 43 4f 4e 54  00 00 00 5f 00 00 00 19  |....CONT..._....|
00000050  52 61 64 69 6f 20 34 20  57 65 64 6e 65 73 64 61  |Radio 4 Wednesda|
00000060  79 20 43 6f 6d 65 64 79  0d 00 0b 42 42 43 20 52  |y Comedy...BBC R|
00000070  61 64 69 6f 20 34 00 29  28 43 29 20 42 72 69 74  |adio 4.)(C) Brit|
00000080  69 73 68 20 42 72 6f 61  64 63 61 73 74 69 6e 67  |ish Broadcasting|
00000090  20 43 6f 72 70 6f 72 61  74 69 6f 6e 20 32 30 30  | Corporation 200|
000000a0  36 00 00 4d 44 50 52 00  00 00 cd 00 00 00 00 00  |6..MDPR...Í.....|
000000b0  00 ac 44 00 00 ac 44 00  00 02 80 00 00 02 80 00  |.¬D..¬D.........|
000000c0  00 00 00 00 00 09 11 00  1b 7e 8a 2d 61 75 64 69  |.........~.-audi|
000000d0  6f 2f 78 2d 70 6e 2d 6d  75 6c 74 69 72 61 74 65  |o/x-pn-multirate|
000000e0  2d 72 65 61 6c 61 75 64  69 6f 20 6c 6f 67 69 63  |-realaudio logic|
000000f0  61 6c 20 73 74 72 65 61  6d 14 61 75 64 69 6f 2f  |al stream.audio/|
00000100  78 2d 70 6e 2d 72 65 61  6c 61 75 64 69 6f 00 00  |x-pn-realaudio..|
00000110  00 5e 2e 72 61 fd 00 05  00 00 2e 72 61 35 00 00  |.^.raý.....ra5..|
00000120  00 10 00 05 00 00 00 4e  00 17 00 00 02 80 00 97  |.......N........|
00000130  68 00 00 05 0b fe 00 00  00 00 00 10 02 80 00 80  |h....þ..........|
00000140  00 00 00 00 ac 44 00 00  ac 44 00 00 00 10 00 02  |....¬D..¬D......|
00000150  67 65 6e 72 63 6f 6f 6b  01 02 00 00 00 00 00 10  |genrcook........|
00000160  01 00 00 03 08 00 00 25  00 00 00 00 00 02 00 04  |.......%........|
00000170  44 41 54 41 00 9a 3e d2  00 00 00 00 3c 90 00 00  |DATA..>Ò....<...|
00000180  00 00 00 00 02 8c 00 00  00 00 00 00 00 02 77 c5  |..............wÅ|
00000190  11 c1 2a e8 21 62 37 c5  11 f2 37 c5 11 f2 37 c5  |.Á*è!b7Å.ò7Å.ò7Å|
000001a0  11 f2 37 c5 11 f2 37 c5  11 f2 37 c5 11 f2 37 c5  |.ò7Å.ò7Å.ò7Å.ò7Å|
*
00000200  11 f2 37 c5 11 f2 37 c5  11 f2 37 c5 11 f2 77 c5  |.ò7Å.ò7Å.ò7Å.òwÅ|
00000210  00 dc 1e 65 d6 68 e8 49  79 71 47 45 ca 7e 7b 90  |.Ü.eÖhèIyqGEÊ~{.|
00000220  4b 7f e2 5a 1f c7 13 af  26 a4 4b fd c5 61 9c 42  |K.âZ.Ç.¯&¤KýÅa.B|
00000230  6a c4 5a 52 32 3f fe 1a  0a 5c ee 7c 0e 12 d7 14  |jÄZR2?þ..\î|..×.|
00000240  25 88 c4 2c 2b 4f 9a d2  3f 27 91 2b 98 99 ac ec  |%.Ä,+O.Ò?'.+..¬ì|
00000250  e3 87 2c f7 40 a4 d9 7b  f4 9e 9e 7c 97 15 4d e0  |ã.,÷@¤Ù{ô..|..Mà|
00000260  ba 46 1e 0b c2 9a ef 36  bd 40 58 b0 8e 60 fb 2e  |ºF..Â.ï6½@X°.`û.|
00000270  7e fb 9f 4e 8b 38 18 1a  6f 72 3b 36 49 73 68 2a  |~û.N.8..or;6Ish*|
00000280  75 48 0b 2f 3a 89 49 8c  95 c8 b3 5f 64 f2 77 c5  |uH./:.I..ȳ_dòwÅ|
00000290  03 52 ab 42 97 ea 0e 96  7f f1 27 c1 71 34 9a 69  |.R«B.ê...ñ'Áq4.i|
000002a0  5e af 89 7c f9 6b b9 ae  ae aa a9 7e 6c 81 e6 f6  |^¯.|ùk¹®®ª©~l.æö|
000002b0  0d 75 48 1a eb b9 5a 09  43 58 4c fa 51 1d ca a0  |.uH.ë¹Z.CXLúQ.Ê |
000002c0  a7 14 1e 90 2d 2d 67 30  cc fc 71 57 60 b4 6f a9  |§...--g0ÌüqW`´o©|
000002d0  57 67 61 98 0a e0 64 57  57 a4 ea 1a 31 9d 6c 0c  |Wga..àdWW¤ê.1.l.|
000002e0  1e 51 5d 7e 17 ef 4a aa  92 98 ae 41 7d 9b bf 82  |.Q]~.ïJª..®A}.¿.|
000002f0  fe a2 5a 70 06 a2 0b 15  36 24 63 81 19 a5 ff 0d  |þ¢Zp.¢..6$c..¥ÿ.|
00000300  7a 12 ca 0b c9 8f 3a 7e  d3 dc 79 be 7d b2 77 c5  |z.Ê.É.:~ÓÜy¾}²wÅ|
00000310  1c df 60 a5 63 fc 9b 11  37 3a eb de 32 f5 06 a0  |.ß`¥cü..7:ëÞ2õ. |
00000320  07 db a2 86 83 90 ae 91  28 d6 7b 3f 60 23 24 fb  |.Û¢...®.(Ö{?`#$û|
00000330  8d 86 6b 3b 62 c1 9e 2e  ba e7 fa 63 6a 02 ff 73  |..k;bÁ..ºçúcj.ÿs|
00000340  cf fd 68 cc 79 38 82 32  f8 e4 85 a7 c7 3f 18 ac  |ÏýhÌy8.2øä.§Ç?.¬|
00000350  64 2b d1 5d 8e 73 f8 ad  48 ea 86 49 70 31 fc 18  |d+Ñ].sø­Hê.Ip1ü.|
00000360  94 fb a3 09 1d 78 0d 0f  42 db 3a 29 72 20 07 5d  |.û£..x..BÛ:)r .]|
00000370  e2 d5 ae e6 45 06 87 34  14 48 31 50 13 c8 81 42  |âÕ®æE..4.H1P.È.B|
00000380  f7 b5 86 0e 95 cd 01 d5  60 44 90 8e 29 5a 77 c5  |÷µ...Í.Õ`D..)ZwÅ|
00000390  03 58 78 a9 b7 15 7b c2  37 f8 92 89 65 92 04 e3  |.Xx©·.{Â7ø..e..ã|
000003a0  9f 41 94 f9 df 15 bc 81  64 6f 2e 23 66 ce 8a d8  |.A.ùß.¼.do.#fÎ.Ø|
000003b0  9a 93 5f 2c e0 9f 81 14  c1 a8 8b 3c 43 bf 4e c7  |.._,à...Á¨.<C¿NÇ|
000003c0  22 9c 8b d4 9e cc 3d 08  55 63 89 78 e6 ff 47 25  |"..Ô.Ì=.Uc.xæÿG%|
000003d0  3e 2a 95 29 dd 77 f0 e7  46 c9 a7 f4 0a 85 7e a3  |>*.)ÝwðçFɧô..~£|
000003e0  03 5a d8 5e 5a 98 5b 23  0e 50 9e ef bb 37 06 8e  |.ZØ^Z.[#.P.ï»7..|
000003f0  28 fa 81 cf 57 d8 e4 5f  b4 a7 23 54 1d 84 f8 b1  |(ú.ÏWØä_´§#T..ø±|
00000400  30 ec 88 a0 83 a3 6d 32  83 ca 28 4e 75 f2 00 00  |0ì. .£m2.Ê(Nuò..|
00000410  02 8c 00 00 00 00 00 74  00 00 92 a5 11 f5 22 6e  |.......t...¥.õ"n|

fragment of SDP:
----------------

v=0

o=- 3560917663 3560917663 IN IP4 212.58.224.93

s=BBC 6 Music

i=RealSystem Broadcast Distribution

b=AS:124

t=0 0

a=SdpplinVersion:1610641702

a=Flags:integer;2

a=AvgBitRate:integer;124376

a=DataOffset:integer;1534

a=AvgPacketSize:integer;640

a=IsRealDataType:integer;1

a=LiveStream:integer;1

a=Preroll:integer;2321

a=StreamCount:integer;1

a=Indexable:integer;1

a=MaxPacketSize:integer;640

a=MaxBitRate:integer;124376

a=NumInterleavePackets:integer;0

a=IndexOffset:integer;0

a=Title:buffer;"QkJDIDYgTXVzaWMA"

a=Copyright:buffer;"KEMpIEJyaXRpc2ggQnJvYWRjYXN0aW5nIENvcnBvcmF0aW9uIDIwMDYA"

a=Author:buffer;"QkJDAA=="

a=Comment:buffer;"AA=="

a=Modification Date:string;"2/3/2006 17:25:42"

a=Content Rating:string;"(PICS-1.1 \"http://www.classify.org/safesurf\" labels 
comment \"RealProducer Plus 8.5.0.391 Solaris\" ratings (SS~~000 1))"

a=Generated By:string;"RealMedia Build Engine 6.0.11.402 Unix"

a=Target Audiences:string;"28K Modem (20 Kbps);56K Modem (34 Kbps);"

a=Audio Format:string;"No Audio"

a=Video Quality:string;"No Video"

a=Creation Date:string;"2/3/2006 17:25:42"

m=audio 0 RTP/AVP 101

b=AS:44

a=control:streamid=0
a=length:npt=0

a=rtpmap:101 x-pn-multirate-realaudio-live/1000

a=mimetype:string;"audio/x-pn-multirate-realaudio-live"

a=MinimumSwitchOverlap:integer;200

a=StartTime:integer;0

a=AvgBitRate:integer;44100

a=AvgPacketSize:integer;640

a=SeekGreaterOnSwitch:integer;0

a=Preroll:integer;4642

a=IsInterleaved:integer;16

a=MaxPacketSize:integer;640

a=MaxBitRate:integer;44100

a=RMFF 1.0 Flags:buffer;"AAoAAgAAAAIAAAACAAAAAgAAAAIAAA=="

a=OpaqueData:buffer;"TUxUSQAKAAAAAAABAAEAAgACAAMAAwAEAAQABQAAAFYucmH9AAUAAC5yYTU
AAAFgAAUAAABGAAEAAAFgAAAAAAABQv8AAAAAAAgBYAAgAAAAACsRAAArEQAAABAAAWdlbnJjb29rAQI
AAAAAAAgBAAABAQAADAAAAF4ucmH9AAUAAC5yYTUAAAHgAAUAAABOABEAAAHgAAAAAAAB5H8AAAAAAAo
B4AAwAAAAAFYiAABWIgAAABAAAmdlbnJjb29rAQIAAAAAABABAAADBAAAEAAAAAAAAQADAAAAXi5yYf0
ABQAALnJhNQAAAlgABQAAAE4AEwAAAlgAAAAAAAJdnwAAAAAACgJYADwAAAAAViIAAFYiAAAAEAACZ2V
ucmNvb2sBAgAAAAAAEAEAAAMEAAAXAAAAAAABAAMAAABeLnJh/QAFAAAucmE1AAAB0QAFAAAATgAVAAA
B0QAAAAAAA6q3AAAAAAAQAdEAXQAAAACsRAAArEQAAAAQAAJnZW5yY29vawECAAAAAAAQAQAAAwgAACA
AAAAAAAIABAAAAF4ucmH9AAUAAC5yYTUAAAKAAAUAAABOABcAAAKAAAAAAAAFC/4AAAAAABACgACAAAA
AAKxEAACsRAAAABAAAmdlbnJjb29rAQIAAAAAABABAAADCAAAJQAAAAAAAgAE"

a=StreamName:string;"Audio Stream"

a=ASMRuleBook:string;"#($Bandwidth < 16538),AverageBandwidth=11025,Priority=5;#
($Bandwidth < 16538),AverageBandwidth=0,Priority=5,OnDepend=\"0\", OffDepend=\"0
\";#($Bandwidth >= 16538) && ($Bandwidth < 
20672),AverageBandwidth=16538,Priority=5;#($Bandwidth >= 16538) && ($Bandwidth 
< 20672),AverageBandwidth=0,Priority=5,OnDepend=\"2\", OffDepend=\"2\";#
($Bandwidth >= 20672) && ($Bandwidth < 
32041),AverageBandwidth=20672,Priority=5,PNMKeyframeRule=T;#($Bandwidth >= 
20672) && ($Bandwidth < 32041),AverageBandwidth=0,Priority=5,OnDepend=\"4\", 
OffDepend=\"4\",PNMNonKeyframeRule=T;#($Bandwidth >= 32041) && ($Bandwidth < 
44100),AverageBandwidth=32041,Priority=5;#($Bandwidth >= 32041) && ($Bandwidth 
< 44100),AverageBandwidth=0,Priority=5,OnDepend=\"6\", OffDepend=\"6\";#
($Bandwidth >= 44100),AverageBandwidth=44100,Priority=5;#($Bandwidth >= 
44100),AverageBandwidth=0,Priority=5,OnDepend=\"8\", OffDepend=\"8\";"







More information about the gstreamer-devel mailing list