[vlc-devel] Re: Adding support for playing H.264 streams

Sigmund Augdal sigmunau at stud.ntnu.no
Tue Apr 26 14:34:59 CEST 2005


On Tue, Apr 26, 2005 at 01:47:57PM +0200, Erik Hellerud wrote:
> Ross Finlayson wrote:
> >At 11:43 AM 4/25/05, you wrote:
> >> How did the implementation of h264 in
> >>live.com end up? I heard that it, unlike other codecs in live.com didn't
> >>return complete frames
> >
> >Erik, is this still the case?  (I haven't looked at your 
> >"H264VideoRTPSource" code in detail.)
> 
> My idea was to let H264VideoRTPSource return complete NAL units, not 
> complete frames. This is because each NALU should be independently 
> decodeble. Also, ffmpeg only support the optional H.264 Annex B 
> bytestream format, and thats why all the startcodes needs to be added. 
> In addition to that, the STAP-A payload type is difficult to handle in 
> live.com, so this has to be done in VLC. I haven't tried it, i just 
> disabled that payload type in mp4creator.
I thought recent versions of ffmpeg support non-annex b bytestream format.
You just need to pass the data slightly different. Also, I think vlc's h264
packetizer will convert non-annex b bytestream to annex b. The difference is
the fourcc code passed to the packetizer.

Sigmund
> 
> >>I feel it would clutter the livedotcom.cpp file to add a special case 
> >>for h264.
> >
> >Erik, how big are your changes to "livedotcom.cpp"?  Let's see if we can 
> >work this out.
> 
> What I have done is to add startcodes (0x00 0x00 0x00 0x01) before each 
> NALU. In addition to that, you have to get the sequence parameter set 
> and picture parameter and decode those (base64) and also handle the 
> STAP-A payload type (which is multiple NALU's in one RTP packet)
> 
> So it shluld end up something like this:
> startcodes SPS startcodes PPS startcodes NALU startcodes NALU .......
> 
> I am using the h264 packetizer (thanks to sigmund), and it seems to work.
> 
> And I'm not reluctant to release my changes, what I meant is that I 
> probably dont think it's very useful, my solution is really not that great..
> 
> Erik
> 
> -- 
> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://developers.videolan.org/lists.html

-- 
Sigmund Augdal
Edgar B. Schieldropsv 29-14
N-7033 Trondheim
Norway
tlf: 91809129

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list