Sunday, October 10, 2010

autoplay autostart mp3 music on startup

It was a quick project to setup an 'on hold' music server, but this can be used for countless other projects such as a jukebox or whatever you can think of, get creative :)

Very simple, first you will need VLC, used this for many years now, updates constantly but i'm sure older version can work too.

Second you need a playlist of the music, mp3s or wma etc (most will be played by VLC, that's what it does :)
I had created mine by opening VLC, click on the 'show playlist button' drag and drop all the music into the middle, wait for the processing and click "Media" > "Save playlist to file", named it and I choose the m3u extension.

Third part is the command line, as follows:
"c:\Program Files\VideoLAN\VLC\vlc.exe" -Z "c:\mp3\onhold.m3u"

In my case I used -Z to shuffle because I want it to keep going and in a random order, there are many more options found HERE

Create the scheduled tasks to load this playlist on start up:

Control Panel, Scheduled Tasks, right click, new scheduled task, in the properties place the absolute path to this script file or simply the line above in "Run" and under schedule choose "At login" or "At startup", save and now when you reboot this will start!

Note: 1.keep all the files in place, if directories or names change that may affect the music from playing.
2. Once the command is executed you will see VLC start with preloaded settings and playlist songs.
3. You may see the black command prompt window, this can be closed in most cases without lose of music.

Let me know how it goes!

No comments: