03-16-2023, 11:26 AM
(This post was last modified: 03-16-2023, 12:12 PM by fushark.
Edit Reason: Formatting screw up
)
This may be common knowledge to some, but I've just started learning my way around network streaming and one of the things I wanted to do was while watching videos on my linux box, I want the audio cast to my network streamer. After searching the net, I landed on an instruction (scroll down halfway) over pipewire's support over at gitlab. While it does what I wanted, there is a bit finetuning needed to make it a better experience. So, here are the steps I went through to get mine working on casting audio to moode:
Have fun!
NOTE: If you haven't done it already, you need to open port 6001 for UDP connection on your firewall for this connection.
- On your linux client pc, edit ore create $HOME/.config/pipewire.pipewire.conf.d/pipewire.conf by adding these lines:
Code:...
context.modules = [
...
{ name = libpipewire-module-raop-sink
args = {
raop.hostname = xxx.xxx.xxx.xxx ##Your moode's ip
raop.port = 7000 ##use 5000 for Airplay1 and 7000 for airplay2
stream.props = "Moode AirPlay" tsched=0 fixed_latency_range=no fragments=12 fragment_size=1024
raop.transport = udp
raop.audio.codec = PCM
audio.format = S16
audio.rate = 44100
audio.channels = 2
audio.position= [ FL FR ]
node.latency = 352/44100
node.name = Moode AirPlay
node.description = Moode AirPlay
}
}
...
]
- Restart your pipewire and pipewire-pulse services
Code:systemctl restart pipewire
systemctl restart pipewire-pulse
##If you are running from user level
systemctl --user restart pipewire
systemctl --user restart pipewire-pulse - wait for the services to restart and create the sink
- Select that sink as audio output from the volume control or audio device control panel. Try playing a video and see if the volume is adequate. If it is, then you are done. In my case, the output is so low, it is inaudible unless you crank up all the way on both sides.. So, we need to do some config editing on shairport-sync.conf file
- SSH to your moode server via terminal or the web SSH of moode player's system config's page. Login and edit shairport-sync.conf
Code:sudo nano /etc/shairport-sync.conf
- Look for // ignore_volume_control = "no";....... line. Remove the two "//" and change no to yes (quotes intact). As indicated in the explanation, this will force the audio output on the server to be 100 and you have to control the volume on your client side. Save the file and restart on the terminal or in moode player's renderers config page
Code:sudo systemctl restart shairport-sync
- First lower the volume on your linux client and try playing a video. It may take a second or two to connect. If it seems out-of-sync, stop the video and press play again to see if it is in-sync. You can adjust the latency in Airplay's setting on moode player's renderers page.
Have fun!
NOTE: If you haven't done it already, you need to open port 6001 for UDP connection on your firewall for this connection.