Multi Room Audio without Pulseaudio or RTP - Raspberry Pi Forums


hi guys.

further viewtopic.php?f=38&t=143706, wanted create 1 of same devices operation modes either left , right channels (same room) or dual mono devices (eg different rooms). working wifi ideal.

played pulseaudio/rtp solutions others have tried network usage huge (wifi out). experiment, tried setting mpd stream on http , receive stream using mplayer on 2 different pis. surprise working extremely well. listening earphones left ear 1 pi , right ear , can't detect latency @ all. have been playing music couple of hours , sync has been maintained.

mpd setup:

code: select all

audio_output {         type            "httpd"         name            "my http stream"         encoder         "lame"                # optional, vorbis or lame         port            "8000" #       quality         "5.0"                   # not define if bitrate defined         bitrate         "128"                   # not define if quality defined         format          "44100:16:2" }
mplayer command line on machine running mpd:

code: select all

 mplayer http://127.0.0.1:8000 -cache 32 -cache-min 90 -af scaletempo
mplayer command line on satellite machine same replace 127.0.0.1 ip address of machine running mpd. note that:
(a) scaletempo filter not required, messing around slowing/speeding audio maintain sync seems bang on.
(b) don't have start mplayer on 2 machines @ same time , processor speed/overclock not seem cause difference (i wondering whether decode rate of mp3 stream might increase latency).
(c) tried vorbis encoding did not work well.

although working on ethernet @ moment, going try wifi usage next (my thinking because network usage lower, wifi streaming low latency possible).

going continue experiment thought report here in case else has tried , has feedback or wants try it.

have fun

bbuk

hi again all.

have been streaming ethernet connected master 2 wifi slaves , works apart 1 flaw. if wifi drops reason (eg dodgy microwave!), slaves lose sync once wifi comes again. there is, think, pretty easy solution. output mplayer (which go stdout) piped fifo , script read fifo , detect if mplayer reports buffer underrun, script stop mplayer, check server becoming available again (i.e. ping) , restart mplayer.

going develop simple idea more of write (all needed system unit file run mplayer , script restart if wifi goes down) whilst looking neater way detect mplayer buffer underruns, stumbled across this: https://github.com/badaix/snapcast.

snapcast looks brilliant solution multi room audio, can stream flac , latency should low enough allow wifi connected devices operate left , right in stereo setup - perfect needs. moving on experimentation purposes. said, please shout if wants more of write on have done.

bbuk


raspberrypi



Comments