Created
May 8, 2020 05:10
-
-
Save waltz/80b2dc29c051f0b65d1bb55f3ddfcc14 to your computer and use it in GitHub Desktop.
FFMPEG to Twitch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
STREAM_KEY="" | |
echo Streaming: $1 | |
TWITCH="rtmp://live.twitch.tv/app/${STREAM_KEY}" | |
INSTA="rtmps://live-upload.instagram.com:443/rtmp/$STREAM_KEY" | |
ffmpeg \ | |
-re \ | |
-i "$1" \ | |
-ac 2 \ | |
-r 30 \ | |
-c:v libx264 \ | |
-b:v 300000 \ | |
-preset ultrafast \ | |
-pix_fmt yuv420p \ | |
-s 1280x720 \ | |
-c:a aac \ | |
-b:a 160k \ | |
-ar 44100 \ | |
-f flv "${INSTA}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment