Edited by: Whitehound on 26/03/2011 12:14:51This post is about how to create a live video stream of your EVE session onto the Internet for others to watch.
What you need:1. Linux!
2. An account with
www.Justin.tv3.
ffmpegEveryone will then be able to watch your EVE session on Justin TV, live.
In more detail:1. You should have Linux already installed. Windows or MacOS will work, too, because
ffmpeg is available for them as well. (
Windows/MacOS binaries, though untested)
2. Create an account with www.Justin.tv.
2.1 Once you have your account will you get four categories to choose as your source:
Webcam,
MobilePhone,
VideoGame,
Desktop. You want the fifth category, which is hidden and called
Other.
2.2 First choose
Desktop and you will get to a new page, which lists all five categories on the left. There you can choose the
Other category.
2.3 On the page for the
Other category will you have the option to get a stream key, which is why you have to choose this one and not any of the other categories. Click the button
Show and you will get a key that may look like this:
live_01234567_A1B2c3d4e5f6G7H8.
2.4 Copy the key and keep it somewhere save. You do not want anyone to know your key. The key is then used with
ffmpeg.
3. Get
ffmpeg and make sure it has got the x11grab and network streaming features enabled. It should also support libx264, because this is the video codec you want to use.
4. And this is how you run it:
#!/bin/bash -f
# Justiv.TV stream key:
STREAM="live_01234567_A1B2c3d4e5f6G7H8"
# Input resolution of your display:
INRES=1680x1050
# Aspect ratio of your display:
ASPECT=16:10
# X11 display:
DISPLAY=:0.0
# Frame rate (the slower the less CPU and bandwidth it needs):
FPS=10
# Output resolution (should be some h.264 compatible size):
OUTRES=720x480
# x264 preset (fast, medium, slow, ... depending on your CPU):
X264PRE=slow
# Bitrate (depends on your uplink speed of your Internet connection):
BITRATE=200k
# Number of CPU cores (the more cores the better):
THREADS=4
ffmpeg -f x11grab -s $INRES -r $FPS -i $DISPLAY \
-vcodec libx264 -b $BITRATE -s $OUTRES -aspect $ASPECT -vpre $X264PRE \
-threads $THREADS \
-f flv "rtmp://live.justin.tv/app/$STREAM"
If it all works out should everyone be able to see your Linux desktop live on Justin.tv!
Take a look at the script and tweak the options to your needs. It explains itself. Should you have difficulties with
ffmpeg can I show you how to configure the source and compile it. Also take a look at the options at Justin.tv. You may not want everyone to see you experiment or have them watch previous recordings. Make sure that you do not record a session where your stream key or other secrets are being recorded.
ffmpeg supports audio input, too, but I have left it out here out of convenience. You can add audio support by changing the command to:
ffmpeg -f x11grab -s $INRES -r $FPS -i $DISPLAY \
-f alsa -i hw:0 -ab 24k \
-vcodec libx264 -b $BITRATE -s $OUTRES -aspect $ASPECT -vpre $X264PRE \
-threads $THREADS \
-f flv "rtmp://live.justin.tv/app/$STREAM"
Note that the audio bit rate adds to the video bit rate. So you should limit the audio rate, i.e. 24k bit/s as above.
Enjoy!