Skip to content

Instantly share code, notes, and snippets.

@pikassogod
pikassogod / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Created January 27, 2020 00:02 — forked from Brainiarc7/ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

"undefined" === typeof jwplayer && (jwplayer = function() {
if (jwplayer.api)
return jwplayer.api.selectPlayer.apply(this, arguments)
}
,
jwplayer.version = "6.12.4956",
jwplayer.vid = document.createElement("video"),
jwplayer.audio = document.createElement("audio"),
jwplayer.source = document.createElement("source"),
function() {
@pikassogod
pikassogod / audit.rules
Created January 18, 2020 17:14 — forked from CHEF-KOCH/audit.rules
BSD hardened settings 2015 Edition
# This file contains the auditctl rules that are loaded
# whenever the audit daemon is started via the initscripts.
# The rules are simply the parameters that would be passed
# to auditctl.
# First rule - delete all
-D
# Increase the buffers to survive stress events.
# Make this bigger for busy systems
@pikassogod
pikassogod / install.sh
Created January 18, 2020 17:02 — forked from asyncee/install.sh
install openvpn on debian 9
# This script helps one to setup openvpn on a Debian 9 under OpenVZ.
# It uses external openvpn-install.sh script (read it carefully! https://git.io/vpn).
# Update system.
apt-get update
apt-get upgrade
# Add new user to system.
useradd -m vpn
@pikassogod
pikassogod / cuda_10.0_installation_on_Ubuntu_18.04
Created December 20, 2019 15:09 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
Cuda 10.0 complete installation procedure for ubuntu 18.04 LTS
#!/bin/bash
## This gist contains step by step instructions to install cuda v10.0 and cudnn 7.5 in Ubuntu 18.04
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
@pikassogod
pikassogod / ffmpeg.md
Created December 20, 2019 14:52 — forked from Jiab77/ffmpeg.md
Compilation FFMpeg / NVENC + QSV + VAAPI + VDPAU + OpenCL

Compilation FFMpeg / NVENC + NVRESIZE + QSV + VAAPI + VDPAU + OpenCL

nVidia nvresize patch is outdated and not more compatible to the latest version of FFmpeg, so it's not included in this documentation.

(even if I've passed a lot of time at trying to make it compile... without any success)

Please don't rely on this page: https://developer.nvidia.com/ffmpeg, the implementation is a hack and was never been added to the main FFmpeg tree.

See:

@pikassogod
pikassogod / ffmpeg-nvprime-build.md
Created October 25, 2019 22:24 — forked from zenofile/ffmpeg-nvprime-build.md
FFmpeg build for NVIDIA PRIME-enabled systems on Ubuntu 18.04LTS+. NVENC, QuickSync and VAAPI hwaccels are enabled.

FFmpeg build for Optimus and dual-GPU (Intel+NVIDIA) systems on Ubuntu 18.04LTS:

Build platform: Ubuntu 18.04LTS

Goals: Generate an FFmpeg build that can utilize NVENC, QuickSync and VAAPI-based hardware acceleration on NVIDIA-PRIME-based systems on Ubuntu 18.04LTS+.

Ensure the platform is up to date:

sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade

@pikassogod
pikassogod / ffmpeg-minimalist-build-nvenc-static.md
Created October 25, 2019 21:55
This gist will show you how to build a minimalist, statically-linked ffmpeg binary under the ~/bin subdirectory on your home on Ubuntu 16.04LTS. Comes with (optiona) NPP, CUDA and NVENC capabilities. See notes in the warning section.

Minimalist static FFmpeg build on Ubuntu 18.04 with Nvidia NVENC enabled.

Original guide with a standard build is here.

With this guide, I'm adding more instructions to enable support for NVIDIA CUVID and NVIDIA NPP for enhanced encode and decode performance.

Warning:

If all you require is NVENC's enablement, you do NOT need the CUDA SDK. The nv-codec-headers (below) is ALL you require.

@pikassogod
pikassogod / ffmpeg-qsv-enabled-build-ubuntu-18.04lts-testbed.md
Created October 25, 2019 21:52 — forked from Brainiarc7/ffmpeg-qsv-enabled-build-ubuntu-18.04lts-testbed.md
This gist will generate an Intel QSV-enabled FFmpeg build using the open source Intel Media SDK. Testbed used: Ubuntu 18.04LTS. A fallback is also provided for the intel vaapi driver where needed.

Build FFmpeg with Intel's QSV enablement on an Intel-based validation test-bed:

Build platform: Ubuntu 18.04LTS

Ensure the platform is up to date:

sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade

Install baseline dependencies first (inclusive of OpenCL headers+)