FFmpeg

From QWiki

FFmpeg streaming in linux.

My Setup is following Soundcard: SB Live! GFX: Geforce GTX 970, FFmpeg version 3.1.0, with nvenc, CPU : i5 2500k, ram 4gb. Pure Alsa, (no pulseaudio, jack or whatsoever). ezquake 2.2 (ez3 works, but mice.. hmm try yourself - might be bug on my side)

I know this guide is legacy. But for anyone trying it might be useful.

Compile ffmpeg with nvenc. (You're on your own) Use SBLive (yeah, uncommon to have 970 and SB LIve but whatever).


First of all to the first problem. mumble records hw:0,0 (everything, which sucks)

This is simple fixed by making a ~/.asoundrc file with the following:

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


ffmpeg line:

  ffmpeg -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.


alsa settings -> set mic to high value (don't neccesary turn it on, whats the point hearing yourself?)

Hope this is enough.