[Libav-user] Getting SPS and PPS-information from x264 encoding
Christian Brümmer
christian.bruemmer at gmx.de
Tue May 29 15:26:12 CEST 2012
Am 29.05.2012 14:00, schrieb Christian Brümmer:
> Am 28.05.2012 19:21, schrieb Christian Brümmer:
>> Hi,
>>
>> i encode video frames using a default codec configuration via
>> avcodec_get_context_defaults3(). That video frames are further used
>> for rtsp streaming based on live555. For compatibility i need the SPS
>> and PPS-informations for the rtsp server but i didnt know them (cause
>> default configurations i cant access).
>>
>> How can i get that infos out of a AVCodecContext after setting to
>> default values (c-code)?
>>
>> Best regards and thanks for reading,
>> Christian
>>
>>
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
>>
>
> I figured out that those informations typically found in
> SDP-descriptions. So i tried av_sdp_create which works so far but it
> has no sprop-parameter-sets :/.
>
> Cant be that hard - or?
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
"Cant be that hard - or? "
Okay now im pretty sure it is:
I read AVCodecContex.extradata contains the informations i need. For
decoding i used that code ->
http://cgit.lscube.org/cgit.cgi/feng/tree/src/media/parser/h264.c#n218 -
in a slightly modified way (replaced glib functions with e.g. libavs
base64.h). Finally the decoding stuff is running - BUT...
my AVCodecContext.extradata_size == 0 <- what the heck?!? So no data for
decoding and really no idea left how to get those informations.... WHAA!
I make desperate efforts but i cant get into that...
At least i need another hint. Im not asking for complete solution - its
enough to know roughly the right way!
More information about the Libav-user
mailing list