Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Found another use for mpg123, Startup Sound!' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Found another use for mpg123, Startup Sound!
Authored by: josephaw on May 02, '02 11:25:32AM

Since mpg123 is a command line player I decided that I could use it as a startup sound player for OSX.

I created a folder in /Library/ called 'StartupSound' and placed a mp3 file in there called 'StartupSound.mp3' then I edited the '/etc/rc' file. (Note you want to make a backup of the 'rc' file before editing it.) If your not sure, maybe someone else can document it for the lay persons. But to those who know how, I placed the following line in just before the '# Start System Services' line at the bottom:

##
# Startup Sound
##

/usr/local/bin/mpg123 -q /Library/StartupSound/StartupSound.mp3 &


You can see that it's running the mpg123 program and playing the selected sound file. I tried to use a '*.mpg' so it would play all files, but it doesn't support that with a full path infront and I didn't want to 'cd' to that library folder because I didn't want to interfere with the default directory where ever the 'rc' file was at that line in the file. So I just used relative file paths for now. In future mpg123 version it may support wildcarding in the relative path and then it can play all sound in that folder. For now just place the sound file you want to hear in there with the right name and it will play away as the system is starting up.
Also you may notice that it's running in the background so it can be very long too. I tried to put the mpg123 in quiet mode but it doens't seem to hear that parameter, but maybe future ones will. Maybe someone can add the parameter to redirect standard output and standard error to null, I forgot the exact syntex for that for now.

Have fun and let me know what you thing and how it can be made better.
JosephAW



[ Reply to This | # ]
just some notes
Authored by: marcv on May 03, '02 05:58:57AM

A dropbox for mpg123 would be great!
Anyway here are my simple tricks:
Playlists: 1) just type mpg123 <space> in Terminal and drop a whole
bunch of mp3's at once onto the terminal window.
2) Use Mu to make the playlists. type mpg123 -@ and drop the .m3u

Mu is nice, but it uses 15x the memory of mpg123 alone, is based on
a prerelease version and crashes a lot. In one incident mpg123 kept on playing
the playlist after Mu crashed, frontend-fun.



[ Reply to This | # ]
Check this!
Authored by: marcv on May 03, '02 07:10:44AM

Found another mpg123 based player, mpegToaster, from
http://www.toastedmarshmallow.com/Applications/index.html
They claim to use an optimized version (CoreAudio) of mpg123,
there's also an Altivec optimized version.
this seems to be true, CPU usage is only ±50% of mpg123 on
my iBook.
skips less too. memory usage is very low compared to Mu.
playlist format different from mpg123.



[ Reply to This | # ]
Startup Sound works but...
Authored by: josephaw on May 03, '02 10:36:07AM

I noticed that when it's playing a mp3 when the login prompt appears, the music will cease. I think that's because the INIT level is changing and it kills anything running under the old init.
josephaw



[ Reply to This | # ]
Found another use for mpg123, Startup Sound!
Authored by: josephaw on May 07, '02 05:52:01PM

Command Line Update:
/usr/bin/find /Library/StartupSound/ -name "*.mp3" | /usr/local/bin/mpg123 -@ - -q &

Plays all sound files in folder until init change.
Thanks guys for the help.
JosephAW



[ Reply to This | # ]