Skip to content

Instantly share code, notes, and snippets.

@ogmkp
ogmkp / encode.sh
Created February 26, 2019 21:39 — forked from mikoim/README.md
YouTube recommended encoding settings on ffmpeg (+ libx264)
#/bin/sh
ffmpeg -i input -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low output
@ogmkp
ogmkp / twitchtv_rpi2.rst
Created March 3, 2019 13:25 — forked from neuroticnerd/twitchtv_rpi2.rst
Streaming twitch.tv on your Raspberry Pi 2

Streaming twitch.tv on your Raspberry Pi 2

The following will explain the steps necessary to stream twitch.tv (as well as other media sites like YouTube) on the Raspbian (wheezy) distribution for the Raspberry Pi 2. While you should be able to accomplish the following instructions with Python 2.6.x, I recommend using 2.7.10+.

System Updates

@ogmkp
ogmkp / novpn.sh
Created July 20, 2019 18:21 — forked from kriswebdev/novpn.sh
Bypass VPN for specific apps [Linux / OpenVPN]
#!/bin/bash
# === INFO ===
# NoVPN
# Description: Bypass VPN tunnel for applications run through this tool.
VERSION="1.0.2"
# Author: KrisWebDev
# Requirements: Linux with kernel > 2.6.4 (released in 2008).
# Only tested on Ubuntu 15 with bash.
# Main dependencies are automatically installed.
@ogmkp
ogmkp / forcevpn.sh
Created July 20, 2019 18:21 — forked from kriswebdev/forcevpn.sh
Force VPN for specific apps, in a better way than killswitch [Linux / OpenVPN]
#!/bin/bash
# === INFO ===
# ForceVPN
# Description: Force VPN tunnel for specific applications.
# If the VPN is down => block the app network traffic.
# Better than a killswitch. IPv4.
VERSION="2.1.0"
# Author: KrisWebDev
# Requirements: Linux with kernel > 2.6.4 (released in 2008).
@ogmkp
ogmkp / .env
Created August 5, 2019 00:23 — forked from dansup/.env
PixelFed Alpha Installation
APP_NAME=PixelFed Test
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
ADMIN_DOMAIN="localhost"
APP_DOMAIN="localhost"
LOG_CHANNEL=stack
@ogmkp
ogmkp / mnt-mymountpoint.mount
Created November 10, 2019 11:50 — forked from proprietary/mnt-mymountpoint.mount
systemd automount sshfs: how to automatically mount a remote sshfs filesystem with systemd
# Change the relevant {{ PARTS OF THIS FILE }} for your remote address etc.
# Make sure this unit file is named similarly to your mountpoint; e.g., for /mnt/mymountpoint name this file mnt-mymountpoint.mount
# On Ubuntu:
# $ sudo cp mnt-mymountpoint.mount /lib/systemd/system/
# $ sudo systemctl enable mnt-mymountpoint.mount
# $ sudo systemctl start mnt-mymountpoint.mount
# On Fedora:
# $ sudo cp mnt-mymountpoint.mount /etc/systemd/system
# $ sudo systemctl enable mnt-mymountpoint.mount
# $ sudo systemctl start mnt-mymountpoint.mount
@ogmkp
ogmkp / ffmpeg-desktop-livestreaming-nvenc-and netcat.md
Created March 20, 2020 15:49 — forked from Brainiarc7/ffmpeg-desktop-livestreaming-nvenc-and netcat.md
This gist will show you how to livestream your Linux desktop to a client via FFMpeg using a GPU-accelerated video encoder (NVENC and VAAPI-based)

Low-Latency Live Streaming for your Desktop using ffmpeg and netcat:

Preamble:

In this post I will explore how to stream a video and audio capture from one computer to another using ffmpeg and netcat, with a latency below 100ms, which is good enough for presentations and general purpose remote display tasks on a local network.

The problem:

Streaming low-latency live content is quite hard, because most software-based video codecs are designed to achieve the best compression and not best latency. This makes sense, because most movies are encoded once and decoded often, so it is a good trade-off to use more time for the encoding than the decoding.

@ogmkp
ogmkp / ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
Created March 20, 2020 15:57 — forked from Brainiarc7/ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
FFMpeg's playbook: Advanced encoding options with hardware-accelerated acceleration for both NVIDIA NVENC's and Intel's VAAPI-based hardware encoders in both ffmpeg and libav.

FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.

Hello guys,

Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.

For ffmpeg:

@ogmkp
ogmkp / install-mysql.sh
Created April 3, 2020 10:13 — forked from Nayar/install-mysql.sh
Install Nextcloud 13 on Debian 9
apt-get install mysql-server
sed -i "s/^\(bind-address.*=\).*/\1 0.0.0.0/" /etc/mysql/mariadb.conf.d/50-server.cnf
service mysql restart
mysql -e "create database nextcloud;"
mysql -e "CREATE USER nextcloud@'%' IDENTIFIED BY 'mypassword';"
mysql -e "GRANT ALL PRIVILEGES ON nextcloud.* to 'nextcloud'@'%';"
@ogmkp
ogmkp / compile-ffmpeg-nvenc.sh
Created April 7, 2020 22:34
This bash script will compile a static Ffmpeg build with NVENC and VAAPI hardware-accelerated support on Ubuntu in your home directory. You can modify the script to customize the build options as you see fit.
#!/bin/bash
#This script will compile and install a static ffmpeg build with support for nvenc un ubuntu.
#See the prefix path and compile options if edits are needed to suit your needs.
#install required things from apt
installLibs(){
echo "Installing prerequisites"
sudo apt-get update
sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev \