<!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.3492" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial><SPAN
class=279364016-02042009></SPAN></FONT><FONT size=2>H<SPAN
class=279364016-02042009>i Jeremy,</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=279364016-02042009></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=279364016-02042009><FONT face=Arial
color=#0000ff>I am currently trying to attack a similar problem with the
ffmpeg encoder (which I believe also uses X264). While I am not an expert
on live either, </FONT></SPAN></FONT><SPAN class=279364016-02042009><FONT
size=2><FONT face=Arial color=#0000ff>from reading the archives this is what I
have understood so far, and this is what I would try next. You need to send
NAL units to your </FONT><FONT face=Arial color=#0000ff>H264VideoRTPSink. Is the
X264 encoder you are using creating a single NAL unit per video frame encoded?
If not, you need to parse the bit-stream that you get from your encoder, extract
NAL units and send them one by one to your sink. You may check for NAL units by
checking for a 3 byte start code 0x000001, and then your NAL unit would begin
from the next byte - until the next 0x000001 is encountered. Am not sure if this
mechanism would work, but is worth a try. If there are multiple NAL units in a
frame, you should probably set an internal parameter </FONT></FONT><FONT
face=Arial><FONT color=#0000ff><FONT size=2>say
currentNALUnitEndsAccessUnit<SPAN class=279364016-02042009>_var to be TRUE only
for the last NAL unit in the frame and FALSE for the others. Your <FONT
size=2>currentNALUnitEndsAccessUnit() function should just return this variable
currentNALUnitEndsAccessUnit<SPAN class=279364016-02042009>_var. I would also
set the fDurationInMicrosecs parameter to be 0 for all NAL units sent to sink
except the last. For the last just use the actual duration of the frame. Also, I
would make presentation time the same for all NAL units in the
frame.</SPAN></FONT></SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=279364016-02042009><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=279364016-02042009><FONT size=2><SPAN
class=279364016-02042009></SPAN></FONT></SPAN></FONT></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=279364016-02042009><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=279364016-02042009><FONT size=2><SPAN
class=279364016-02042009>In order to write an <FONT size=2>x264VideoStreamFramer
class, I would also model it based on the MPEG4VideoStreamDiscreteFramer class,
and then add an appropriate parsing mechanism to extract NAL units from the
encoded frame bit-stream received.
</FONT></SPAN></FONT></SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=279364016-02042009><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=279364016-02042009><FONT size=2><SPAN
class=279364016-02042009></SPAN></FONT></SPAN></FONT></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=279364016-02042009><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=279364016-02042009><FONT size=2><SPAN
class=279364016-02042009>Best
Regards,</SPAN></FONT></SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=279364016-02042009><FONT face=Arial><FONT color=#0000ff><FONT
size=2><SPAN class=279364016-02042009><FONT size=2><SPAN
class=279364016-02042009>Debargha.</SPAN></FONT></SPAN></FONT></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT size=2><BR></FONT></DIV>
<DIV> </DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> live-devel-bounces@ns.live555.com
[mailto:live-devel-bounces@ns.live555.com] <B>On Behalf Of </B>Jeremy
Noring<BR><B>Sent:</B> Wednesday, April 01, 2009 6:53 PM<BR><B>To:</B>
live-devel@ns.live555.com<BR><B>Subject:</B> Re: [Live-devel] H.264 NAL
confusion<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>I'm still struggling to get this code to work correctly, and I'm sure I'm
just doing something dumb (sorry, new to Live555 and H.264, and the available
samples leave much to be desired). I've attached the code I've
written/used (some of it is stuff I found previous posters had used).</DIV>
<DIV> </DIV>
<DIV>Once again, the video source is just a webcam. The encoder is a
directshow implementation of x264, and the framer is something I put
together. I think it's mostly likely that I'm doing something wrong in
H264RTPSender.cpp, as this is the code I feel like I understand the
least.</DIV>
<DIV> </DIV>
<DIV>Any advice is hugely appreciated at this point; it's been two weeks
and I'm still not able to get any video in VLC, quicktime, etc.</DIV>
<DIV> </DIV>
<DIV> </DIV></BLOCKQUOTE></BODY></HTML>