[vlc-devel] Re: Streaming H.264/AVC

Ross Finlayson finlayson at live.com
Mon Mar 21 01:35:05 CET 2005


>I have modified the live.com library to support streaming of H.264

Erik,

That's great - thanks!

>and added this to livedotcom.cpp:
>
>else if( !strcmp( sub->codecName(), "H264" ) )
>        {
>        tk->fmt.i_codec = VLC_FOURCC( 'H', '2', '6', '4' );
>        }
>
>But to be able to play it back, I need the sequence parameter set and 
>picture parameter set from the SDP file.
>
>The interesting line from the SDP file looks like this:
>a=fmtp:96 profile-level-id=674d00; 
>sprop-parameter-sets=Z00AHpZSBYmI,aOuOIA==; packetization-mode=1
>
>It's the sprop-parameter-sets (which is base64 encoded) I need to pass to 
>the decoder. Does anyone have any ideas on how I can get these parameters, 
>and then send it to the decoder?

The best way to get these - and other SDP parameters - will be from the 
LIVE.COM library's "MediaSubsession" object, which the LIVE.COM library 
constructs when it parses the SDP description.  Look at 
"MediaSubsession::parseSDPAttribute_fmtp()", and note, for example, how the 
"fConfig" variable (a string) is set from the "config=" parameter (which, 
for example, is used for MPEG-4 video).

You will need to:
         (i) add a new member variable "fSPropParameterSets" to 
"MediaSubsession" (in "include/MediaSession.hh"),
         (ii) add a new accessor function "fmtp_spropparametersets()" that 
returns this, and
         (iii) update "MediaSubsession::parseSDPAttribute_fmtp()" to parse 
this attribute.
         (iv) update "~MediaSubsession()" to "delete[] fSPropParameterSets;"

Then, from the VLC code (livedotcom.cpp) - after you've done the RTSP 
"DESCRIBE",  you can call
         sub->fmtp_spropparametersets()
to return the (base64-encoded) string value, which you can then base64 
decode to get binary data that you can pass to the decoder.  (See, for 
example, how "sub->fmtp_config()" is used.)

Afterwards, could you please send me a tar'd diff file that contains your 
modifications to the LIVE.COM library, so I can include them in future 
distributions.

Thanks again for this work.



	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>

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