<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=524071418-07032007><FONT face=Arial
color=#0000ff size=2>I was told by one of the helpful chaps here that the one to
go for is RFC4629 - but I believe VLC does support the other ones. Basically the
h263 header changes from 4 bytes to 2 bytes for RFC4629.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=524071418-07032007><FONT face=Arial
color=#0000ff size=2>I can get VLC to play RFC4629 fine now. If you want
reference code , look at the live55 code base as there is a ready to go H263 RTP
streamer there. (and an RTSP one too).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=524071418-07032007><FONT face=Arial
color=#0000ff size=2>-Chris</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> vlc-bounce@videolan.org
[mailto:vlc-bounce@videolan.org] <B>On Behalf Of </B>jogging
song<BR><B>Sent:</B> 07 March 2007 14:26<BR><B>To:</B>
vlc@videolan.org<BR><B>Subject:</B> [vlc] Re: H263 over RTP<BR></FONT><BR></DIV>
<DIV></DIV>Hi, Chris<BR> There are three RFCs about
h.263 packet, that is RFC 2190, RFC2429 and RFC4629. Doe vlc support all these
three RFCs?<BR><BR>thanks in advance.<BR>Jogging<BR><BR>
<DIV><SPAN class=gmail_quote>On 3/6/07, <B class=gmail_sendername><A
href="mailto:chris.2.dobbs@bt.com">chris.2.dobbs@bt.com</A></B> <<A
href="mailto:chris.2.dobbs@bt.com">chris.2.dobbs@bt.com</A>> wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<P><FONT face=Arial size=2>All,</FONT> <BR><FONT face=Arial size=2>If anyone
is interested I have managed to get VLC to playback file based H263 video
remotely over RTP (as a non-encapsulated elementary stream).</FONT></P>
<P><FONT face=Arial size=2>I had trouble getting this to work as I couldn't
figure out how to transpose the file based H263 records into RFC4629 RTP
packets. I finally managed to reverse engineer to live555 code (which includes
an H263 streamer module) and this is what u have to do: </FONT></P>
<P><FONT face=Arial size=2>Many thanks to Ross Finlayson BTW who prodded me in
the right direction several times...</FONT> </P>
<P><FONT face=Arial size=2>The following does not detail all the RTP field
setups as they are not crucial to getting this to work, things like sequence
number and time stamps are taken as read…</FONT></P>
<P><FONT face=Arial size=2>1. Read 5 bytes first (from file based H263 data) ,
this gives you a starting frame of reference.</FONT> <BR><FONT face=Arial
size=2> Create 1st RTP packet and set the M bit to 1</FONT>
<BR><FONT face=Arial size=2> Create and add to RTP payload
the 2 byte H263 header and set the P bit to 1 (zero rest out)</FONT> <BR><FONT
face=Arial size=2> </FONT><BR><FONT face=Arial
size=2> copy the 5 byte record into the RTP payload
body (after the H263 header).</FONT> <BR><FONT face=Arial size=2> </FONT>
<BR><FONT face=Arial size=2> Send it </FONT></P>
<P><FONT face=Arial size=2>2. Read as much as u can from file without blowing
your MTU , in my case this is 1500 so I chose 1436 (like the live555
code)</FONT></P>
<P><FONT face=Arial size=2> Create new RTP packet + new 2
byte H263 header</FONT> <BR><FONT face=Arial size=2> Scan
newly read in H263 record for occurance of end of frame marker - this is two
consectutive bytes of zeros (00 00).</FONT></P>
<P> <BR><FONT face=Arial
size=2> pseudo code follows:</FONT> </P>
<P><FONT face=Arial size=2> IF eof frame marker
found:</FONT> <BR><FONT face=Arial
size=2>
This record contains an end of frame so set the RTP M bit to 1 and set
the H263 header P bit to 0, then copy to RTP payload (after H263 header)
</FONT></P>
<P> <FONT face=Arial
size=2> the record data up to but NOT including the
"0000". Store remainder in temp.</FONT>
<BR> <FONT face=Arial
size=2> The next record read will therefore be a new start
of frame.</FONT> </P>
<P><FONT face=Arial size=2> IF eof frame marker not
found:</FONT> <BR><FONT face=Arial
size=2>
IF previous record read contained an end of frame marker</FONT> <BR><FONT
face=Arial
size=2>
prefix the this packet with any remainder stored in temp and set the P bit to
1 </FONT><BR><FONT face=Arial
size=2>
and the M bit to 0.
</FONT><BR><FONT face=Arial
size=2>
Need to make sure at this point that we don't blow the MTU.</FONT> <BR><FONT
face=Arial
size=2>
ELSE</FONT> <BR><FONT face=Arial
size=2>
Set RTP M bit to 0 and H263 P bit to 0 and copy whole record into RTP
payload(after the H263 header).</FONT></P>
<P><FONT face=Arial size=2> Send it !</FONT> </P>
<P><FONT face=Arial size=2>3. Repeat 2 until EOF</FONT> </P><BR>
<P><FONT face=Arial size=2>To get a remote vlc to read this stream, create an
sdp file like this</FONT> </P>
<P><FONT face=Arial size=2> v=0</FONT> <BR><FONT face=Arial size=2>o=-
7776 3 IN IP4 <A onclick="return top.js.OpenExtLink(window,event,this)"
href="http://10.215.130.112" target=_blank>10.215.130.112</A></FONT> <BR><FONT
face=Arial size=2>s=Test H263 stream</FONT> <BR><FONT face=Arial
size=2>i=Parameters for the session streamed by "ChipsAhoyH263"</FONT>
<BR><FONT face=Arial size=2>t=0 0</FONT> <BR><FONT face=Arial size=2>m=video
7776 RTP/AVP 98</FONT> <BR><FONT face=Arial size=2>a=rtpmap:98
H263-1998/90000</FONT> <BR><FONT face=Arial size=2>a=fmtp:98 profile=0;
level=40</FONT> <BR><FONT face=Arial size=2>b=TIAS:2048000 </FONT></P><BR>
<P><FONT face=Arial size=2>Where 7776 is the port you are streaming out to
from above steps.</FONT> <BR><FONT face=Arial size=2>Save as say
c:\testH263.sdp</FONT> </P>
<P><FONT face=Arial size=2>Start vlc like this:</FONT> </P>
<P><FONT face=Arial size=2>Vlc -vvv </FONT><A><U><FONT face=Arial
color=#0000ff size=2>file://c:\testH263.sdp</FONT></U></A> </P><BR>
<P><FONT face=Arial size=2>Start the stream and u should see video.</FONT>
</P>
<P><FONT face=Arial size=2>I guess I should have figured all this out from the
various RFC's but to actually implement was not exactly straightforward - no
where could I find info on how to look for the end of frame marker ("0000")
which is the key to the whole thing! </FONT></P>
<P><FONT face=Arial size=2>Hope this helps as it drove me nuts...</FONT>
<BR><FONT face=Arial size=2>-Chris</FONT>
</P></DIV></BLOCKQUOTE></DIV><BR></BODY></HTML>