mariolukas/HydraPlay

Select codec for the Snapcast Server in hydra.private.json

Medel opened this issue · 5 comments

Medel commented

I use an ESP32 as Snapcast client, but it has only the opus codec.

Can you try to get it running by changing

https://github.com/mariolukas/HydraPlay/blob/master/src/hydraplay/config/templates/mopidy.conf.j2#L21
and/or
https://github.com/mariolukas/HydraPlay/blob/master/src/hydraplay/config/templates/mopidy.conf.j2#L18

Maybe it would work with:

output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! opusenc ! tcpclientsink host=127.0.0.1 port={{ tcp_port |int + stream_id |int }}

I will add codec selection to the config if you can confirm that it works.

Medel commented

The codec has to be change in snapcast.conf
This change in snapcast.conf works with ESP32 opus codec without hydraplay:

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

Your first recommendation does not work
output = audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! opusenc ! tcpclientsink host=127.0.0.1 port={{ tcp_port |int + stream_id |int }}

But the second one works