[FFmpeg-devel] [RFC] libavfilter-soc and variable-frame-size video streams
Mon Dec 15 10:08:00 CET 2008
On date Monday 2008-12-15 01:02:39 +0100, Aurelien Jacobs encoded:
> Michael Niedermayer wrote:
> > 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
> Not sure it really violated the API, but I've just modified vp6 so that it
> don't set dimensions to 0x0 at codec init.
> Now, libavfilter shouldn't need to care about this issue anymore.
> It "only" need to support dimensions change during playback.
> If you need a sample to test this:
Much thanks for it!
Note: I'll continue to work on libavfilter after Xmas, but I'll try to
post a working patch one the these nights.
FFmpeg = Fantastic and Fiendish Maxi Patchable Enigmatic Gem
More information about the ffmpeg-devel