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

Alexander Strasser eclipse7 at gmx.net
Sat May 15 19:03:06 EEST 2021


Hi!

On 2021-05-15 13:32 +0200, Christian wrote:
> I am curious as how to solve a peculiar "problem".
>
> I have Big-Ben chimes played out with *mplayer* every quarter of an hour and
> put the respective entries in my /crontab/.
> Example:
>
> 15 * * * * if [ ! -f /tmp/Ruhe ]; then mplayer /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Pausenzeichen/Big_Ben_chimes/Big_Ben_quarter_hour
> > /dev/null 2>&1; fi
>
> That works very well. But I run into problems if I have some other noise
> (sound-file) played out *at the same time*.
>
> As a rule I run this command:
>
> mpv --loop=inf /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Musik/sounds_von_anoise/sounds/coffee_shop.ogg
>
> from within a terminal.
>
> which plays some coffee-shop background noise in a permanent loop.
> This works well too.
>
> However: when running the mpv-command for background noise (which runs
> continually) I don´t get the chimes with *mplayer* any more...
> ... which is weird as they *ARE* played back when issuing the respective
> command from within a terminal.
>
> So, the command
>
> mplayer /media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/DATEN-PARTITION/Dokumente/Pausenzeichen/Big_Ben_chimes/Big_Ben_quarter_hour
>
>
> works even if "coffee-shop" is running at the same time.
> But it *doesn´t* work whenever it´s started by *crontab*!
>
> Does anybody have a clue why that "problem" exists?

You could maybe compare the output messages of mplayer when it
works in the console against the ones that are produced when it
is run by cron.


  Alexander


More information about the MPlayer-users mailing list