[FFmpeg-devel] [RFC] libavfilter-soc and variable-frame-size video streams

Michael Niedermayer michaelni
Sun Dec 14 17:59:03 CET 2008


On Sun, Dec 14, 2008 at 04:56:53PM +0100, Stefano Sabatini wrote:
> On date Sunday 2008-12-14 01:40:11 +0100, Michael Niedermayer encoded:
> > On Sun, Dec 14, 2008 at 12:48:14AM +0100, Stefano Sabatini wrote:
> [...]
> > > Now my problem is that the config_props of the scale filter will fail
> > > when called the first time during configuration in the case the input
> > > filter set values of w and h to 0 in the input link, which happens in
> > > the already mentioned case (VP6), and the scaler cannot be initialized
> > > with meaningful values.
> > 
> > what exactly are you doing?
> 
> Setting up the chain before the actual processing. The scale filter
> cannot be initialized with w,h values set to 0, since those values
> cannot be used for initing the swscale context. In order to test I was
> bluffing, making config_props always return 0 (as long as when the
> first frame arrives a frame size change is detected and the filter is
> reconfigured, this time with a valid value).
> 
> > by the time the filter layer is initialized some width&height should be
> > available. I mean av_find_stream_info() will not return before this is
> > available.
> 
> So maybe we should change the vp56.c code to make it set some value in
> the codec context even before the first frame is actually decoded.

no, there is a bug somewhere.

* either you init the avfilters too early
* vp6 sets w/h to 0 after they have been set to non 0
  this violates the API and iam not sure how anything could work if this is
  what happens
* or there is some other bug.

_BUT_ in no way is this related to av filters, ffmpeg when muxing needs the
width & height when writing a header for many containers, av_write_header()
will even kick your ass if its not set
av_find_stream_info() will thus be run first and will do whatever is needed
to get these values, for example it will decode several frames when needed.


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081214/f0b8fd68/attachment.pgp>



More information about the ffmpeg-devel mailing list