From: Oleg Broytman Date: Sun, 14 Apr 2019 18:03:09 +0000 (+0300) Subject: Play video file(s) asking audio volume X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=commitdiff_plain;h=42204a4c8a36e72c65e7f415e7744a101d72a361 Play video file(s) asking audio volume --- diff --git a/.mc/menu b/.mc/menu index 8c75e0b..4b5fa95 100644 --- a/.mc/menu +++ b/.mc/menu @@ -176,6 +176,12 @@ i DVD info m Play video file(s) with mplayer mplayer %s & ++ f \.(aac|ac3|ape|cue|dts|flac|m3u|mp3|MP3|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t d | t t += f \.(aac|ac3|ape|cue|dts|flac|m3u|mp3|MP3|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ +m Play video file(s) with mplayer asking audio volume + AUDIO_VOLUME=%{Enter volume} + AUDIO_VOLUME=$AUDIO_VOLUME mplayer %s & + + f \.(m3u|mp3|MP3|cue|aac|ac3|ape|dts|flac|ogg|OGG|pls|WAV|wav|wv|avi|AVI|flv|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wma|wmv)$ | t t M Play audio/video with gmplayer gmplayer %s & diff --git a/bin/mplay b/bin/mplay index 6985866..e4ca110 100755 --- a/bin/mplay +++ b/bin/mplay @@ -2,6 +2,10 @@ options="--ao pulse --quiet" +if [ -n "$AUDIO_VOLUME" ]; then + options="$options --af=loudnorm --volume=$AUDIO_VOLUME" +fi + if [ "$DISPLAY" ]; then (xscreensaver-command -exit xset -dpms s off) &