2020-03-30 19:21:30 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-03-25 00:09:12 +00:00
|
|
|
[ "$#" -ne 3 ] && echo "usage: twitch-stream.sh <window_id> <fps> <livestream_key>" && exit 1
|
|
|
|
active_sink="$(pactl get-default-sink).monitor"
|
|
|
|
./gpu-screen-recorder -w "$1" -c flv -f "$2" -a "$active_sink" | ffmpeg -i pipe:0 -c:v copy -f flv -- "rtmp://live.twitch.tv/app/$3"
|