No sound in non-interactive mode
by mfoley from LinuxQuestions.org on (#6J31J)
I have Slackware 15.0 kernel 5.15.145. I can run the following at the command line:
Code:/usr/bin/mplayer /home/mfoley/sounds/tornado2.wav 2>&1 >> $HOME/testingbut when this is is run from a .procmailrc action I get no sound. I've also tried
Code:TERM=vt100 /usr/bin/mplayer -softvol -volume 100 -ao alsa:device=hw=1.0 /home/mfoley/sounds/tornado2.wav 2>&1 >>$HOME/testingIn the .procmailrc run scipt, this command runs continuously in a while loop. In this case the "testing" file output is:
Code:MPlayer 20210418-10.3.0 (C) 2000-2021 MPlayer Team
Playing /home/mfoley/sounds/tornado2.wav.
libavformat version 58.76.100 (external)
Audio only file format detected.
Load subtitles in /home/mfoley/sounds/
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 8000 Hz, 1 ch, u8, 64.0 kbit/100.00% (ratio: 8000->8000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
Audio: no sound
Video: no video
Exiting... (End of file)continuously every 4 seconds.
Why do I get sound at the command line, but not when non-interacive?
Code:/usr/bin/mplayer /home/mfoley/sounds/tornado2.wav 2>&1 >> $HOME/testingbut when this is is run from a .procmailrc action I get no sound. I've also tried
Code:TERM=vt100 /usr/bin/mplayer -softvol -volume 100 -ao alsa:device=hw=1.0 /home/mfoley/sounds/tornado2.wav 2>&1 >>$HOME/testingIn the .procmailrc run scipt, this command runs continuously in a while loop. In this case the "testing" file output is:
Code:MPlayer 20210418-10.3.0 (C) 2000-2021 MPlayer Team
Playing /home/mfoley/sounds/tornado2.wav.
libavformat version 58.76.100 (external)
Audio only file format detected.
Load subtitles in /home/mfoley/sounds/
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 8000 Hz, 1 ch, u8, 64.0 kbit/100.00% (ratio: 8000->8000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
Audio: no sound
Video: no video
Exiting... (End of file)continuously every 4 seconds.
Why do I get sound at the command line, but not when non-interacive?