Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding some pipe output example for newbies #288

Open
ChoOo7 opened this issue Aug 6, 2018 · 2 comments
Open

Adding some pipe output example for newbies #288

ChoOo7 opened this issue Aug 6, 2018 · 2 comments

Comments

@ChoOo7
Copy link

ChoOo7 commented Aug 6, 2018

I have spent several hours to make it working, so maybe it have a place in the documentation ?

Working example
mkdir -p /opt/music/
mkfifo /opt/music/spotify
chown raspotify /opt/music/spotify

#launching librespot
/usr/bin/librespot --name raspotify --backend pipe --device /opt/music/spotify --bitrate 160 --disable-audio-cache --enable-volume-normalisation --linear-volume --initial-volume=100

#reading file and sending it to aplay
sox -t raw -c 2 -r 44k -e signed-integer -L -b 16 /opt/music/spotify -t .wav - | aplay

#same but sending it to several devices
sox -t raw -c 2 -r 44k -e signed-integer -L -b 16 /opt/music/spotify -t .wav - | tee >(delay 300 | aplay) | aplay -D bluealsa:HCI=hci0,DEV=00:02:3C:41:45:08,PROFILE=a2dp

@nosorozec
Copy link

is there any way to put sox command directly into the config file? Like this:

/usr/bin/librespot --name raspotify --backend pipe "sox command goes here"

@ironcrafter54
Copy link

I have spent several hours to make it working, so maybe it have a place in the documentation ?

Working example mkdir -p /opt/music/ mkfifo /opt/music/spotify chown raspotify /opt/music/spotify

#launching librespot /usr/bin/librespot --name raspotify --backend pipe --device /opt/music/spotify --bitrate 160 --disable-audio-cache --enable-volume-normalisation --linear-volume --initial-volume=100

#reading file and sending it to aplay sox -t raw -c 2 -r 44k -e signed-integer -L -b 16 /opt/music/spotify -t .wav - | aplay

#same but sending it to several devices sox -t raw -c 2 -r 44k -e signed-integer -L -b 16 /opt/music/spotify -t .wav - | tee >(delay 300 | aplay) | aplay -D bluealsa:HCI=hci0,DEV=00:02:3C:41:45:08,PROFILE=a2dp

you saved me hours much thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants