Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.
Here's an example video I made
brew install ffmpeg --with-libvidstab
#!ipxe | |
dhcp | |
echo Starting Ubuntu x64 installer for ${hostname} | |
set base-url http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64 | |
kernel ${base-url}/linux | |
initrd ${base-url}/initrd.gz | |
#imgargs linux auto=true url=http://yourserver/some/path/preseed.cfg | |
boot || | |
# If everything failed, give the user some options | |
echo Boot from ${base-url} failed |
# input: fullchain.pem and privkey.pem as generated by the "letsencrypt-auto" script when run with | |
# the "auth" aka "certonly" subcommand | |
# convert certificate chain + private key to the PKCS#12 file format | |
openssl pkcs12 -export -out keystore.pkcs12 -in fullchain.pem -inkey privkey.pem | |
# convert PKCS#12 file into Java keystore format | |
keytool -importkeystore -srckeystore keystore.pkcs12 -srcstoretype PKCS12 -destkeystore keystore.jks | |
# don't need the PKCS#12 file anymore |
/* | |
* Simple printf for writing to an Arduino serial port. Allows specifying Serial..Serial3. | |
* | |
* const HardwareSerial&, the serial port to use (Serial..Serial3) | |
* const char* fmt, the formatting string followed by the data to be formatted | |
* | |
* int d = 65; | |
* float f = 123.4567; | |
* char* str = "Hello"; | |
* serial_printf(Serial, "<fmt>", d); |
Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.
Here's an example video I made
brew install ffmpeg --with-libvidstab
#!/usr/bin/env python | |
""" | |
Runs "ip xfrm state" and outputs lines to be added to ~/.wireshark/esp_sa | |
This process must be run using sudo. | |
This allows Wireshark to decrypt ipsec traffic captured with 'sudo tcpdump -vni any -U -w /tmp/esp.pcap "ip proto 50"' | |
""" | |
import sys | |
import subprocess |
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:
Set the buffer size (-bufsize:v
) equal to the target bitrate (-b:v
). You want to ensure that you're encoding in CBR mode.
Set up the encoders as shown:
# ======================================================== | |
# Setup a Dumb AP, Wired backbone for OpenWRT / LEDE | |
# ======================================================== | |
# Set lan logical interface as bridge (to allow bridge multiple physical interfaces) | |
uci set network.lan.type='bridge' | |
# assign WAN physical interface to LAN (will be available as an additional LAN port now) | |
uci set network.lan.ifname="$(uci get network.lan.ifname) $(uci get network.wan.ifname)" | |
uci del network.wan.ifname | |
# Remove wan logical interface, since we will not need it. | |
uci del network.wan |
Build VAAPI with support for VP8/9 decode and encode hardware acceleration on a Skylake validation testbed:
Build platform: Ubuntu 16.04LTS.
First things first:
Install baseline dependencies first
sudo apt-get -y install autoconf automake build-essential libass-dev libtool pkg-config texinfo zlib1g-dev libva-dev cmake mercurial libdrm-dev libvorbis-dev libogg-dev git libx11-dev libperl-dev libpciaccess-dev libpciaccess0 xorg-dev intel-gpu-tools
ffmpeg -y -i in.mkv -map 0:v -c:v copy -map 0:a:0 -c:a:0 copy -map 0:a:0 -c:a:0 ac3 out.mkv |
#!/bin/bash | |
MIN_SIZE=6G | |
IN_DIR=. | |
OUT_DIR=out | |
find $IN_DIR -maxdepth 1 -type f -size +$MIN_SIZE -exec ffmpeg -y -i {} -c:v libx264 -preset slow -tune film -profile:v high -level 4.2 -crf 23 -c:a copy -c:s copy $OUT_DIR/{} \; |