1
cvlc --play-and-exit /usr/share/sounds/My_Sounds/Alarm-sound-buzzer.mp3 2> /dev/null

When I use this, I get these irritating messages like

Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 19661 [30%] [on]
  Front Right: Playback 19661 [30%] [on]

Any to suppress them?

fixit7
  • 2,776
  • 3
  • 30
  • 70
  • Does this happen with normal typical audio files? – doug Aug 12 '18 at 10:25
  • @doug Yes. With mp3 files. I am using Ubuntu Mate 18.04. It never occurred with 16.04. – fixit7 Aug 12 '18 at 12:29
  • If you were to run the same commands but using vlc instead do you see the same? If so what does just plain vlc produce in terminal? – doug Aug 13 '18 at 12:12
  • 2
    Possible duplicate of [What does 2>/dev/null mean?](https://askubuntu.com/questions/350208/what-does-2-dev-null-mean) – Fabby Aug 13 '18 at 20:59

2 Answers2

3

Instead of just redirecting stderr with 2>, replace it with 2>&1 to redirect both stdin and stderr to /dev/null

cvlc -q --play-and-exit /usr/share/sounds/My_Sounds/Alarm-sound-buzzer.mp3 > /dev/null 2>&1
Amith KK
  • 13,372
  • 13
  • 66
  • 121
0

This can be made to work by redirecting all output (error and normal output) to /dev/null

cvlc --play-and-exit /usr/share/sounds/freedesktop/stereo/bell.oga  > /dev/null 2>&1
Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
fixit7
  • 2,776
  • 3
  • 30
  • 70