10 lines
307 B
Nix
10 lines
307 B
Nix
{ pkgs, ... }:
|
|
pkgs.writeShellScriptBin "roc-send-pcm" ''
|
|
FORMAT=$1
|
|
RATE=$2
|
|
CHANNELS=$3
|
|
IP_ADDR=$4
|
|
|
|
${pkgs.ffmpeg}/bin/ffmpeg -f $FORMAT -ar $RATE -ac $CHANNELS -i /dev/stdin -f wav -y /dev/stdout | ${pkgs.roc-toolkit-patched}/bin/roc-send --source "rtp:$IP_ADDR:10001" --driver wav /dev/stdin
|
|
''
|