Skip to content

Instantly share code, notes, and snippets.

@pasikon
Last active June 29, 2018 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pasikon/4f3438a179a694138c925933cc054b4d to your computer and use it in GitHub Desktop.
Save pasikon/4f3438a179a694138c925933cc054b4d to your computer and use it in GitHub Desktop.

Compilation:

git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
make
sudo make install

PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" ./configure --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64

Capturing desktop:

Get audio devices:

arecord -l
ffmpeg -f x11grab -s 1920x1080 -framerate 25 -i :0.0 -f alsa -ac 2 -ar 44100 -i hw:3 -c:v hevc_nvenc -preset:v slow -qmin:v 18 video_out.mkv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment