[FFmpeg-devel] How to get width/height of an H264 stream using its SPS ?

PROMONET Michel michel.promonet at thalesgroup.com
Tue Aug 4 10:49:31 CEST 2015


But  h264.h not seems to be a public include.
Thanks, I will looking in this direction.

Best Regards,



-----Message d'origine-----
De : ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] De la part de Ronald S. Bultje
Envoyé : jeudi 30 juillet 2015 18:50
À : FFmpeg development discussions and patches
Objet : Re: [FFmpeg-devel] How to get width/height of an H264 stream using its SPS ?


On Thu, Jul 30, 2015 at 10:58 AM, PROMONET Michel < michel.promonet at thalesgroup.com> wrote:

> Hi Ronald,
> Thanks for the quick answer, following the code this was also my guess.
> From my side I feel that it could be nice to use ffmpeg to decode SPS 
> without any stream, I would like to avoid an other processing of the SPS.
> Is there a particular reason for hiding width/height before decoding ? 
> and could it be a potential evolution of ffmpeg ?

I think you're looking at this from the wrong angle. If you want to get the w/h from a sps, just write a function that does so. You could even re-use functions from h264_ps.c or reuse the binary exported abi (using h264.h as api).

But expecting any sort of relationship between AVCodecContext and sps is not realistic.

ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org

More information about the ffmpeg-devel mailing list