As you may see I try to show a colored circle [Q2] according to a value I have in the last column [Q] which is simply an automated overall quality estimation by ffmpeg of the video-file within a movie database.
The value ranges would be:
85-100 = blue circle
70-84 = green circle
55-69 = orange circle
2-54 = red circle
no value should return nothing
Well, don't laugh please , I came up with the following code and it works for now but of course its far from being elegant:
Code: Select all
$quality = tagitems("ex3", , <cc_item>);
if (abs($quality, "Q2") ) >= 85) {
return ">draw.circle , 0c00ff, 150";
} elseif (abs($quality, "Q2") == 70) {
return ">draw.circle , 00fe0f, 150";
} elseif (abs($quality, "Q2") == 71) {
return ">draw.circle , 00fe0f, 150";
...
} elseif (abs($quality, "Q2") <= 54) {
return ">draw.circle , fe0000, 150";
}
Instead of defining many single values one by one I'd really like to have clear ranges of numbers (lets say 70-84 and 55-68 ...) returning/drawing circles in different colors giving an impression about the Video quality at first glance. (including the special case of having no value returning nothing)
So I humbly ask if anyone may have some idea I could work with.
Thank you