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

Erik Hellerud erik-list at kladd.net
Tue Apr 26 13:47:57 CEST 2005


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 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



More information about the vlc-devel mailing list