0
I am streaming small audio files from one raspberry-pi to several other raspberry-pi's. The wireless connection is good, the throughput is good, the ping/latency is good.
The receivers look like this:
avplay -probesize 32 -f mp3 -vn -i udp://239.255.0.1:8001
When I send the audio stream (using -re) like this:
avconv -re -i 1.wav -f mp3 -b:a 128K -vn udp://239.255.0.1:81?localaddr=192.168.0.1
The result on the receiver is choppy audio with lots of this:
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred0B f=0/0
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred0B f=0/0
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred0B f=0/0
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred0B f=0/0
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred0B f=0/0
When I send the audio stream (without using -re) like this:
avconv -i 1.wav -f mp3 -b:a 128K -vn udp://239.255.0.1:81?localaddr=192.168.0.1
The result on the receiver is skippy audio with lots of this:
[mp3 @ 0x72501740] overread, skip -10 enddists: -7 -7 0B f=0/0
[mp3 @ 0x72501740] overread, skip -7 enddists: -5 -5
[mp3 @ 0x72501740] overread, skip -9 enddists: -6 -6 0B f=0/0
[mp3 @ 0x72501740] overread, skip -5 enddists: -1 -1 0B f=0/0
[mp3 @ 0x72501740] overread, skip -7 enddists: -2 -2
If I increase the probesize on the receiver, the first sound I play is good and subsequent sounds are bad because probesize only applies initially.
The actual question: How can I get avplay to continuously buffer the input properly so that underruns and overreads/skips do not occur?
I seem to be having better luck by adding ?buffer_size=400000 to the avplay command line. – user3091850 – 2016-06-21T22:50:44.500