Skip to content

Instantly share code, notes, and snippets.

@MaZderMind
MaZderMind / example.cpp
Created March 4, 2018 20:15
Ideas of how the DMX-Processiung might be programed
#include <DmxProxy.h>
PmxProxy dmxProxy(processing_function);
void setup() {
}
boolean processing_function(DmxFrame* in, DmxFrame *out)
{
#!/bin/bash
ffmpeg -hide_banner -y -nostdin -f decklink -list_devices 1 -i dummy 2>&1 | head -n -1 | tail -n +2 | cut -c 31- | cut -c -1 | while read device; do
ffmpeg -hide_banner -y -nostdin -f decklink -list_formats 1 -i $device 2>&1 | head -n -1 | tail -n +4 | cut -c 2- | cut -f1 -d' ' | while read mode; do
for plug in sdi hdmi; do
desc="$device@$mode on $plug"
echo "-> /tmp/$desc.png"
ffmpeg -v warning -hide_banner -y -nostdin -f decklink -video_input $plug -format_code $mode\
-i "$device" \
-ss 1 -vframes 1 \
@MaZderMind
MaZderMind / generate-multichannel-audio-testfile.sh
Created December 24, 2017 23:23
Generate a 4-track-stereo-testfile which helps to distinctively check audio channel mapping.
#!/bin/sh
# Generate a 4-track-stereo-testfile which helps to distinctively check audio channel mapping.
# Each stereo-pair contains the same phase-correct frequency on each ear
# (increasing frequency from lower to higher pairs), with brown noise overlayed
# on the right ear.
#
# When channels are swapped, the frequency on the left and on the right ear
# don't match which can be easily detected.
#
#!/bin/sh
ffmpeg -y -v info -i /video/intros/SM//1337.ts -analyzeduration 20000000 -ss 64.04 -t 657.36 -i /video/fuse//play/3OG/1337/uncut.ts -analyzeduration 20000000 -i /video/intros/SM/outro.ts -filter_complex '[0:v:0] [0:v:0] [0:a:0] [1:v:0] [1:v:1] [1:a:0] [2:v:0] [2:v:0] [2:a:0] concat=n=3:v=2:a=1 [vd0] [vd1] [audio0_mix]; [vd0] hqdn3d [v0]; [vd1] hqdn3d [v1]' -analyzeduration 20000000 -map '[v0]' -map '[v1]' -c:v libx264 -pix_fmt:v yuv420p -crf:v 23 -profile:v high -level:v 4.1 -map '[audio0_mix]' -c:a:0 libfdk_aac -b:a:0 192k -ar:a:0 48000 -aspect 16:9 -movflags faststart -f mp4 /video/tmp/SM//1337-hd.mp4
@MaZderMind
MaZderMind / iptables.sh
Created July 22, 2017 00:13
iptables-rules, komptatibel mit kubernetes, zur Verwendung in der rc.local
for iptables in iptables; do
$iptables -A FORWARD -j ACCEPT
$iptables -F INPUT
$iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
$iptables -A INPUT -i lo -j ACCEPT
$iptables -A INPUT -p tcp --sport 1024:65535 --dport 22 -j ACCEPT -m comment --comment "allow ssh"
$iptables -A INPUT -p udp --sport 1024:65535 --dport 60000:60099 -j ACCEPT -m comment --comment "allow mosh"
$iptables -A INPUT -p tcp --sport 1024:65535 --dport 80 -j ACCEPT -m comment --comment "allow http"
@MaZderMind
MaZderMind / cluster-forward.mazdermind.de.conf
Created July 16, 2017 14:19
Apache Configuration forwarding all unknown Requests to the Kubernetes-Cluster's Ingress
<VirtualHost *:80>
ServerAdmin peter@mazdermind.de
ServerName cluster-forward.mazdermind.de
# ServerAlias *
ProxyPass / "http://127.0.0.1:32080/" retry=0
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
@MaZderMind
MaZderMind / LambdaMatcher.java
Created July 3, 2017 10:00 — forked from GuiSim/LambdaMatcher.java
Hamcrest matcher that matches a Lambda.
package util.matcher;
import java.util.function.Function;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
public class LambdaMatcher<T> extends BaseMatcher<T> {
private final Function<T, Boolean> matcher;
private final String description;
@MaZderMind
MaZderMind / gist:f03298fa38f456c8ca6f32f269f5d12d
Last active May 4, 2017 13:28
Was hab ich eigentlich heute getan (git)
~/C/foobar $ git config --global alias.today "log --pretty=format:'%ad - %s' --date=format:'%H:%M:%S' --author-date-order --reverse --all --since=7:00 --author=`whoami`"
~/C/foobar $ git today
11:39:51 - FOOBAR-137: Gestaltung des Backend-Editors
11:52:50 - FOOBAR-137: Anzeigenamen-Suffix konfigurierbar machen
11:59:10 - FOOBAR-42: ermögliche das Abbrechen des Anlegen eines Dingsbums
@MaZderMind
MaZderMind / commit.bash
Last active May 23, 2017 10:00 — forked from dedeibel/commit.fish
fish function that prepares a git commit command with message containing the jira ticket number
# commit with juira-ticket-id shortcut
#
# install via `cat commit.bash >> ~/.bashrc`
# Use:
# Assuming you are in a git repository of a bitbucket / jira branch using the atlassian jira git flow conventions
# example "feature/EXP-1337-cool-new-feature
#
# > commit -a
# will call
# > git commit -em "EXP-1337: " -a
diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c
index c4b30b4926..7bbce7b1a5 100644
--- a/libavfilter/f_ebur128.c
+++ b/libavfilter/f_ebur128.c
@@ -111,6 +111,7 @@ typedef struct {
struct rect gauge; ///< rectangle for the gauge on the right
AVFrame *outpicref; ///< output picture reference, updated regularly
int meter; ///< select a EBU mode between +9 and +18
+ int reference; ///< reference level in LUFS
int scale_range; ///< the range of LU values according to the meter