MOD EDIT: OBS is now available for Linux, see install instructions here: https://github.com/jp9000/obs-studio/blob/master/INSTALL
-------
Hello, so I am one of those who are waiting for Linux version of OBS, however until such time that it is realesed we have an alternative that I will share with you here.
What you will need libav-tools:
1) sudo apt-get install libav-tools // OR
2) I do believe it is in the default repositories, search for it in your software centre.
Once that is done you only need a small script (please note I am not the original creator of this script, I have only added/modified it a bit):
Ok I will try and break down the script and explain a few things:
INRES = in resolution - what resolution should it record at? - Typically this should be the same resolution as your game/screen or close to it.
OUTRES = out resolution - what resolution should it give viewers? - This should also be close to what in resolution you are using.
FPS = Pretty self explainatory, this is the FPS which it will target for the rtmp stream.
QUAL = This one is very important and you will have to play around with it yourself depending on your hardware slow = more CPU usage, but better quality gain || fast = less CPU usage, worse quality - here are some examples of presets with avconv:
ultrafast | superfast | veryfast | faster | fast | placebo | medium | slow | slower | veryslow
Additionally, you can also get a list by doing so:
cat /usr/share/avconv/*.avpreset
STREAM_KEY = This actually just uses the command cat to grab the live_key from a file (which you must create), or you could simply put the live_key direcly inside the streaming program - up to you. Here is an example of the .twitch_key file:
live_0123456789_abcdefghijklmnp
To find your live-key go to: http://www.twitch.tv/broadcast OR http://www.justin.tv/broadcast/adv_other for justin.tv
Next up is the avconv part, really all you may want to change here are:
-threads how many threads does your CPU have? I have an quad-core processor so for me it is 4.
-qscale quality scale - I do believe this goes from 1-10 where 1 is the lowest quality.
-b audio bitrate.
-bufsize video buffer size.
-minrate minimum bitrate for video.
-maxrate maximum bitrate for video.
-ac number of audio channels.
Example of bitrate/buffer size: 1024k, 2048k, 3072k, 4096k, 5120k and so on. You may want to set a higher value if you have a high upload speed (I have 10mbit so I have set mine to 8mbit).
In advance sorry for grammatical errors, English is not my mother tongue. I might add/explain better and fix layout - right now it is really late though and I will go to sleep. There are several other guides out there that are based upon the same method as this, however some uses an old script which no longer works. This has been tested and works on Kubuntu and Ubuntu.
Also, please use the manual (search by holding shift and pressing /):
man avconv
Oh I forgot, you will need to give the script execute permissions:
sudo chmod +x SCRIPTNAME HERE
Hope it helps someone.
-------
Hello, so I am one of those who are waiting for Linux version of OBS, however until such time that it is realesed we have an alternative that I will share with you here.
What you will need libav-tools:
1) sudo apt-get install libav-tools // OR
2) I do believe it is in the default repositories, search for it in your software centre.
Once that is done you only need a small script (please note I am not the original creator of this script, I have only added/modified it a bit):
Code:
#! /bin/bash
INRES="1360x768"
OUTRES="1360x768"
FPS="30" # fps
QUAL="slow"
STREAM_KEY=$(cat ~/.twitch_key)
avconv \
-f x11grab -s $INRES -r "$FPS" -i :0.0 \
-f alsa -ac 2 -i pulse \
-vcodec libx264 -s $OUTRES -preset $QUAL \
-acodec libmp3lame -ar 44100 -threads 4 -qscale 8 -b 712000 -bufsize 8192k -minrate 5120k -maxrate 8192k -ac 2 \
-f flv "rtmp://live.justin.tv/app/$STREAM_KEY"
Ok I will try and break down the script and explain a few things:
INRES = in resolution - what resolution should it record at? - Typically this should be the same resolution as your game/screen or close to it.
OUTRES = out resolution - what resolution should it give viewers? - This should also be close to what in resolution you are using.
FPS = Pretty self explainatory, this is the FPS which it will target for the rtmp stream.
QUAL = This one is very important and you will have to play around with it yourself depending on your hardware slow = more CPU usage, but better quality gain || fast = less CPU usage, worse quality - here are some examples of presets with avconv:
ultrafast | superfast | veryfast | faster | fast | placebo | medium | slow | slower | veryslow
Additionally, you can also get a list by doing so:
cat /usr/share/avconv/*.avpreset
STREAM_KEY = This actually just uses the command cat to grab the live_key from a file (which you must create), or you could simply put the live_key direcly inside the streaming program - up to you. Here is an example of the .twitch_key file:
live_0123456789_abcdefghijklmnp
To find your live-key go to: http://www.twitch.tv/broadcast OR http://www.justin.tv/broadcast/adv_other for justin.tv
Next up is the avconv part, really all you may want to change here are:
-threads how many threads does your CPU have? I have an quad-core processor so for me it is 4.
-qscale quality scale - I do believe this goes from 1-10 where 1 is the lowest quality.
-b audio bitrate.
-bufsize video buffer size.
-minrate minimum bitrate for video.
-maxrate maximum bitrate for video.
-ac number of audio channels.
Example of bitrate/buffer size: 1024k, 2048k, 3072k, 4096k, 5120k and so on. You may want to set a higher value if you have a high upload speed (I have 10mbit so I have set mine to 8mbit).
In advance sorry for grammatical errors, English is not my mother tongue. I might add/explain better and fix layout - right now it is really late though and I will go to sleep. There are several other guides out there that are based upon the same method as this, however some uses an old script which no longer works. This has been tested and works on Kubuntu and Ubuntu.
Also, please use the manual (search by holding shift and pressing /):
man avconv
Oh I forgot, you will need to give the script execute permissions:
sudo chmod +x SCRIPTNAME HERE
Hope it helps someone.
Last edited by a moderator: