Streaming on Linux: FFMPEG, Twith, Hitbox

  • 10 yıl önce
In this video we shall be looking at streaming to hitbox.tv / twitch.tv by means of a bash script using FFMPEG. Be sure to check out my previous video tutorial on setting up your pulse audio so u can stream both your gameplay and mic - http://goo.gl/6mXtix

Network your Youtube Channel with GamerPeer and Freedom @ http://goo.gl/Zcjmnz

streaming.sh


#! /bin/bash

INRES="1280x1024" # input resolution (The resolution of the program you want to stream!)
OUTRES="1024x790" # Output resolution (The resolution you want your stream to be at)
FPS="22" # target FPS
QUAL="ultrafast"
# one of the many FFMPEG presets that can be used
# If you have low bandwidth, put the qual preset on 'ultrafast' (upload bandwidth)
# If you have medium bandwitch put it on normal to medium or fast
STREAM_KEY="xxxxxxxxxxxx" # this is your streamkey


ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0 \
-f alsa -ac 2 -i pulse -vcodec libx264 -s "$OUTRES" \
-acodec libmp3lame -ab 128k -ar 44100 -threads 0 \
-f flv "rtmp://live.hitbox.tv/push/$STREAM_KEY"

# For streaming to twitch.tv replace rtmp address with rtmp://live.twitch.tv/app/

Önerilen