Linux streaming

From QWiki

Linux Streaming Guide

Requirements, SBLive, gtx 600, 700 or 900 series, FFmpeg compiled with nvenc [x264 works as well, but needs more power], Twitch account. [to be done later]

(other cards than sblive works, but sblive can record from hw:0 and record sound from output and hw:0,2 is a special mic device for mumble/discord [note: u don't need it if you use TeamSpeak])

ffmpeg line (For >= gtx 600 series)

   ffmpeg -vsync passthrough -thread_queue_size 1024 -f x11grab -s 2560x1440 -r 60 -i :0.0 -thread_queue_size 1024 -f alsa -ac 2 -i hw:0 -f flv -ac 2 -ar 48000 -c:v nvenc -g 120 -keyint_min 60 -b:v 3500k -minrate 3500k -maxrate 3500k -pix_fmt yuv420p -s 960x540 -tune film -acodec aac -threads 4 -strict normal -bufsize 3500k test.mkv

~/.asoundrc (for SBLive)

  pcm.!default {
        type asym
        playback.pcm {
                type plug
                slave.pcm "hw:0,0"
        }
        capture.pcm {
                type plug
                slave.pcm "hw:0,2"
        } 
}

Bugs: ezquake 3 will get 125hz mice when recording.