Opened 3 years ago
Last modified 3 years ago
#9633 new defect
gblur ignores resized input
Reported by: | Jozef Chutka | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | gblur |
Cc: | Jozef Chutka | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description (last modified by )
When the input of gblur
filter is resized in time, the gblur
would keep blurring just the original area (size).
In this example input is resized from 100x100 to 200x200 within 5 frames, however only 100x100 area is blurred in every frame.
Also tried with eval=frame
but gblur
doesnt seem to have the option.
How to reproduce:
% ffmpeg -f lavfi -i color=size=200x200:rate=5:d=1 -i lines.png -filter_complex "[1]setpts=N/5/TB,fps=5,tpad=stop_mode=clone:stop_duration=1,scale=iw+n*20:-1:eval=frame,gblur=10,[0]overlay" -y out%%d.png
Tested with ffmpeg version 2022-02-07-git-04cc7a5548-full_build-www.gyan.dev
Attachments (1)
Change History (8)
by , 3 years ago
comment:1 by , 3 years ago
Description: | modified (diff) |
---|
comment:2 by , 3 years ago
Summary: | avgblur ignores resized input → gblur ignores resized input |
---|
comment:3 by , 3 years ago
Keywords: | gblur added; avgblur removed |
---|
comment:4 by , 3 years ago
comment:5 by , 3 years ago
Possible workaround (I didn't test it):
Place your 100x100 object in the center of a 200x200 image with transparent background. Use the zoompan filter for dynamic zooming in, then comes the blur filter (with constant input size), and then overlay.
Michael
comment:6 by , 3 years ago
Suggestions for improvement:
- There should be a warning or error message in those cases where dynamic size changes aren't allowed.
- Add this note to the documentation of the scale filter:
"Please note that although it's possible to change the size dynamically, this doesn't necessarily mean that the subsequent filter accepts a dynamically changing size. This works only in a few cases, for example scale directly followed by overlay."
Does anybody have a "positive" list of cases where dynamic size changes are working? So far, I only know that scale,overlay does work.
Michael
comment:7 by , 3 years ago
Hi Michael,
Thanks for the proposed workaround. I can see eq
working ok with dynamic size, however fillborders
or colorchannelmixer
do not.
With the proposed workaround gblur
might blend transparent pixels (from overlay bg) into the main image and fillborders
will be problematic as well.
I would like to propose for gblur
the following:
- expressions for sigma and sigmaV with available n/t/iw/ih... variables (sendcmd works now but undocumented)
- implement
eval=frame
so each frame is re-evaluated for expressions + dynamic input size
That's a known limitation. Most filters don't accept an input stream where the size changes dynamically. It works only in a few cases, for example scale directly followed by overlay.
Michael