#9681 closed enhancement (fixed)
drawbox enhancement
Reported by: | Jozef Chutka | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avfilter |
Version: | unspecified | Keywords: | drawbox |
Cc: | Jozef Chutka | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
I would like to propose the enhancement for drawbox:
- add time related constants
n
(frame) andtime
(btwt
is reserved for thickness) - add
eval=frame
so drawbox is able to recalculate based on changedn
,time
or dynamic input sizeih
,iw
- add
enable
option so there is a way to restrict its availability/rendering
With these in place, one could draw in-video progress bars, but I believe these extensions are generic enough for solid use in different cases as well.
Currently there is an option to use [color+overlay](https://stackoverflow.com/questions/62989964/showing-in-video-visual-progress-bar-with-ffmpeg), however imagine drawing border progress bar (see attachment) which is 4x2 filters already, and I can imagine drawbox
performs faster then either of color
or overlay
alone.
Thanks for all the hard work.
Attachments (1)
Change History (4)
by , 2 years ago
Attachment: | borderprogressbar.jpg added |
---|
comment:1 by , 2 years ago
comment:2 by , 2 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in 13a153d801011c4ec82b90af1351e10dcf1754e1
Demo:
mpv av://lavfi:gradients=d=100,format=rgb0 -vf "lavfi=[sendcmd=0.0-100.0 \[expr\] drawbox@1 w (TI+0.001)*W,drawbox@1=x=0:y=ih-t:w=0:h=5:c=red:replace=1,sendcmd=0.0-100.0 \[expr\] drawbox@2 y (1-TI)*H,drawbox@2=x=0:y=h:w=5:h=0:c=red:replace=1]"
comment:3 by , 2 years ago
This is great, thanks for an express fix.
Potentially related, I am openning https://trac.ffmpeg.org/ticket/9686#ticket
I would also like to understand the syntax from Elon's demo, completely alien to me -vf "lavfi=[...]"
? Whats the benefit of having filter graph wrapped inside lavfi=[...]?
It does already have the "enable" option. The problem is only that you don't see it in the documentation. You can use this command to check which filters have timeline support:
ffmpeg -filters
Michael