I ran into this problem with my laptop but I fixed it a different way (without needing to manually disable/enable monitor power saving before/after watching a movie).
It seems the problem lies with the screensaver/power management apps. From the mplayer man page:
-heartbeat-cmd
Command that is executed every 30 seconds during playback via system() - i.e. using the shell.
NOTE: MPlayer uses this command without any checking, it is your responsibility to ensure it does
not cause security problems (e.g. make sure to use full paths if "." is in your path like on Win‐
dows). It also only works when playing video (i.e. not with -novideo but works with -vo null).
This can be "misused" to disable screensavers that do not support the proper X API (also see
-stop-xscreensaver). If you think this is too complicated, ask the author of the screensaver pro‐
gram to support the proper X APIs.
EXAMPLE for xscreensaver: mplayer -heartbeat-cmd "xscreensaver-command -deactivate" file
EXAMPLE for GNOME screensaver: mplayer -heartbeat-cmd "gnome-screensaver-command -p" file
So on my laptop my ~/.mplayer/config contains
- Code: Select all
# Global Options
heartbeat-cmd="/usr/bin/xscreensaver-command -deactivate > /dev/null"
This works really well. It's automatic while mplayer is playing video and has no effect while using mplayer for anything else (playing audio, dumping streams etc). If I pause a movie the power management retakes control (until playback is resumed) and on battery power will dim the screen and eventually blank it.
I don't know what you can do with other players or if no screensaver or no power management is installed (beyond acpi defaults).