T
T
ta42014-02-12 23:41:41
Audio
ta4, 2014-02-12 23:41:41

How to organize audio streaming?

Task. There is a DB with the table in which the list of mp3 files. We need to make a radio, i.e. all users of the site play the same thing.
I have not come across streaming before, so for now I came up with the following solution: we record the time when the "radio" was launched, and each new user will play a file with an indent in this interval. Who will advise what?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri, 2014-02-13
@EatEn

Those. you just want your own Internet radio...
If you have hardware (dedik/vps) then put an icecast/shoutcast or something like that and calmly do internet radio (google this phrase) and calmly bring the player to the site... and no countdown is needed .
If not, there are few representatives. who offer such services (there are both paid and free)

N
Nikolai Vasilchuk, 2014-02-13
@Anonym

You need:
1. MP3 files
2. Duration of each file
3. Playlist
4. Playback start time
Then everything is simple:
1. Subtract the start time from the current time - we find the offset
2. By the offset, we determine which file in the playlist should now play and with which seconds
Google "nginx mp3 pseudo streaming" to set up the server.
In principle, nothing complicated.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question