Big idea for streaming mp3's

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
vanpelt
Forum Newbie
Posts: 2
Joined: Wed Oct 29, 2003 7:34 pm

Big idea for streaming mp3's

Post by vanpelt »

I have a big idea, but I'm not quite sure if it's possible. I want to write an application in php for sharing music. Now, this is not just any music sharing software, it's very special. I want to implement the ability for two people to stream mp3 sound to each-other. For instance, I'm talking to my buddy on ICQ and I say, hey you've gotta here this song. From there we both go to the website that is hosting the application. I than upload the mp3 song to the server and my buddy can stream the music to his computer.

Sure this is nothing special yet, but this is where my difficulty begins. I don't want to use any external software. I would use Flash to play the mp3's, and the server would take care of listing all available songs. My issue is getting the music from my computer to my buddies in a small period of time. Flash 6 will stream an mp3 url, so my problem is streaming the upload so that the Flash client can begin to stream the music before the file is finished uploading to the server. I don't know of anyway to bypass the server and stream directly from client to client without external software, but I figure there is a way to stream an upload with php so that the file is saved on the server periodically during the upload. Any ideas?

Thanks
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

you could perhaps create a socket server and run as a daemon, if your site is in a shared hosting env I dont think your ISP would allow such...

AFAIK php's http POST and file upload feature is not workable as you wont know the filename of the temporary file until it is done uploading, so if you do need/want it by http POST you'll have to handle the stream manually, and it's likely much easier to create with perl or python (or whatever other language you may know) and retrieve via cgi and pass through directly on to a file in an identifiable manner..
vanpelt
Forum Newbie
Posts: 2
Joined: Wed Oct 29, 2003 7:34 pm

socket server

Post by vanpelt »

Can flash connect directly to a port and send data? I suppose this topic is becoming more and more less php oriented.
RTT
Forum Commoner
Posts: 38
Joined: Thu Jul 17, 2003 10:22 am
Location: Wolverhampton, UK
Contact:

Post by RTT »

I've already made a script to do this :)

The problems are

1) Uploading songs
2) You'll need a payrise to afford the bandwidth
3) the law!

:wink:
Cruzado_Mainfrm
Forum Contributor
Posts: 346
Joined: Sun Jun 15, 2003 11:22 pm
Location: Miami, FL

Post by Cruzado_Mainfrm »

Post Reply