[FFmpeg-user] [delogo @ 0x4bfaba0] Logo area is outside of the frame.
Moritz Barsnick
barsnick at gmx.net
Thu Dec 29 13:29:48 EET 2016
On Tue, Dec 27, 2016 at 09:26:44 -0700, Jim Worrall wrote:
> If I change the delogo to delogo=1:1:50:50, I don’t get the error. Since there
> is a default ‘band’ of 1 pixel, I guess using x=0, y=0, puts it out of the
> frame.
Indeed, there's code in there to show the given/used options (shown
with "-loglevel debug"), but right afterwards, the band gets applied to
x, y, width, and height:
s->w += s->band*2;
s->h += s->band*2;
s->x -= s->band;
s->y -= s->band;
Then these new values of x, y, w, h and band get checked and lead to
error. Whether that was the intention or not, I'm not sure. It is just
totally unclear from the documentation.
> Adding :band=0 doesn’t work; apparently the band option is deprecated,
> and the filter will just add the band it wants, at least 1 pixel.
No, it should work (the deprecation message is just a warning that the
option will go away), but the programmer thought that band=0 would be
as if the band option wasn't given, and chooses the default = 1. D'uh!
Code says:
> /* Actual default value for band/t is 1, set in init */
> { "band", "set delogo area band size", OFFSET(band), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },
instead of just setting the default to 1 and letting the user override
it. We're lucky that this code is going away eventually. ;-)
Moritz
More information about the ffmpeg-user
mailing list