[MPlayer-users] two sound files at the same time - problem with crontab (mplayer involved)

Alexander Strasser eclipse7 at gmx.net
Sat May 15 19:44:27 EEST 2021


On 2021-05-15 18:21 +0200, Christian wrote:
>
> thanks a lot for your answer.
>
> Good idea.
>
> *_1.) mplayer messages - when _**_not_*_*working - i.e. issued by cron:*
>
> _
>
> MPlayer 1.3.0 (Debian), built with gcc-9 (C) 2000-2016 MPlayer Team
> do_connect: could not connect to socket
> connect: No such file or directory
> Failed to open LIRC support. You will not be able to use your remote
> control.
> Terminal type `unknown' is not defined.
>
> Playing
> /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Pausenzeichen/Big_Ben_chimes/Big_Ben_three_quarters_of_the_hour.
> libavformat version 58.29.100 (external)
> Audio only file format detected.
> Load subtitles in
> /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Pausenzeichen/Big_Ben_chimes/
> ==========================================================================
> Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
> AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
> Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I,
> II, III)
> ==========================================================================
> AO: [pulse] Init failed: Connection refused
> Failed to initialize audio driver 'pulse'
> [AO_ALSA] alsa-lib: pcm_hw.c:1715:(snd_pcm_hw_open) open
> '/dev/snd/pcmC0D0p' failed (-16): Device or resource busy
> [AO_ALSA] alsa-lib: pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
> [AO_ALSA] Playback open error: Device or resource busy
> Failed to initialize audio driver 'alsa'
> [AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
> [AO SDL] using aalib audio driver.
> [AO SDL] Unable to open audio: No available audio device
> Failed to initialize audio driver 'sdl:aalib'
> Could not open/initialize audio device -> no sound.
> Audio: no sound
> Video: no video
>
>
> *_2.) mplayer messages - when working - i.e. manually issued from command
> line:
>
>
> _*MPlayer 1.3.0 (Debian), built with gcc-9 (C) 2000-2016 MPlayer Team
> do_connect: could not connect to socket
> connect: No such file or directory
> Failed to open LIRC support. You will not be able to use your remote
> control.
>
> Playing /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Pausenzeichen/Big_Ben_chimes/Big_Ben_three_quarters_of_the_hour.
> libavformat version 58.29.100 (external)
> Audio only file format detected.
> Load subtitles in /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Pausenzeichen/Big_Ben_chimes/
> ==========================================================================
> Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
> AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
> Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II,
> III)
> ==========================================================================
> AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
> Video: no video
> Starting playback...
> A:  22.3 (22.3) of 22.0 (22.0)  0.2% *_
>
> _*Exiting... (End of file)*_
>
>
> _*Yet I´m not sure what to make of it.

Sorry, I can't explain it in detail because I don't have time to
investigate. So I will try to give some more vague interpretation.
Maybe others know better and will give more concrete advice.

You can't easily just share one sound hardware with many users. So
there is software on top that allows you to do this. E.g pulse audio
is one such solution.

From the output I infer, that when all the processes use pulse audio
for output it works for you. When your mplayer is started by cron,
it can't connect to pulse audio for some reason. Then it tries to use
alsa which fails because it can't get the audio device for itself.


[...]

  Alexander


More information about the MPlayer-users mailing list