haileys / bark

live sync audio streaming for local networks
GNU Affero General Public License v3.0
672 stars 11 forks source link

Drops too many packets #8

Open maurges opened 8 months ago

maurges commented 8 months ago

I have two computers connected by 5ghz wifi, and I try to stream audio. Ping is ~5ms, throughput is ~20 MiB/s. Whatever delay I choose on the emitter, I get either a log full of "packet in the past", or "packet in the future". It plays first couple of packets of audio, but then just falls behind or ahead.

bark stats always shows buffer of zero. Playing around with with delay-ms, I can get it to play maybe one packet every couple of seconds with delay ~45ms.

maurges commented 8 months ago

I tried setting MAX_QUEUED_DECODE_SEGMENTS to 100 times the original value, and then streaming with --delay-ms=200. After around 15 seconds, it converges and starts resembling an audio stream, although still very stuttery. And I still see messages about "packet in the past", around twice per second. Is it just that my router is so shit with reodering udp packets?