schreibfaul1 / ESP32-vs1053_ext

With this library You can easily build a WebRadio with a ESP32 board and a mp3-module. See: https://www.youtube.com/watch?v=u4u9NvZvWRk
GNU General Public License v3.0
104 stars 29 forks source link

start stop audio with network latency #5

Open Uksa007 opened 5 years ago

Uksa007 commented 5 years ago

128k stream where there is latency of 350ms causes very bad palyback (start stop audio) problems gets worse when the stream is high bitrate. Depending on your location you may see the issues with this stream:

mp3.connecttohost("http://162.211.86.137:8000/stream");

Pinging 162.211.86.137 with 32 bytes of data: Reply from 162.211.86.137: bytes=32 time=240ms TTL=48 Reply from 162.211.86.137: bytes=32 time=239ms TTL=48 Reply from 162.211.86.137: bytes=32 time=239ms TTL=48 Reply from 162.211.86.137: bytes=32 time=239ms TTL=48

The above streams play great from VLC on a PC on the same Wifi network. I suspect more network buffers are needed.

schreibfaul1 commented 5 years ago

are You sure that's the right URL? typo? Host is not accessibble.

Uksa007 commented 5 years ago

Looks like that link has stopped working

This one cause me issues, but I have about 300ms latency http://stream.deep.radio/hd

You need to test where there is 250ms + latency, the higher the bitrate the worse it gets.

schreibfaul1 commented 5 years ago

VLC Media Player or Winamp can faster filling the buffer and receiving data. In most cases ESP32 can playing the streams without stutter. The pingtime is good: Ping wird ausgeführt für stream.deep [62.138.239.45] mit 32 Bytes Daten: Antwort von 62.138.239.45: Bytes=32 Zeit=20ms TTL=249 Antwort von 62.138.239.45: Bytes=32 Zeit=22ms TTL=249 Antwort von 62.138.239.45: Bytes=32 Zeit=20ms TTL=249 Antwort von 62.138.239.45: Bytes=32 Zeit=20ms TTL=249 and the quality is good as well https://youtu.be/Ld3OPxQGPWs

Uksa007 commented 5 years ago

Maybe try this one, its in the USA so might be a bit further away from you, so you might see the issue! http://162.211.86.137:8000/stream

Pinging 162.211.86.137 with 32 bytes of data: Reply from 162.211.86.137: bytes=32 time=201ms TTL=48 Reply from 162.211.86.137: bytes=32 time=199ms TTL=48 Reply from 162.211.86.137: bytes=32 time=198ms TTL=48 Reply from 162.211.86.137: bytes=32 time=202ms TTL=48