21 lines
881 B
Bash
Executable file
21 lines
881 B
Bash
Executable file
#! /bin/bash
|
|
|
|
## Do what the fuck you want license
|
|
## This script assumes ffmpeg is installed.
|
|
## You can find the m3u8 easily on peertube in the page-inspector of your broweser. For webshit, find it with `yt-dlp https://link.to/webshit --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"
|