LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   RFC on unusual Car PC idea (http://www.linuxquestions.org/questions/linux-general-1/rfc-on-unusual-car-pc-idea-4175449079/)

Donny Bahama 02-07-2013 05:05 PM

RFC on unusual Car PC idea
 
I have an unusual idea for a Car PC and would appreciate your input.

The impetus for this idea is that I currently have most of the hardware I need to do this - a DC- to-DC power supply, mini-ITX case and motherboard, and an external 2.5" hard drive. The things I lack are 1) an in-dash (or any other type of) touchscreen and/or 2) the $ to buy one. What I DO have, though - every time I get in my car - is my smartphone. So here's my idea...

1. Create a Genre/Album/Artist folder structure (with folder.jpg images for each genre, artist and album) and fill my little 2.5" hard drive with music such that each album folder contains a .m3u playlist file. (Supplementally, a folder of custom playlists would also exist.)
2. Create a script that runs on startup that scans the drive for playlist files and writes html files (using folder.jpg files for the page backgrounds) with links to the playlist files.
3. Run a web server on the PC
4. Access the web server via my smartphone. During the scanning process the home page would say, "Scanning - please wait". When the scan is complete, the page is refreshed and links are displayed for Genres, Artists, Albums and Playlists.

So, by scanning the drive at startup every time, I can - any time I want - add additional content to the drive by simply unplugging it, taking it into the house, and copying stuff onto it (making sure that there's a playlist file and folder.jpg for each new album/artist.) And by using folder.jpg files, I can create a nice GUI.

The only problems I can foresee are:
A. I'm not sure how to get the Car PC to operate as a DHCP server and assign my smartphone an IP address.
B. I'm not sure how long it will take my anemic little Atom-based motherboard to do its scan and generate the html files.
C. Because this is basically a headless system, I don't need a GUI or desktop manager - but I will need a command line media player. (Recommendations?)

Thoughts? Comments? Suggestions?

273 02-07-2013 05:12 PM

I may be wrong but I've a feeling somebody has already done pretty much what you want as regards a web server for music:
http://mpd.wikia.com/wiki/Clients#Web_Clients

michaelk 02-07-2013 06:45 PM

Let me be the first to remind you of the hazards of using a smart phone while driving...

That said you will need to find a wireless adapter that is capable of master mode. This is required to create a wireless access point. Configuring a DHCP server is not difficult.

http://www.cyberciti.biz/faq/debian-...-access-point/

An alternative to the smart phone assuming your board has a built in serial port or parallel port is to have switches for stop/play and next song etc.

http://www.linuxquestions.org/questi...232-port-3639/

Donny Bahama 02-07-2013 10:40 PM

Quote:

Originally Posted by 273 (Post 4886579)
I may be wrong but I've a feeling somebody has already done pretty much what you want as regards a web server for music:
http://mpd.wikia.com/wiki/Clients#Web_Clients

Thanks for the link! Maybe I didn't explain my idea well but what I have in mind bears only a slight resemblance to MPD. First, it's not a proprietary server; it merely generates HTML pages to be served up by any (php capable) web server. As such, no client app needs to be installed; the client device only needs to have a web browser. Also, my imementation would scan the drive for new content each time the server starts up. I don't think there's anything like that in MPD. In general, I think this is dramatically more simple than MPD.

273 02-07-2013 10:51 PM

MPD will scan for new files on startup if that's how you configure it.
The HTML front-ends for MPD are exactly what you describe -- they're web pages on the server machine that any client can open and use. Even VLC and mplayer will give you that kind of functionality. I don't use a web server on my PC personally but I control the MPD instance on it using a couple of MPD clients on my netbook. For VLC there's a plugin which adds a web server so on my netbook or iPad I just open the web page to control it.
I do think this is a solved problem -- you just need a media player you can script to update its music collection on boot and which supports an HTML front end. There are lots that fit the bill.

Donny Bahama 02-07-2013 10:55 PM

Quote:

Originally Posted by michaelk (Post 4886635)
Let me be the first to remind you of the hazards of using a smart phone while driving...

OK, Dad! ;) But seriously, in this application, we could just as easily be talking about an iPod. Your point is noted, and I agree that it would be advisable to navigate this system and make a music selection before pulling out of the driveway (or at a stoplight) rather than while driving -- but I think the ease of system navigation and music selection would take one's eyes off the road little more than operating a Sirius/XM Radio or a car stereo loaded with CDs or an attached MP3 player.
Quote:

That said you will need to find a wireless adapter that is capable of master mode. This is required to create a wireless access point. Configuring a DHCP server is not difficult.

http://www.cyberciti.biz/faq/debian-...-access-point/
Good info. Thanks for the tip!
Quote:

An alternative to the smart phone assuming your board has a built in serial port or parallel port is to have switches for stop/play and next song etc.

http://www.linuxquestions.org/questi...232-port-3639/
Cool idea though I doubt I'd use it. I tend to start an album or playlist and just let it run. Pause might be nice, though. Especially for audiobook listening on long road trips. Now, if I could have such control via a small (RF not infrared) wireless remote that's affixed to the steering wheel...!

Habitual 02-08-2013 08:04 AM

or you could just turn on the radio?

Pastychomper 02-08-2013 09:38 AM

When it comes to adding tracks, could you have a USB port accessible somewhere in the car, and a script to scan any storage device you plug in and copy any sound files to the collection? The same script could read mp3/ogg headers to generate .m3us, and maybe delete the oldest files on the hard drive to make room.

Donny Bahama 02-08-2013 12:15 PM

I don't see why not, as long as the thumb drive has a consistent mount point for scripting.

Donny Bahama 02-08-2013 12:25 PM

Quote:

Originally Posted by 273 (Post 4886749)
I do think this is a solved problem -- you just need a media player you can script to update its music collection on boot and which supports an HTML front end. There are lots that fit the bill.

You're probably right, but using one of those would deprive me of a fun project! ;)

273 02-08-2013 12:29 PM

Quote:

Originally Posted by Donny Bahama (Post 4887182)
You're probably right, but using one of those would deprive me of a fun project! ;)

Fair enough, far be it from me to deprive someone of a fun project.

whizje 02-08-2013 03:08 PM

I guess it would be better to dump the playlist in a database of some sort and when you add new music say rescan or add directory or create the html files when you have added the new music so you don have to bother the poor atom with it.


All times are GMT -5. The time now is 05:45 PM.