My system:
Code: Select all
root@porteus:/# cat /etc/porteus/*
001-core.xzm:20220723
002-xorg.xzm:20220723
002-xtra.xzm:20220630
003-xfce4.xzm:20220428
initrd.xz:20201102
I tried mpg123 - ffplay - mpv.
The soundfile:
Code: Select all
root@porteus:/# file /usr/local/share/notification_-15dB.mp3
/usr/local/share/notification_-15dB.mp3: MPEG ADTS, layer III, v1, 128 kbps, 44.1 kHz, Monaural
root@porteus:/# ffprobe /usr/local/share/notification_-15dB.mp3
Input #0, mp3, from '/usr/local/share/notification_-15dB.mp3':
Duration: 00:00:00.16, start: 0.025057, bitrate: 149 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, mono, fltp, 128 kb/s
Metadata:
encoder : LAME3.100
Side data:
replaygain: track gain - 12.100000, track peak - unknown, album gain - unknown, album peak - unknown,
Started as root the termNo sound, nothing pops up in Volume Control Playback Tab.inal output looks like it works, but no sound is coming and the Volume Control Playback Tab not shows any application opening during playback (as is the case when started from a native guest terminal)
ffplay:
Code: Select all
root@porteus:/# ffplay -hide_banner /usr/local/share/notification_-15dB.mp3
Input #0, mp3, from '/usr/local/share/notification_-15dB.mp3':0/0
Duration: 00:00:00.16, start: 0.025057, bitrate: 149 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, mono, fltp, 128 kb/s
Metadata:
encoder : LAME3.100
Side data:
replaygain: track gain - 12.100000, track peak - unknown, album gain - unknown, album peak - unknown,
0.06 M-A: -0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
mpv:
Code: Select all
root@porteus:/# mpv /usr/local/share/notification_-15dB.mp3
(+) Audio --aid=1 (mp3 1ch 44100Hz)
AO: [pulse] 44100Hz mono 1ch float
Exiting... (End of file)
and mpg123:
Code: Select all
root@porteus:/# mpg123 /usr/local/share/notification_-15dB.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.29.3; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
Directory: /usr/local/share/
Terminal control enabled, press 'h' for listing of keys and functions.
Playing MPEG stream 1 of 1: notification_-15dB.mp3 ...
MPEG 1.0 L III cbr128 44100 mono
[0:00] Decoding of notification_-15dB.mp3 finished.
Attemps as su guest -c 'soundplaying-program'
Running it as
Code: Select all
su guest -c 'soundplaying-program'
ffplay:
Code: Select all
root@porteus:/# su guest -c 'ffplay -hide_banner /usr/local/share/notification_-15dB.mp3'
Input #0, mp3, from '/usr/local/share/notification_-15dB.mp3':0/0
Duration: 00:00:00.16, start: 0.025057, bitrate: 149 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, mono, fltp, 128 kb/s
Metadata:
encoder : LAME3.100
Side data:
replaygain: track gain - 12.100000, track peak - unknown, album gain - unknown, album peak - unknown,
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
SDL_OpenAudio (1 channels, 44100 Hz): ALSA: Couldn't open audio device: Connection refused
No more combinations to try, audio open failed
Failed to open file '/usr/local/share/notification_-15dB.mp3' or configure filtergraph
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
Code: Select all
root@porteus:/# su guest -c 'mpv /usr/local/share/notification_-15dB.mp3'
(+) Audio --aid=1 (mp3 1ch 44100Hz)
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
[ao/alsa] Playback open error: Connection refused
[ao] Failed to initialize audio driver 'alsa'
Could not open/initialize audio device -> no sound.
Audio: no audio
Exiting... (Errors when loading file)
Code: Select all
root@porteus:/# su guest -c 'mpg123 /usr/local/share/notification_-15dB.mp3'
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.29.3; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
[src/libout123/modules/pulse.c:open_pulse():170] error: No PulseAudio running. I will not accidentally trigger starting one.
[src/libout123/libout123.c:check_output_module():982] error: Module 'pulse' device open failed.
[src/libout123/libout123.c:out123_open():482] error: Found no driver out of [pulse] working with device <default>.
main: [src/mpg123.c:check_fatal_output():331] error: out123 error 3: failure loading driver module
For comparison, this is how it looks like when done via a guest terminal:
Code: Select all
guest@porteus:/$ ffplay -hide_banner /usr/local/share/notification_-15dB.mp3
Input #0, mp3, from '/usr/local/share/notification_-15dB.mp3':0/0
Duration: 00:00:00.16, start: 0.025057, bitrate: 149 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, mono, fltp, 128 kb/s
Metadata:
encoder : LAME3.100
Side data:
replaygain: track gain - 12.100000, track peak - unknown, album gain - unknown, album peak - unknown,
0.09 M-A: -0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
Code: Select all
guest@porteus:/$ mpv /usr/local/share/notification_-15dB.mp3
(+) Audio --aid=1 (mp3 1ch 44100Hz)
AO: [pulse] 44100Hz mono 1ch float
Exiting... (End of file)
Code: Select all
guest@porteus:/$ mpg123 /usr/local/share/notification_-15dB.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.29.3; written and copyright by Michael Hipp and others
free software (LGPL) without any warranty but with best wishes
Directory: /usr/local/share/
Terminal control enabled, press 'h' for listing of keys and functions.
Playing MPEG stream 1 of 1: notification_-15dB.mp3 ...
MPEG 1.0 L III cbr128 44100 mono
[0:00] Decoding of notification_-15dB.mp3 finished.
In all three instances - ffplay, mpv and mpg123 the program pops up in Volume Control Playback Tab for a very short time (because it's a very short sound file - as reported by ffprobe: "Duration: 00:00:00.16") - when I get my maths right that is 160 milliseconds.
For now I will setup a different boot for using the standard 003-xfce module that is XFCE 4.16 and see if that makes a difference.
Added in 8 minutes 52 seconds:
Any tips on why I cannot play sounds from a root terminal and how to fix that are greatly appreciated!