From fd4aa97b1f39cc0d696e382b66f01cc6bc6f9d1e Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sat, 20 Nov 2021 19:56:46 -0500 Subject: Update playbook for restreaming --- playbook/restream-flv.sh | 2 ++ playbook/restream-lowres.sh | 2 +- playbook/restream-youtube.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 playbook/restream-flv.sh (limited to 'playbook') diff --git a/playbook/restream-flv.sh b/playbook/restream-flv.sh new file mode 100644 index 00000000..dc632762 --- /dev/null +++ b/playbook/restream-flv.sh @@ -0,0 +1,2 @@ + MOUNT=$1 + while true; do ffmpeg -loglevel 24 -i http://localhost:8000/main.webm -cluster_size_limit 2M -cluster_time_limit 5100 -b:v 1M -crf 30 -g 125 -deadline good -threads 4 -vcodec libx264 -acodec libmp3lame -f flv $MOUNT; done diff --git a/playbook/restream-lowres.sh b/playbook/restream-lowres.sh index 3ee7c20d..bd6f5bfb 100644 --- a/playbook/restream-lowres.sh +++ b/playbook/restream-lowres.sh @@ -1,2 +1,2 @@ PASS=$1 - while true; do ffmpeg -f webm -reconnect_at_eof 1 -reconnect_streamed 1 -re -i http://localhost:8000/main.webm -vf scale=854:480 -f webm -c:a copy -b:v 500k -maxrate 1M -bufsize 1M -content_type video/webm -c:v libvpx icecast://ec2020main480pmu:$PASS:8000/main-480p.webm; done + while true; do ffmpeg -loglevel 24 -f webm -reconnect_at_eof 1 -reconnect_streamed 1 -re -i http://localhost:8000/main.webm -vf scale=854:480 -f webm -c:a copy -b:v 500k -maxrate 1M -bufsize 1M -content_type video/webm -c:v libvpx icecast://ec2020main480pmu:$PASS@localhost:8000/main-480p.webm; done diff --git a/playbook/restream-youtube.sh b/playbook/restream-youtube.sh index c1fee46c..1cc2994b 100644 --- a/playbook/restream-youtube.sh +++ b/playbook/restream-youtube.sh @@ -1,2 +1,2 @@ KEY=$1 - while true; do ffmpeg -f webm -reconnect_at_eof 1 -reconnect_streamed 1 -re -i http://localhost:8000/main.webm -f webm -c:a copy -c:v copy rtmp://a.rtmp.youtube.com/live2/$KEY; done + while true; do ffmpeg -loglevel 8 -f webm -reconnect_at_eof 1 -reconnect_streamed 1 -re -i http://localhost:8000/main.webm -f webm -c:a copy -c:v copy rtmp://a.rtmp.youtube.com/live2/$KEY; done -- cgit v1.2.3