amiaopensource / vrecord

Vrecord is open-source software for capturing a video signal and turning it into a digital file.
https://github.com/amiaopensource/vrecord
149 stars 44 forks source link

VRecord Highlight Color Option #791

Open SophiaFrancis1 opened 4 months ago

SophiaFrancis1 commented 4 months ago

Hi,

I was wondering if there is a way to adjust the color for the BRNG filter (I've done some searches which haven't yielded any results)? The yellow is often very hard for me to distinguish in a lot of the videos I am working with -- resulting in spots of BRNG out when I run my analysis. If there is an option to change the color that would be marvelous.

Thanks, Sophia

dericed commented 4 months ago

If you're okay with editing the vrecord script then you would change this line:

[e]signalstats=out=brng:stat=brng+vrep+tout,scale=512:ih,split[e1][e2];\

to

[e]signalstats=out=brng:color=green:stat=brng+vrep+tout,scale=512:ih,split[e1][e2];\

I used green there but you can include any value from https://ffmpeg.org/ffmpeg-utils.html#Color

SophiaFrancis1 commented 4 months ago

Hi Dave,

Thank you! That worked perfectly. I appreciate it! -Sophia

dericed commented 4 months ago

@SophiaFrancis1 let us know if you think this is worth being a configurable option or if a different default color makes more sense.

harrypm commented 4 months ago

@dericed 🖐 I would like it, or atleast this should be a docs footnote, I've added it to my notes ran into the same issue before.

SophiaFrancis1 commented 4 months ago

@dericed I definitely think that it would be a really nice option to be able to swap the colors from the GUI in the future if possible. It might be valuable to look into accessibility regarding color contrast as yellow does have a tendency to be hard to distinguish in small amounts against a white background. Here is a website that allows for checking contrast for accessibility purposes: https://webaim.org/resources/contrastchecker/

retokromer commented 4 months ago

A generalisation of the use of colour could possibly include impaired people as well.

dericed commented 4 months ago

If anyone wants to try to add a color option, I'd be happy to mentor. I think it would be similar to this commit: https://github.com/amiaopensource/vrecord/commit/2147be2c5b8b271dc540669178d1571260a40fdb#diff-dcce0a8bf007685bab6ef52705c71956b00d8b48125abc8167e18e02bc94db43 where we added an option to force interlacement labels.

In that commit, on line 641, the box is added to the gui (via the _gtk_vbox_list function), line 2174 lists the options (here we'd need a curated list of colors), line 2020 is were the selection is processed, so we'd need a `-d "yellow" there to keep our original default, then the last edit would be like I mentioned in https://github.com/amiaopensource/vrecord/issues/791#issuecomment-1976719527 where the new variable would be dropped into the signalstats filter.