#! /bin/bash
#ffmpeg -f x11grab -show_region 1 -s 1280x720 -r " 25" -i :0.0+0,0 -f alsa -ac 1 -i pulse -vcodec libx264 -s 1280x720 -preset medium -acodec libmp3lame -ar 44100 -threads 1 -qscale 3 -b 400k -g 50 -minrate 400k -maxrate 400k -bufsize 400k -pix_fmt yuv420p -f flv "rtmp://live-lhr.twitch.tv/app/$twitch_key"
#exit 0
# streaming on Ubuntu via ffmpeg.
# see http://ubuntuguide.org/wiki/Screencasts for full documentation
# see http://www.thegameengine.org/miscellaneous/streaming-twitch-tv-ubuntu/
# for instructions on how to use this gist
if [ ! -f .twitch_key ]; then
echo "Error: Could not find file: .twitch_key"
echo "Please create this file and copy past your stream key into it. Open this script for more details."
exit 1;
fi
#ffmpeg -f x11grab -show_region 1 -s 1280x720 -r " 25" -i :0.0+0,0 -f alsa -ac 1 -i pulse -vcodec libx264 -s 1280x720 -preset medium -acodec libmp3lame -ar 44100 -threads 1 -qscale 3 -b 400k -g 50 -minrate 400k -maxrate 400k -bufsize 400k -pix_fmt yuv420p -f flv "rtmp://live-lhr.twitch.tv/app/$twitch_key"
#exit 0
# streaming on Ubuntu via ffmpeg.
# see http://ubuntuguide.org/wiki/Screencasts for full documentation
# see http://www.thegameengine.org/miscellaneous/streaming-twitch-tv-ubuntu/
# for instructions on how to use this gist
if [ ! -f .twitch_key ]; then
echo "Error: Could not find file: .twitch_key"
echo "Please create this file and copy past your stream key into it. Open this script for more details."
exit 1;
fi