-
Notifications
You must be signed in to change notification settings - Fork 4
Testing Output
Phil Schatzmann edited this page Feb 26, 2024
·
18 revisions
I am using ffmpeg to test the functionality: Install snapcast and ffmpeg
sudo apt install snapclient snapserver ffmpeg
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
Restart the server for the changed settings to become active
service snapserver restart
-
In the file SnapConfig.h in the Arduino Library Directory define your values for
- CONFIG_SNTP_SERVER
- CONFIG_WIFI_SSID
- CONFIG_WIFI_PASSWORD
-
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 )