Skip to content

Instantly share code, notes, and snippets.

@richterd
richterd / ffmpeg-wrapper
Last active May 24, 2021 16:04 — forked from BenjaminPoncet/ffmpeg-wrapper
Synology VideoStation ffmpeg wrapper with DTS, EAC3 and TrueHD support (Installation instructions in 1st comment)
#!/bin/bash
rev="12"
_log(){
echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log
}
_log_para(){
echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log
@richterd
richterd / widget.js
Last active January 14, 2021 13:01
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-gray; icon-glyph: magic;
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
// Vaccine API by @_ThisIsBenny_
// Define URLs based on the corona.rki.de webpage
class CoronaWidget {
@richterd
richterd / ffmpeg.md
Created July 15, 2018 18:28 — forked from dvlden/ffmpeg.md
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@richterd
richterd / functions.php
Created September 1, 2015 13:26
Wordpress open Media Image in new window/tab as default
/**
* Always set target to _blank
**/
add_filter('image_send_to_editor', 'custom_image_send_to_editor', 10, 8);
function custom_image_send_to_editor($html, $id, $caption, $title, $align, $url, $size, $alt){
$html = preg_replace("/<a/", '<a target="_blank"', $html);
return $html;
}
@richterd
richterd / gist:6636098
Last active December 23, 2015 12:29
Check the current amount of money in $ and € offered for the first person to hack the touchID from iOS 7 (Uses the current rate of bitcoin to dollar and dollar to euro)
#encoding: utf-8
require 'open-uri'
require 'json'
page = open('http://istouchidhackedyet.com/').read
bitcoin_page = open('http://api.bitcoincharts.com/v1/weighted_prices.json').read
to_euro_page = open('http://rate-exchange.appspot.com/currency?from=USD&to=EUR').read
to_dollar_page = open('http://rate-exchange.appspot.com/currency?from=EUR&to=USD').read
to_euro_json = JSON.parse(to_euro_page)
to_dollar_json = JSON.parse(to_dollar_page)