PDA

View Full Version : My SHOUTcast Auto DJ Development +REP



iUnknown
20-03-2008, 11:05 PM
Hello,

I have decided to develop my own script which will allow people to login to an account and manage an auto dj by entering their SHOUTcast IP, port, password, bitrate, etc.. I'm wondering if anyone could give me a tip where to start. What I'll be needing to do is to work out how a PHP (or any other coding you suggest) can customize the sc_trans.conf file and the/a playlist file for each account that is created on the usersystem. I believe this will possibly involve MySQL databases to store data for each user about their SHOUTcast details, and writing it to a custom sc_trans file and playlist file. I'll also be wanting to make a small uploader in the user system for users to upload a song to a dedicated directory on the server for their account.

Shell access for this script and similar things like that are not a problem.

The sc_trans.conf server file is:


; Sample sc_trans/0.35-j config file
; j.frankel 12/05/00
; t.pepper 10/31/00
; (relays not supported, yo)
;
; sc_trans operates in one of two modes, either reading mp3s off disk, decoding,
; re-encoding, and then broadcasting them, or relaying from a shoutcast server,
; transcoding to a lower bitrate, and broadcasting to a new server.

; sc_trans accepts the following signals:
; HUP - flush logfiles (close and reopen) -- will make console logging stop
; WINCH - jump to next song
; USR1 - reload playlist off disk (will not interrupt current playing stream)
; USR2 - toggle shuffle on/off
; TERM - normal sc_trans shutdown (clean)

; PlaylistFile (required EVEN IF RELAYING) - playlist file (to create, use
; find /path/to/mp3/directory -type f -name "*.mp3" > playlist_filename.lst
PlaylistFile=example.lst

; ServerIP/ServerPort are the target server to send to
ServerIP=myserver.com
ServerPort=8000
The example of the playlist file is: (it is .lst - that's LST)


# this is a sample playlist file.
#
# the playlist contains one line per song file you wish to stream. the paths
# should be absolute.
#
# if shuffle is off, the songs will play in order.
#
# the playlist is read once at startup, and cached to memory. you may update
# the playlist in a running process by sending a kill -USR1. The next track
# to play after the one currently playing will be from the new playlist.
#
# on linux, you may specify a playlist item of DSP:/dev/soundcard, where soundcard
# is the name of your audio device. It's usually /dev/audio. doing so will allow
# you to broadcast from a line input feed instead of mp3s on disk.
#
# the playlist ignores the first valid line. Don't ask why.
# Your playlist must have at least 2 entries. if you only want to stream one file
# over and over again, then list it twice, including DSP sources.
#
# the following 2 lines are sample playlist lines. you should replace them with
"example.lst" 25L, 1120C
Just thought that information might be useful.

This would all be running on a LINUX server.

Please reply with as useful information as you can give. A lot of reputation will be handed out in this, and if you believe you can help very much then you will most probably get some form of pay (contact me for more details).

Please note, I know software like cast control can do auto DJs, and yes, I do have that available to me but still, I do want to develop this software.

iUnknown
20-03-2008, 11:48 PM
Sorry, I can't edit. I'm closing this thread now as I've realised it's pretty pointless. I worked out something to start with and have practically completed this. Well, I've done the main part (auto dj and interaction with sc_trans. So far so good, now I'll just have to integrate it with a login and session system. I'm also not needing MySQL so far, using "parse_ini_file" to open the configuration and show last used configuration etc. and it's looking pretty good. Of course, it's not just how the coding seems, I will be having to test it sometime and I'm sure there will be problems which I'll have to solve.

Anyway, now people know about this project of mine, I hope you're all crossing your fingers and wishing me luck as this is my first PHP project that I hope to finish (lol) and I don't usually have the patience for them, but it's worth a try!

Thanks for reading :)

Want to hide these adverts? Register an account for free!