i want to know if it is possible that setting drawbox color conditionally. With drawtext filter there is option -textfile which gets text value from a local file so that i can get dynamic text value with it.

I want to change box color if certain value is higher than specified condition. The below command is what i'm using for drawing text.

ffmpeg -hide_banner -fflags nobuffer -y -i - \
-filter_complex "drawtext=textfile=max_temp.txt: \
reload=16: \
x=640: y=264: fontsize=36: fontcolor=red, \
drawbox=x=640:y=300:w=640:h=480:color=red" \


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.