Last active
December 24, 2015 18:29
-
-
Save matburt/6843739 to your computer and use it in GitHub Desktop.
Stream to twitch from Linux
This file contains hidden or 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
#!/bin/bash | |
API_KEY="<twitch api key>" | |
FPS="15" | |
INRES="1920x1080" | |
OUTRES="1920x1080" | |
OFFSET="2560,0" | |
ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0+$OFFSET \ | |
-f alsa -ac 2 -i default -vcodec libx264 -s "$OUTRES" \ | |
-acodec libmp3lame -ab 128k -ar 44100 -threads 0 -pix_fmt yuv420p \ | |
-f flv "rtmp://live.twitch.tv/app/$API_KEY" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment