aboutsummaryrefslogtreecommitdiff
path: root/scripts/youtube-hls-stream.sh
blob: 747a310d347acd6e6b5c98f7d9d7dd02d5efbdf7 (plain)
1
2
3
4
5
#!/bin/sh

[ "$#" -ne 3 ] && echo "usage: youtube-hls-stream.sh <window_id> <fps> <livestream_key>" && exit 1
active_sink="$(pactl get-default-sink).monitor"
gpu-screen-recorder -w "$1" -c hls -f "$2" -q high -a "$active_sink" -ac aac "https://a.upload.youtube.com/http_upload_hls?cid=$3&copy=0&file=stream.m3u8"