diff --git a/rip-stream2platform.sh b/rip-stream2platform.sh new file mode 100755 index 0000000..730596f --- /dev/null +++ b/rip-stream2platform.sh @@ -0,0 +1,19 @@ +#! /bin/bash + +## This script assumes ffmpeg is installed. +## You can find the m3u8 url with `yt-dlp --print-json | grep m3u8` + +read -p 'Type desired preset (recommended 'faster'): ' PRESET +read -p 'Enter source URL for m3u8: ' SOURCE +read -p 'Enter the desitnation URL: ' DESTINATION +read -sp 'Enter the streaming key: ' KEY + +# PRESET="faster" # ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo +# SOURCE="" # use yt-dlp to find the m3u8 stream +# DESTINATION="" +# KEY="" # Your peertubetube key. + +ffmpeg \ + -re -i "$SOURCE" -vcodec libx264 -preset $PRESET -maxrate 3000k -b:v 2500k \ + -bufsize 600k -pix_fmt yuv420p -g 60 -c:a aac -b:a 160k -ac 2 \ + -ar 48000 -f flv -s 1280x720 "$DESTINATION/$KEY"