Skip to content

Testing Output

Phil Schatzmann edited this page Feb 24, 2024 · 18 revisions

On Linux

Install snapcast and ffmpeg

sudo apt install snapclient snapserver ffmpeg

I am using ffmpeg to test the functionality:

In order to prevent the following error: /tmp/snapfifo: Permission denied, I executed the following command

sudo sysctl fs.protected_fifos=0

And then I can start to play audio e.g. from a url with

ffmpeg -i http://stream.srg-ssr.ch/m/rsj/mp3_128 -f s16le -c:a pcm_s16le  /tmp/snapfifo

Stop the local snapclient

service snapclient stop

Edit snapserver

sudo nano /etc/snapserver.conf

I recommend to use Opus

# Default sample format
sampleformat = 48000:16:2

# Default transport codec
# (flac|ogg|opus|pcm)[:options]
# Type codec:? to get codec specific options
codec = opus

In Arduino

  • In the file SnapConfig.h in the Arduino Library Directory define your values for

    • CONFIG_SNTP_SERVER
    • CONFIG_WIFI_SSID
    • CONFIG_WIFI_PASSWORD

    If you use PlatformIO you can provide this a parameter

  • Select one of the example sketches and make sure that you use the Opus Decoder

  • Build and deploy your sketch

    Make sure that the ESP32 Core Debug Level is set to Warning or Error (in Arduino this is in the Tools menu and in PlatformIO this is set with -DCORE_DEBUG_LEVEL )

Clone this wiki locally