[FFmpeg-devel] Command-line parameters usedtoo latefor has_codec_parameters()

Alexandre FERRIEUX - FT/RD/SIRP/ASF/SOFTL alexandre.ferrieux
Fri Jan 16 14:21:38 CET 2009


Luca Abeni wrote:
> Hi Alexandre,
> 
> Alexandre FERRIEUX - FT/RD/SIRP/ASF/SOFTL wrote:
> [...]
>>> I think parameters like width, height, and pixel format are encoded in the
>>> H.263 bitstream... In particular, I suspect pix_fmt is always PIX_FMT_YUV420P.
>>> Such value is immediately set in ff_h263_decode_init() (which, if I understand
>>> well, is called as soon as you start decoding the bitstream). Hence, I think
>>> that if you see PIX_FMT_NONE after parsing more than 1 frame there is a
>>> problem somewhere.
>> OK but if it can be forced (to the same value of course), then the 
>> command-line param pix_fmt could be used immediately, before reading any 
>> frame. I understand this is not currently the case in ffmpeg.c, but it 
>> could be, couldn't it ?
> 
> According to the documentation in avcodec.h, in decoding pix_fmt is set by
> libavcodec so no, I do not think it is possible (and I think setting pix_fmt
> before reading any frame would not make much sense).
> 

Even if I pre-set it to the same value that I know is in the bitstream ?

Then, ffmpeg is unable to avoid the read-in-memory of a full GOP at the 
beginning ?

-Alex




More information about the ffmpeg-devel mailing list