stream.sh/server_core.sh
2021-05-11 21:14:42 +02:00

9 lines
199 B
Bash
Executable file

#!/bin/bash
read -n4 container
if [[ "$container" == "RIFF" ]]; then
(echo -n "$container"; cat -) | aplay -f cd -
else
(echo -n "$container"; cat -) | ffmpeg -re -i - -f wav - | aplay -f cd -
fi