LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-29-2008, 06:08 PM   #1
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
Suggestions for a noninteractive music jukebox?


Hi all,

I have an idea for something I'd like to set up, but am having trouble finding anything that exactly matches my needs, so I thought I'd ask here to see if anyone had any ideas to help out.

The situation is pretty simple: I have a whole load of music files (all kinds of formats, mp3, ogg vorbis, flac, aac, wma, mpc), and I have a spare old computer (PII or so). What I want to do is make the computer into a headless, networkless, non-interactive jukebox. The idea would be that I would connect the computer to a hifi, and when I pressed the power button it would turn on and start playing music at random from the collection. When I pressed the button again it would shut itself down. No further interaction or communication with other devices required.

At the moment I'm thinking along the lines of a minimal (X-less) Gentoo install, as that way I can set things up without any unneeded stuff, and hopefully keep the boot time down. I can write a script to launch a music player once the machine has finished booting, but the real problem is choosing/finding a suitable music playing program.

There are two big problems in finding something suitable. The first is the range of formats: ideally I'd like something that plays all the formats listed above. The second is that there are a huge amount of files (in the region of 17000), so randomising the playlist is not trivial. I tried out music123, as that can be configured to play all the above formats (probably excluding wma), but on a 3GHz P4 it died after spending a few minutes trying to get started.

So, do any of you helpful people have any suggestions? Obviously, if you know of a walkthrough for this exact problem that would be great, but I'm only expecting/hoping to get some tips for things to check out.

In the interest of keeping the system as fast as possible, I'm thinking about sticking to command line only, although if the only possibility requires X I would consider it. Also, while I know they're meant well, responses along the lines of "buy a Squeezebox" aren't very useful, because (a) I'm poor and (b) this is a geeky project for the fun of it / to reuse an old computer! There are a fair few guides on how to set up a simple Jukebox server on Linux out there, but they all seem to be focused on either accessing network shares, or including some kind of GUI and monitor so that people can control the playlist.

Thanking you all in advance for your help!

P.S. By the way, should I manage to come to some solution to this problem, I will put up a walkthrough, giving credit where it is due of course!

Last edited by Gethyn; 12-29-2008 at 06:11 PM. Reason: Slight rewording
 
Old 12-29-2008, 06:34 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
I would suggest VLC as the player, it covers many formats to begin with, and it works via commandline. Here's more info: http://wiki.videolan.org/Documentati..._Line_Examples
 
Old 12-29-2008, 07:34 PM   #3
jimbo1708
Member
 
Registered: Jan 2007
Location: Pennsylvania
Distribution: Ubuntu 8.10 Server/9.04 Desktop, openSUSE 11.1
Posts: 154

Rep: Reputation: 31
look into mpg123 to play your music. It is all command line and very simple. Like most players, it might have trouble with some files, so ffmpeg to convert files from one format to another is a thought.

I understand that you want the simplicity of a standalone box, but if you can network the box, it might be a good idea to set up your music folder as a samba share so you can access it from another computer to add music.

If you are familiar with smalltalk as a programming language, I have a jukebox program I wrote that runs on a single linux server, but is able to be interacted with via its webserver.

- Jim
 
Old 12-30-2008, 05:14 PM   #4
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Original Poster
Rep: Reputation: 32
Thanks for the suggestions. I'm familiar with mpg123 - it's the program music123 uses as a backend to play mp3s - but as you can imagine, re-ripping/transcoding 17000 tracks into mp3 is something I'd like to avoid if possible. I'm also not sure that mpg123 would do any better than music123 at shuffling the playlist. Also, while I appreciate the advice about network connectivity, it just isn't practical, I don't have wireless and using ethernet would involve running a 30+ metre cable to the jukebox! I've thought about updating the library, and I could put the music on an external drive which would be automounted by the jukebox, but which I could then move to another computer from time to time to update the library. Failing that, moving an internal hard drive out every few months to update it wouldn't be too much of a problem.

I had a go at using vlc, but I couldn't get it to do what I wanted - quite possibly down to my own ignorance, but there you go. First I tried feeding it a playlist, using the command
Code:
vlc --random --aout alsa --no-interact --no-show-intf -I rc --playlist-autostart /mnt/music/audio/00-all_music-playlist.m3u
but it didn't shuffle, just started playing the first track in the playlist. I then tried feeding it the music directory and telling it to recurse using the command
Code:
vlc --random --aout alsa --no-interact --no-show-intf -I rc --recursive expand --ignore-filetypes "txt,jpg,sfv,nfo,png,bmp,gif,m3u,exe,dll" /mnt/music/audio/
but that was pretty unreliable. It started playing once out of four or five attempts, the rest of the time it just sat there for a couple of minutes without doing much, at which point I killed it. That was on an Athlon 3400+ system, which while not exactly new is a lot faster than a PII, so I'm not too confident it would work on the intended system either (assuming that the problem was just in finding/shuffling all the files).

Since it would really be a question of setting things up just once at the beginning, I'm wondering if there is some kind of command line based player that includes a database. If so, I could populate when doing the initial setup without worrying if it took a long time, and it could be used on subsequent boots. A lot of the problems (other than ignorance) I'm having with the things I've tried seem to be related to the initial find/sort for so many tracks. I know that Amarok can be set to use mysql for large music collections, but I'm not sure about command line media players.

Thanks for the suggestions so far, any further ideas?
 
Old 12-31-2008, 08:58 PM   #5
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Maybe setup an Icecast or Shoutcast server, use a commandline player to connect to it, take a feed from line out/speaker out then input it to your stereo. I did that using a pair of desktop speakers connected to the server, so when I powered them on, instant music. You will of course need to make the Icecast/Shoutcast server startup as a service, then script the rest to start sequentially for the initial first boot.

These are what I used for my implementation of my jukebox: sc_serv, sc_trans_linux (available from the shoutcast website).
 
Old 01-04-2009, 09:03 AM   #6
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Original Poster
Rep: Reputation: 32
Thanks, that sounds interesting. I've also heard about mpd, which sounds like it might be the right sort of thing. I'll try out these ideas and let you know how it goes...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sound card suggestions for music jukebox Xzi Linux - Hardware 2 02-28-2008 12:42 PM
can't play music with Jukebox nor Amarok vong'xion Linux - Newbie 12 03-08-2006 10:31 AM
virtual music jukebox software fulviom Linux - General 1 09-02-2005 07:36 PM
Music Match Jukebox fishman5 Linux - Software 4 09-30-2003 11:54 AM
Music Manager / Jukebox mdfairch Linux - Software 1 09-22-2003 01:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration