Skip to content

Instantly share code, notes, and snippets.

@nwgat
nwgat / deluged.service
Created November 19, 2016 21:49
/etc/systemd/system/
[Unit]
Description=Deluge Bittorrent Client Daemon
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=000
@nwgat
nwgat / daisuki.py
Created November 12, 2016 12:27 — forked from intact/daisuki.py
Daisuki plugin for livestreamer
import base64
import json
import random
import re
import time
try:
from Crypto import Random
from Crypto.Cipher import AES, PKCS1_v1_5
from Crypto.PublicKey import RSA
@nwgat
nwgat / dkim
Last active November 9, 2016 14:52
dkim
# dkim
$enable_dkim_verification = 1;
$enable_dkim_signing = 1;
dkim_key('domain.ninja', 'foo', '/etc/dkim/domain.ninja.key.pem');
@dkim_signature_options_bysender_maps = (
{ '.' => { ttl => 21*24*3600, c => 'relaxed/simple' } } );
@mynetworks = qw(0.0.0.0/8 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12
192.168.0.0/16); # list your internal networks
@nwgat
nwgat / caddy.conf
Created October 28, 2016 01:54
caddy for cozy
[program:caddy]
autorestart=true
autostart=true
command=/usr/bin/caddy -port 443 "proxy / 127.0.0.1:9104" "tls self_signed"
environment=
redirect_stderr=true
user=cozy
priority=11
environment = HOME="/home/cozy/", USER="cozy"
@nwgat
nwgat / mpv.conf
Created October 1, 2016 14:18
raspberry mpv conf
vo=rpi:background
geometry=30%+1200+100
ytdl-format='bestvideo[ext=mp4][width<=1920][height<=1080]+bestaudio[ext=m4a]'
schedules:
- tasks: twit
schedule:
minute: "*/5"
tasks:
twit:
rss: 'https://bitlove.org/twit/downloads.rss'
series:
settings:
./ffmpeg -i bbb1080p30.mp4 \
-f webm -cluster_size_limit 10M -cluster_time_limit 5100 -content_type video/webm \
-vf scale=1280:-1 \
-vcodec libvpx-vp9 -threads 8 -speed 8 -keyint_min 60 -g 60 -tile-columns 4 -frame-parallel 1 -static-thresh 0 -max-intra-rate 300 -deadline realtime -lag-in-frames 0 -error-resilient 1 -b:v 4000K \
-acodec libopus -b:a 96K -ar 48000 -ac 2 \
icecast://blalbla:[email protected]:8000/live.webm
hashdeep -c md5 -r -b folder > folder.check
hashdeep -a -k folder.check -v -r -b folder
git clone https://github.com/Modubot/Modubot.js.git && cd Modubot.js
sudo npm install -g grunt-cli
npm install && grunt
nano config/config.yml
npm start

Live Transcoding

This is a collection of working commandline examples to show how one could use FFMpeg and VLC for live transcoding of video streams. All examples have been tested on OSX 10.7.5 with FFMPeg 1.1.3 and VLC 2.0.5 in early 2013.

Documentation links