B
B
Benelli2012-07-20 16:50:18
Audio broadcast
Benelli, 2012-07-20 16:50:18

Stream music from the site

I want to ask about the implementation of streaming from a site a la online radio.

Let's say there is a website and each user has a set of downloaded audio files. It is necessary to do something so that these files are organized into some playlist on the server side and played as a stream. Well, the stream so that you can play it with media players like VLC or mPlayer.

Moreover, it is necessary that this be done as in online radio stations, when the stream continues to play even when there are no connected clients, and not as on VKontakte, where playback occurs at the request of the client side.

I have never understood online broadcasting - tell me, please, in the direction of what means to dig in order to implement this? The site is in PHP, but as a server platform it can be either * nix or Windows - depending on the chosen solution.

An important point is that there will be not one stream for all users, but one or more per user, that is, as a result, there can be a lot of streams.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
motl, 2012-07-20
@motl

shoutcast/icecast

M
Mikhail Osher, 2012-07-20
@miraage

github.com/arut/nginx-rtmp-module

N
Nikolai Vasilchuk, 2012-07-20
@Anonym

First questions:
1. When the files in the playlist run out, what should happen?
2. Is it possible to pause playback before exiting, so that later I can resume broadcasting from the same place?
Now suggestions:
1. Make it really flows. It is expensive in terms of resources and expensive in terms of software.
2. Make an emulation. There is a playlist, there is a start time for the playback of this playlist, there is a total duration of the playlist, there is a duration of each file in the playlist, the current time is known. From all this, you can calculate from what second of which file to start streaming for this particular client.

M
miolini, 2012-08-31
@miolini

I am currently writing such a service. I do music decoding on the server, mix (smooth transition), encode to mp3 / ogg and give it to the client via http.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question