Edzelf / ESP32-Radio

Internet radio based on ESP32, VS1053 and a TFT screen.
GNU General Public License v3.0
965 stars 227 forks source link

Feature Request: OGG encoding and streaming ? #67

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi Ed, wouldn't it be possible to use the VS1053 as an OGG live encoder and stream the content to an icecast server ? I know this is the complete opposite to a webradio player, but i think the hardware is capable of doing it. For me personally, it would be a great compact method to do webradio the easy way, without having a PC running.

Edzelf commented 6 years ago

It is possible, in fact I tried that. But the difficulty is the synchronisation of the sender with the receiver(s). If a receiver is too slow (bitrate is a little off), the sender has to skip some frames. If a receiver is too fast, the sender has to insert some extra frames.

ghost commented 6 years ago

Well, I think you mention that the ESP plays the server for the clients. What I mean is that the esp streams the packets out to an icecast server (running anywhere), which handels the client connections. The icecast would see a normal streaming source, but not from a standard encoder (ices, butt, nicecast). The esp is the streaming source. I think it's just an implementation of the libshout getting the packets from the esp and VS1053.

Edzelf commented 6 years ago

In that case it would be possible, I think.

ghost commented 6 years ago

Well if you need an icecast server to test, feel free to contact me directly. I can provide a testing server, that you can use whenever you like (also when you're not testing ;))

Aggebitter commented 6 years ago

Well this is exactly what I'm working on. but only P2P

theotherjenkutler commented 1 year ago

I'm curious about this as well. Is anyone still working on this or know of any successful implementation? I've been looking at BUTT (broadcast using this tool) source code and some of the Adafruit VS1053 library examples for recording audio from the VS1053 mic/line input and it seems like it would require a HTTP post with login credentials and stream information and then directing the OGG buffer from the VS1053 to the server....