Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cron and mpg123
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
wrs4
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2003
Posts: 98
Location: Alexandria, VA

PostPosted: Sun Jun 15, 2003 2:18 pm    Post subject: cron and mpg123 Reply with quote

I have mpg123 installed on my computer and have used it in 7.x versions of Red Hat for an alarm clock. The vcron entry looks like

Code:

30 7  * * Mon-Fri       /usr/bin/mpg123 -Z /mp3/Enya/*/*.mp3


When I run it by hand, I get

Code:

william@kenobi william $ /usr/bin/mpg123 -Z /mp3/Enya/*/*.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!

Directory: /mp3/Enya/Shepherd Moons/
Playing MPEG stream from No Holly for Miss Quinn.mp3 ...
Junk at the beginning 49443302
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo
...


and sound. From cron, nothing. What gives?
Back to top
View user's profile Send private message
Brown Eyed Boy
Tux's lil' helper
Tux's lil' helper


Joined: 08 Jun 2003
Posts: 85
Location: England

PostPosted: Sun Jun 15, 2003 9:51 pm    Post subject: Reply with quote

Do you mean that cron doesn't print the output to the screen or do you mean that you don't get any sound?

I'm no cron expert, but assuming you mean the latter, you might need to add cron to the "audio" group.
Back to top
View user's profile Send private message
wrs4
Tux's lil' helper
Tux's lil' helper


Joined: 27 May 2003
Posts: 98
Location: Alexandria, VA

PostPosted: Sun Jun 15, 2003 11:17 pm    Post subject: Reply with quote

selections from /etc/group:

Code:

cron::16:cron,william
audio::18:cron,william


permissions on /dev/dsp:

Code:

william@kenobi william $ ls -l /dev/dsp
lr-xr-xr-x    1 root     root            9 Jun 14 14:47 /dev/dsp -> sound/dsp
william@kenobi william $ ls -l /dev/sound/dsp
crw-rw----    1 william  audio     14,   3 Dec 31  1969 /dev/sound/dsp
william@kenobi william $ ps -efwww |grep cron
root      1094     1  0 Jun14 ?        00:00:00 /usr/sbin/cron
william  28458 26508  0 20:10 pty/s2   00:00:00 grep cron


The problem is no sound (I guess it would be nice to get emails from cron, but then I'd just have to delete them :wink: ).
Back to top
View user's profile Send private message
Terminal-Velocity
n00b
n00b


Joined: 06 Nov 2003
Posts: 6
Location: Greece

PostPosted: Wed Dec 03, 2003 1:29 am    Post subject: Reply with quote

I have the exact same problem with vcron! and of course all permissions, group settings etc seem to be ok. this is a killer for me, has anyone found a solution?
_________________
tvelocity [at] hotpop [dot] com
Back to top
View user's profile Send private message
Terminal-Velocity
n00b
n00b


Joined: 06 Nov 2003
Posts: 6
Location: Greece

PostPosted: Wed Dec 03, 2003 2:24 am    Post subject: Reply with quote

found the solution to this! some googling showed me that it's some kind of bug in mpg123, so i just used mplayer instead! this is my crontab, if anyone cares:

Code:
0 9 * * * (sleep 1h;killall -9 mplayer)& mplayer -shuffle /mnt/data/Music/Ambient\ +\ Chill\ Out/*.mp3 /mnt/data/Music/Ambient\ +\ Chill\ Out/*/*.mp3 > /dev/null

_________________
tvelocity [at] hotpop [dot] com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum