Clearing brightness, contrast, saturation and hue from a previous mplayer session
Using mplayer, I was annoyed that mplayer remembered my brightness, contrast, hue and saturation settings, which I had tweaked with the keyboard controls the last time I used mplayer. I tried to find where it keeps that info, but didn’t find it anywhere.
Then it turned out, that mplayer changes these settings on the X display’s own attributes. Going “xvinfo” on command prompt soon revealed that my tweakings were remembered by the display itself.
I suppose there’s a reason why mplayer changes the display’s parameters rather than keeping this business to itself. Anyhow, it looks like I’m the only one who gets annoyed by this. Most complaints on the web are about these settings getting lost when a new clip is played. And sincerely, I don’t get it. Why would anyone want all videos played with a color tint from the moment one accidentally shifted the hue? Isn’t the whole point of a command-line application that it runs exactly the same every time one executes it, regardless of what happened in the past?
Solution: xvattr. The Fedora guys must have thought its 23 kbyte of disk space are too much for the useless things it can do (why would anyone want to reset the settings with a command-line utility when you can do that with the Movie Player’s GUI?), so it has to be installed:
# yum install xvattr
and here’s my little script for clearing the relevant settings.
#!/bin/bash { xvattr -a XV_BRIGHTNESS -v 0 ; xvattr -a XV_CONTRAST -v 0 ; xvattr -a XV_SATURATION -v 0 ; xvattr -a XV_HUE -v 0 ; } > /dev/null
I chose to call this script “xvclear”, but that doesn’t matter much.
If anyone knows how to tell mplayer to reset these automagically, please comment below.
Reader Comments
I don’t know how to tell mplayer to reset them automatically, but your script sure was useful!
Thank you very much, this has been annoying me for ages! Your solution both explains it (I agree, it’s quite silly!), and solves it (THANK YOU!).
Craig
Thanks a lot, saved my day…
I was wondering about this for a long time. Thanks for the explanation and the solution!
{ echo brightness=0 ; echo contrast=0 ; echo hue=0 ; echo saturation=0 ; } > ~/.mplayer/config