aboutsummaryrefslogtreecommitdiffstats
path: root/examples/old-stream-stuff
diff options
context:
space:
mode:
authorroot <root@frank.tg14.gathering.org>2014-04-20 02:36:36 +0200
committerroot <root@frank.tg14.gathering.org>2014-04-20 02:36:36 +0200
commitb231e372681e6bfc499fd2aadda840e0b607278f (patch)
treed7f742eba33c5317417d5f53f6fa61287b2ba8ae /examples/old-stream-stuff
parent65f98b040aaff35202fa1e79c4f74fcdaf09329f (diff)
Removed files from the root-directory. Moved into 'examples' dir.
Diffstat (limited to 'examples/old-stream-stuff')
-rwxr-xr-xexamples/old-stream-stuff/encode/kliniskarbeidsflate/reflect-krosus.sh4
-rwxr-xr-xexamples/old-stream-stuff/encode/kliniskarbeidsflate/reflect.sh4
-rwxr-xr-xexamples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-event-sd.sh7
-rwxr-xr-xexamples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-fugle-flash.sh7
-rwxr-xr-xexamples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-noc-fisheye-flash.sh6
-rwxr-xr-xexamples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-south.sh9
-rwxr-xr-xexamples/old-stream-stuff/encode/politietno/foo-withoutreflect.sh6
-rwxr-xr-xexamples/old-stream-stuff/encode/politietno/foo.sh6
-rwxr-xr-xexamples/old-stream-stuff/encode/politietno/svineri.sh24
-rwxr-xr-xexamples/old-stream-stuff/encode/politietno/transcode-duplicate.sh7
-rwxr-xr-xexamples/old-stream-stuff/encode/politietno/transcode-duplicate2.sh10
-rwxr-xr-xexamples/old-stream-stuff/encode/politietno/transcode.sh6
-rwxr-xr-xexamples/old-stream-stuff/encode/politietno/vid.sh7
-rwxr-xr-xexamples/old-stream-stuff/reflect/count-retrofit.sh22
-rwxr-xr-xexamples/old-stream-stuff/reflect/count.sh22
-rwxr-xr-xexamples/old-stream-stuff/reflect/htb.sh79
-rwxr-xr-xexamples/old-stream-stuff/reflect/old/reflectsouth.sh5
-rwxr-xr-xexamples/old-stream-stuff/reflect/old/reflectsouth720p.sh6
-rwxr-xr-xexamples/old-stream-stuff/reflect/reflect-event-lol.sh7
-rwxr-xr-xexamples/old-stream-stuff/reflect/reflect-event-sd.sh5
-rwxr-xr-xexamples/old-stream-stuff/reflect/reflect-event.sh7
-rwxr-xr-xexamples/old-stream-stuff/reflect/reflect-fugle-flash.sh6
-rwxr-xr-xexamples/old-stream-stuff/reflect/reflect-fuglecam.sh5
-rwxr-xr-xexamples/old-stream-stuff/reflect/reflect-nicfisheye-flash.sh5
-rwxr-xr-xexamples/old-stream-stuff/reflect/reflect-noc-transcodes.sh5
-rwxr-xr-xexamples/old-stream-stuff/reflect/reflect-nocfisheye.sh5
-rwxr-xr-xexamples/old-stream-stuff/reflect/reflect-south-raw.sh5
-rwxr-xr-xexamples/old-stream-stuff/reflect/reflect-south-transcode.sh5
-rwxr-xr-xexamples/old-stream-stuff/reflect/transcode-event-flash.sh6
-rwxr-xr-xexamples/old-stream-stuff/reflect/transcode-fugle-flash.sh6
-rwxr-xr-xexamples/old-stream-stuff/reflect/transcode-nocfisheye-flash.sh6
-rwxr-xr-xexamples/old-stream-stuff/reflect/transcode-south-flash.sh6
-rw-r--r--examples/old-stream-stuff/reflect/usage.txt3
-rwxr-xr-xexamples/old-stream-stuff/transcode/count.sh17
-rwxr-xr-xexamples/old-stream-stuff/transcode/flash.sh6
-rwxr-xr-xexamples/old-stream-stuff/transcode/flashtest.sh5
-rwxr-xr-xexamples/old-stream-stuff/transcode/ios-sd.sh7
-rwxr-xr-xexamples/old-stream-stuff/transcode/ios-south.sh7
38 files changed, 361 insertions, 0 deletions
diff --git a/examples/old-stream-stuff/encode/kliniskarbeidsflate/reflect-krosus.sh b/examples/old-stream-stuff/encode/kliniskarbeidsflate/reflect-krosus.sh
new file mode 100755
index 0000000..a40500c
--- /dev/null
+++ b/examples/old-stream-stuff/encode/kliniskarbeidsflate/reflect-krosus.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+while :; do vlc -vvv udp://@:9017 --network-caching 2000 --no-sout-audio --sout '#std{access=udp,mux=ts,dst=151.216.125.4:4016}' --intf dummy --ttl 60 vlc://quit;
+ sleep 5
+done
diff --git a/examples/old-stream-stuff/encode/kliniskarbeidsflate/reflect.sh b/examples/old-stream-stuff/encode/kliniskarbeidsflate/reflect.sh
new file mode 100755
index 0000000..7419433
--- /dev/null
+++ b/examples/old-stream-stuff/encode/kliniskarbeidsflate/reflect.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+while :; do vlc -vvv rtsp://151.216.106.2:554/live1.sdp --network-caching 2000 --no-sout-audio --sout '#std{access=udp,mux=ts,dst=127.0.0.1:9017}' --intf dummy --ttl 60 vlc://quit;
+ sleep 5
+done
diff --git a/examples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-event-sd.sh b/examples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-event-sd.sh
new file mode 100755
index 0000000..fb5c055
--- /dev/null
+++ b/examples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-event-sd.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+while :; do
+cvlc -vv udp://@:4014 --network-caching 2000 --sout-x264-preset fast --sout-x264-tune film --sout-transcode-threads 22 --no-sout-x264-interlaced --sout-x264-keyint 50 --sout-x264-lookahead 100 \
+--sout '#transcode{height=576,vcodec=h264,vb=2000,acodec=mp4a,aenc=fdkaac,ab=128}:std{access=udp,mux=ts,dst=151.216.125.4:4014}'
+sleep 1
+done
diff --git a/examples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-fugle-flash.sh b/examples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-fugle-flash.sh
new file mode 100755
index 0000000..a924de2
--- /dev/null
+++ b/examples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-fugle-flash.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+while :; do
+cvlc -vv --network-caching 3000 --sout-x264-preset fast --sout-transcode-threads 10 --sout-x264-tune film --no-sout-x264-interlaced --sout-x264-lookahead 50 --sout-x264-vbv-maxrate 800 --sout-x264-vbv-bufsize 800 --sout-x264-keyint 50 -v http://stream.tg13.gathering.org:3015 vlc://quit \
+--sout '#transcode{height=480,fps=25,vcodec=h264,vb=800,acodec=aac,ab=128,deinterlace}:std{access=udp,mux=ffmpeg{mux=flv},dst=151.216.125.4:4020}'
+ sleep 1
+done
+
diff --git a/examples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-noc-fisheye-flash.sh b/examples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-noc-fisheye-flash.sh
new file mode 100755
index 0000000..3491232
--- /dev/null
+++ b/examples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-noc-fisheye-flash.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+while :; do
+cvlc -vv --network-caching 5000 --sout-x264-preset fast --sout-transcode-threads 16 --sout-x264-tune film --no-sout-x264-interlaced --sout-x264-lookahead 50 --sout-x264-vbv-maxrate 800 --sout-x264-vbv-bufsize 800 --sout-x264-keyint 50 -v http://stream.tg13.gathering.org:3018 vlc://quit \
+--sout '#transcode{width=768,height=768,vcodec=h264,vb=800}:std{access=udp,mux=ts,dst=151.216.125.4:4019}'
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-south.sh b/examples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-south.sh
new file mode 100755
index 0000000..d5a83e4
--- /dev/null
+++ b/examples/old-stream-stuff/encode/kliniskarbeidsflate/transcode-south.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+while :; do cvlc -vv udp://@:9017 \
+ --sout-ts-shaping=1000 --sout-ts-use-key-frames --sout-ts-dts-delay=500 --sout-transcode-fps 0 --no-sout-transcode-audio-sync --network-caching 2000 \
+ --no-sout-x264-interlaced --sout-x264-preset veryfast --sout-x264-tune film \
+ --sout-transcode-threads 3 --sout-x264-keyint 25 --no-sout-audio \
+ --sout '#duplicate{dst="transcode{vcodec=h264,height=720,vb=3000}:std{access=udp,mux=ts,dst=151.216.125.4:4017}",dst="std{access=udp,mux=ts,dst=151.216.125.4:4016}"}' \
+ --intf dummy --ttl 20 vlc://quit;
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/encode/politietno/foo-withoutreflect.sh b/examples/old-stream-stuff/encode/politietno/foo-withoutreflect.sh
new file mode 100755
index 0000000..21bcda6
--- /dev/null
+++ b/examples/old-stream-stuff/encode/politietno/foo-withoutreflect.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+/home/techserver/vlc/vlc -I dummy -vvvv --decklink-audio-connection embedded --live-caching 3000 --decklink-aspect-ratio 16:9 --decklink-mode hp50 \
+ --sout-x264-preset slow --sout-x264-tune film --sout-transcode-threads 23 --no-sout-x264-interlaced \
+ --sout-x264-keyint 50 --sout-x264-lookahead 100 --sout-x264-vbv-maxrate 5000 --sout-x264-vbv-bufsize 5000 \
+ -v decklink:// vlc://quit \
+ --sout '#transcode{vcodec=h264,vb=3000,acodec=mp4a,aenc=fdkaac,ab=256}:std{access=udp,mux=ts,dst=151.216.124.80:9094}'
diff --git a/examples/old-stream-stuff/encode/politietno/foo.sh b/examples/old-stream-stuff/encode/politietno/foo.sh
new file mode 100755
index 0000000..dfdfc03
--- /dev/null
+++ b/examples/old-stream-stuff/encode/politietno/foo.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+/home/techserver/vlc/vlc -I dummy -vvvv --decklink-audio-connection embedded --live-caching 3000 --decklink-aspect-ratio 16:9 --decklink-mode hp50 \
+ --sout-x264-preset slow --sout-x264-tune film --sout-transcode-threads 23 --no-sout-x264-interlaced \
+ --sout-x264-keyint 50 --sout-x264-lookahead 100 --sout-x264-vbv-maxrate 5000 --sout-x264-vbv-bufsize 5000 \
+ -v decklink:// vlc://quit \
+ --sout '#transcode{vcodec=h264,vb=3000,acodec=mp4a,aenc=fdkaac,ab=256}:std{access=udp,mux=ts,dst=151.216.125.4:4013}'
diff --git a/examples/old-stream-stuff/encode/politietno/svineri.sh b/examples/old-stream-stuff/encode/politietno/svineri.sh
new file mode 100755
index 0000000..ac09601
--- /dev/null
+++ b/examples/old-stream-stuff/encode/politietno/svineri.sh
@@ -0,0 +1,24 @@
+~/decklink-sdk/Linux/Samples/bmdtools/bmdcapture $(
+ echo '-C 0' # Decklink card number
+ echo '-m 11' # Input format mode (ID 8 = 1080i/25)
+ echo '-V 4' # Video input (4 = SDI)
+ echo '-A 2' # Audio input (2 = Embedded)
+ echo '-c 2' # Number of audio channels
+ echo '-M 10' # Memory limit, in GB, for the output buffer (it leaks slightly...)
+ echo '-F nut -f pipe:1' # Output format and file name
+) | \
+ffmpeg $(
+ echo '-y -re -i -' # Input from pipe
+ echo '-v verbose' # Verbosity level
+# echo '-filter:v format=yuv420p,yadif=1:0:0' # Video format conversion and deinterlacing
+ echo '-filter:v scale=480x270'
+ echo '-c:v libx264' # Video encoder to use
+ echo '-tune film -preset slow' # Video encoder options
+ echo '-x264opts keyint=50:rc-lookahead=0' # x264-specific options
+# echo '-b:v 1M' # Video bitrate
+ echo '-c:a libfaac' # Audio encoder to use
+ echo '-b:a 192k' # Audio bitrate
+ echo '-threads auto' # Number of threads to use
+ echo '-f mpegts udp://151.216.125.4:4013' # Output format and file name
+)
+
diff --git a/examples/old-stream-stuff/encode/politietno/transcode-duplicate.sh b/examples/old-stream-stuff/encode/politietno/transcode-duplicate.sh
new file mode 100755
index 0000000..591e529
--- /dev/null
+++ b/examples/old-stream-stuff/encode/politietno/transcode-duplicate.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+while :; do
+cvlc -vv --decklink-audio-connection embedded --live-caching 2000 --decklink-aspect-ratio 16:9 --decklink-mode hp50 \
+ --sout-x264-preset fast --sout-x264-tune film --sout-transcode-threads 24 --no-sout-x264-interlaced --sout-x264-keyint 50 --sout-x264-lookahead 100 --sout-x264-vbv-maxrate 4000 --sout-x264-vbv-bufsize 4000 decklink:// vlc://quit \
+ --sout '#duplicate{dst="transcode{vcodec=h264,vb=6000,acodec=mp4a,aenc=fdkaac,ab=256}:std{access=udp,mux=ts,dst=151.216.125.4:4013}",dst="transcode{height=576,vcodec=h264,vb=2000,acodec=mp4a,aenc=fdkaac,ab=128}:std{access=udp,mux=ts,dst=151.216.125.4:4014}"}'
+sleep 1
+done
diff --git a/examples/old-stream-stuff/encode/politietno/transcode-duplicate2.sh b/examples/old-stream-stuff/encode/politietno/transcode-duplicate2.sh
new file mode 100755
index 0000000..6b85d1d
--- /dev/null
+++ b/examples/old-stream-stuff/encode/politietno/transcode-duplicate2.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# event signal:
+# transcode hd and move to reflector
+# mirror signal to encoder2 (kliniskarbeidsflate) and transcode sd -> reflector
+while :; do
+cvlc -vv --decklink-audio-connection embedded --live-caching 2000 --decklink-aspect-ratio 16:9 --decklink-mode hp50 \
+ --sout-x264-preset fast --sout-x264-tune film --sout-transcode-threads 22 --no-sout-x264-interlaced --sout-x264-keyint 50 --sout-x264-lookahead 100 decklink:// vlc://quit \
+ --sout '#duplicate{dst="transcode{vcodec=h264,vb=6000,acodec=mp4a,aenc=fdkaac,ab=256}:std{access=udp,mux=ts,dst=151.216.125.4:4013}",dst="std{access=udp,mux=ts,dst=151.216.125.9:4014}"}'
+sleep 1
+done
diff --git a/examples/old-stream-stuff/encode/politietno/transcode.sh b/examples/old-stream-stuff/encode/politietno/transcode.sh
new file mode 100755
index 0000000..a4feda9
--- /dev/null
+++ b/examples/old-stream-stuff/encode/politietno/transcode.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+cvlc -I dummy -vvvv --decklink-audio-connection embedded --live-caching 2000 --decklink-aspect-ratio 16:9 --decklink-mode hp50 \
+ --sout-x264-preset slow --sout-x264-tune film --sout-transcode-threads 23 --no-sout-x264-interlaced \
+ --sout-x264-keyint 50 --sout-x264-lookahead 100 --sout-x264-vbv-maxrate 6000 --sout-x264-vbv-bufsize 6000 \
+ -v decklink:// vlc://quit \
+ --sout '#transcode{vcodec=h264,vb=6000,acodec=mp4a,aenc=fdkaac,ab=256}:std{access=udp,mux=ts,dst=151.216.125.4:4013}'
diff --git a/examples/old-stream-stuff/encode/politietno/vid.sh b/examples/old-stream-stuff/encode/politietno/vid.sh
new file mode 100755
index 0000000..8c5bcba
--- /dev/null
+++ b/examples/old-stream-stuff/encode/politietno/vid.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# VLC for box connected to broadcast-equipment Blackmagic/Decklink: Audio and Video from SDI Transcodes HD and sends via UDP to reflector - Marius / Tech:Server
+while :; do cvlc -vv --no-decklink-tenbits --decklink-audio-connection embedded --live-caching 1800 --decklink-aspect-ratio 16:9 --decklink-mode hp50 \
+ --sout-x264-preset medium --sout-x264-tune film --sout-transcode-threads 15 --no-sout-x264-interlaced --sout-x264-keyint 100 --sout-x264-lookahead 50 --sout-x264-vbv-maxrate 7000 --sout-x264-vbv-bufsize 7000 -v decklink:// vlc://quit \
+ --sout '#transcode{vcodec=h264,vb=3000,acodec=mp3,ab=256}:std{access=udp,mux=ts,dst=151.216.125.4:4013}'
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/count-retrofit.sh b/examples/old-stream-stuff/reflect/count-retrofit.sh
new file mode 100755
index 0000000..1ff8c30
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/count-retrofit.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+while :; do
+ date=$(date +"%Y-%m-%d-%H:%M:%S")
+ #( lsof -n | grep vlc ; ssh root@gaffeltruck.tg12.gathering.org 'lsof -n | grep vlc' ) > /var/log/stream-count/$date
+ sudo lsof -n | grep vlc > /var/log/stream-count/$date
+ for PORT in 3013 3014 3015 3016 3017 3018 3019 5013 5015 5019; do
+ for PROTO in IPv4 IPv6; do
+ if [ "$PROTO" = "IPv4" ]; then
+ GREPFOR='151\.216'
+ else
+ GREPFOR='2a02:ed02:'
+ fi
+
+ # 151.216.x.x / 2a02:ed02::/32 -> TG13
+ cat /var/log/stream-count/$date | grep EST | egrep $GREPFOR | egrep "(151\.216\..*|2a02:ed02:.*):$PORT->" | cut -d'>' -f2 | sed 's/:[0-9]\+ (ESTABLISHED)//' | sort -u | grep -vEc -e "\[2a02:ed02:|151\.216\." | while read foo; do echo "$date $PORT $PROTO external $foo"; done | tee -a better_datacube.log
+ cat /var/log/stream-count/$date | grep EST | egrep $GREPFOR | egrep "(151\.216\..*|2a02:ed02:.*):$PORT->" | cut -d'>' -f2 | sed 's/:[0-9]\+ (ESTABLISHED)//' | sort -u | grep -Ec -e "\[2a02:ed02:|151\.216\." | while read foo; do echo "$date $PORT $PROTO internal $foo"; done | tee -a better_datacube.log
+ done
+ done
+ sleep 60
+done;
+
diff --git a/examples/old-stream-stuff/reflect/count.sh b/examples/old-stream-stuff/reflect/count.sh
new file mode 100755
index 0000000..e1fa38c
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/count.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+while :; do
+ date=$(date +"%Y-%m-%d-%H:%M:%S")
+ #( lsof -n | grep vlc ; ssh root@gaffeltruck.tg12.gathering.org 'lsof -n | grep vlc' ) > /var/log/stream-count/$date
+ sudo lsof -n | grep vlc > /var/log/stream-count/$date
+ for PORT in 3013 3014 3015 3016 3017 3018 3019 5013 5015 5019; do
+ for PROTO in IPv4 IPv6; do
+ if [ "$PROTO" = "IPv4" ]; then
+ GREPFOR='151\.216'
+ else
+ GREPFOR='2a02:ed02:'
+ fi
+
+ # 151.216.x.x / 2a02:ed02::/32 -> TG13
+ cat /var/log/stream-count/$date | grep EST | egrep $GREPFOR | egrep "(151\.216\..*|2a02:ed02:.*):$PORT->" | cut -d'>' -f2 | sed 's/:[0-9]\+ (ESTABLISHED)//' | sort -u | grep -vEc -e "\[2a02:ed02:|151\.216\." | while read foo; do echo "$date $PORT $PROTO external $foo"; done | tee -a count_datacube.log
+ cat /var/log/stream-count/$date | grep EST | egrep $GREPFOR | egrep "(151\.216\..*|2a02:ed02:.*):$PORT->" | cut -d'>' -f2 | sed 's/:[0-9]\+ (ESTABLISHED)//' | sort -u | grep -Ec -e "\[2a02:ed02:|151\.216\." | while read foo; do echo "$date $PORT $PROTO internal $foo"; done | tee -a count_datacube.log
+ done
+ done
+ sleep 60
+done;
+
diff --git a/examples/old-stream-stuff/reflect/htb.sh b/examples/old-stream-stuff/reflect/htb.sh
new file mode 100755
index 0000000..c6107ea
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/htb.sh
@@ -0,0 +1,79 @@
+#!/bin/bash
+it () {
+ iptables $@
+ ip6tables $@
+}
+
+setup_htb() {
+ FROM=$1
+ TO=$2
+ RATEMBIT=$3
+ FIFOLIMIT=$(( RATEMBIT * 1048576 / 8 )) # about one second
+ echo $FROM..$TO ${RATEMBIT}Mbit fifolimit=$FIFOLIMIT >&2
+
+ for i in $( seq $FROM $TO ); do
+ # slots need to be in hex, crazy enough
+ slot=$( printf %x $(( i + 1 )) )
+
+ # no burst! perfectly even sending at the given rate
+ echo class add dev eth0 parent 8000: classid 8000:$slot htb rate ${RATEMBIT}Mbit burst 0 mtu 576
+
+ # every class needs a child qdisc, plug in a plain fifo
+ # 8000kbit = 512 000
+ echo qdisc add dev eth0 parent 8000:$slot handle $slot: bfifo limit $FIFOLIMIT
+ #echo qdisc add dev eth0 parent 8000:$slot handle $slot: fq_codel limit 1000
+ done
+}
+
+ethtool -K eth0 gso off tso off
+
+# iptables stuff
+it -t mangle -F OUTPUT
+it -t mangle -A OUTPUT -p tcp -m multiport ! --sport 3013,3014,3015,3016,3017,3018,5013,5015,5016,5018 -j MARK --set-mark 65000
+it -t mangle -A OUTPUT ! -p tcp -j MARK --set-mark 65000
+
+(
+ # reset tc
+ echo qdisc del dev eth0 root
+
+ # @Sesse Rockj: https://www.google.com/search?q=6000+kbit%2Fsec+*+0.5+seconds+in+byte
+ # @Sesse ViD: også trenger du flere sett med køer, for 2mbit-strømmer burde shapes annerledes enn 5mbit-strømmer :-P
+
+ # root qdisc should be htb
+ echo qdisc add dev eth0 root handle 8000: htb r2q 100
+
+ # all non-vlc traffic (fwmark 5) goes into the default class
+ echo class add dev eth0 parent 8000: classid 8000:1 htb rate 10Gbit burst 8192 mtu 1514
+ echo filter add dev eth0 parent 8000: handle 65000 pref 10 fw classid 8000:1
+
+ # setup_htb 1 799 6 # Main stream hq 3mbps
+ # setup_htb 800 1000 15 # Fuglecam raw 7-8mbps
+ # # setup_htb 10000 11999 15 # South raw ??
+ # # setup_htb 12000 13999 1 # South transcoded, 500 kbits
+ # # setup_htb 14000 15999 25 # NOC Fisheye 15mbps ish
+ # # setup_htb 20000 21999 2 # Flashstrøm 1mbps
+
+ # setup_htb 1 4999 10 # Main stream hq 6mbps
+ # setup_htb 5000 7999 5 # Main stream sd 2mbit
+ # setup_htb 8000 9999 15 # Fuglecam raw 7-8mbps
+ # setup_htb 10000 11999 15 # South raw ??
+ # setup_htb 12000 13999 1 # South transcoded, 500 kbits
+ # setup_htb 14000 15999 25 # NOC Fisheye 15mbps ish
+ # setup_htb 16000 18999 2 # Flashstrøm fugleberget 1mbps
+ # setup_htb 19000 21999 2 # Flashstrøm event 1mbps
+ # setup_htb 22000 24999 2 # Flashstrøm south 1mbps
+ # setup_htb 25000 27999 2 # Flashstrøm noc 1mbps
+ setup_htb 1 4999 10 # Main stream hq 6mbps
+ setup_htb 5000 5999 5 # Main stream sd 2mbit
+ setup_htb 8000 9999 15 # Fuglecam raw 7-8mbps
+ setup_htb 10000 11999 15 # South raw ??
+ setup_htb 12000 13999 1 # South transcoded, 500 kbits
+ setup_htb 14000 15999 25 # NOC Fisheye 15mbps ish
+ setup_htb 16000 18999 2 # Flashstrøm fugleberget 1mbps
+ setup_htb 19000 21999 2 # Flashstrøm event 1mbps
+ setup_htb 22000 24999 2 # Flashstrøm south 1mbps
+ setup_htb 25000 25999 2 # Flashstrøm noc 1mbps
+
+ # decide between the classes by mark
+ echo filter add dev eth0 parent 8000: handle 2 pref 20 flow map key mark baseclass 8000:2
+) | tc -b
diff --git a/examples/old-stream-stuff/reflect/old/reflectsouth.sh b/examples/old-stream-stuff/reflect/old/reflectsouth.sh
new file mode 100755
index 0000000..39504e5
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/old/reflectsouth.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+while :; do
+vlc --intf dummy -v http://pannekake.samfundet.no:9094 vlc://quit --sout '#duplicate{dst=std{access=http,mux=ts,dst=:3014},dst=std{access=udp,mux=ts,dst=233.191.12.2:2014}' --intf dummy --ttl 20
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/old/reflectsouth720p.sh b/examples/old-stream-stuff/reflect/old/reflectsouth720p.sh
new file mode 100755
index 0000000..355cf8e
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/old/reflectsouth720p.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+while :; do
+cvlc --intf dummy -v "#transcode{vcodec=h264,width=320,height=180,acodec=aac,ab=128,vb=500}:rtp{port=4555,sdp=rtsp://151.216.106.2:4555/stream.sdp,mp4a­-latm}"
+vlc --intf dummy -v http://pannekake.samfundet.no:9093 vlc://quit --sout '#std{access=http,mux=ts,dst=:5014}' --intf dummy --ttl 30
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/reflect-event-lol.sh b/examples/old-stream-stuff/reflect/reflect-event-lol.sh
new file mode 100755
index 0000000..74dbea6
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/reflect-event-lol.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+while :; do
+sudo cvlc --intf dummy -v --sout-http-mark-start 0 --sout-http-mark-end 4999 udp://@:4013 vlc://quit --sout \
+'#duplicate{dst=std{access=http,mux=ts,dst=[::]:3013}",dst=std{access=udp,mux=ts,dst=[ff7e:a40:2a02:ed02:ffff::13]:2013},dst=std{access=livehttp{seglen=5,delsegs=true,numsegs=5,index=/srv/stream.tg13.gathering.org/ios/event.m3u8,index-url=http://stream.tg13.gathering.org/ios/event-########.ts},mux=ts{use-key-frames},dst=/srv/stream.tg13.gathering.org/ios/event-########.ts}}}' \
+--intf dummy --ttl 60
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/reflect-event-sd.sh b/examples/old-stream-stuff/reflect/reflect-event-sd.sh
new file mode 100755
index 0000000..aa38018
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/reflect-event-sd.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+while :; do
+sudo cvlc --intf dummy -v --sout-http-mark-start 5000 --sout-http-mark-end 7999 udp://@:4014 vlc://quit --sout '#duplicate{dst=std{access=http,mux=ts,dst=[::]:3014},dst=std{access=udp,mux=ts,dst=[ff7e:a40:2a02:ed02:ffff::14]:2014}' --intf dummy --ttl 60
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/reflect-event.sh b/examples/old-stream-stuff/reflect/reflect-event.sh
new file mode 100755
index 0000000..3ab8c42
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/reflect-event.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+while :; do
+sudo cvlc --intf dummy -v --sout-http-mark-start 0 --sout-http-mark-end 4999 udp://@:4013 vlc://quit --sout \
+'#duplicate{dst=std{access=http,mux=ts,dst=[::]:3013}",dst=std{access=udp,mux=ts,dst=[ff7e:a40:2a02:ed02:ffff::13]:2013},dst=std{access=livehttp{seglen=5,delsegs=true,numsegs=5,index=/srv/stream.tg13.gathering.org/ios/stream.m3u8,index-url=http://stream.tg13.gathering.org/ios/stream-########.ts},mux=ts{use-key-frames},dst=/srv/stream.tg13.gathering.org/ios/stream-########.ts}}}' \
+--intf dummy --ttl 60
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/reflect-fugle-flash.sh b/examples/old-stream-stuff/reflect/reflect-fugle-flash.sh
new file mode 100755
index 0000000..5de38bb
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/reflect-fugle-flash.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+while :; do
+sudo cvlc -vv --sout-http-mark-start 16000 --sout-http-mark-end 18999 --network-caching 3000 --sout-x264-preset fast --sout-transcode-threads 10 --sout-x264-tune film --no-sout-x264-interlaced --sout-x264-lookahead 50 --sout-x264-vbv-maxrate 800 --sout-x264-vbv-bufsize 800 --sout-x264-keyint 50 -v udp://@:4020 vlc://quit \
+--sout '#std{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=[::]:5015/stream.flv}'
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/reflect-fuglecam.sh b/examples/old-stream-stuff/reflect/reflect-fuglecam.sh
new file mode 100755
index 0000000..c9a8917
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/reflect-fuglecam.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+while :; do
+sudo vlc -vvv --intf dummy -v --sout-http-mark-start 8000 --sout-http-mark-end 9999 udp://@:4015 vlc://quit --sout '#duplicate{dst=std{access=http,mux=ts,dst=[::]:3015},dst=std{access=udp,mux=ts,dst=[ff7e:a40:2a02:ed02:ffff::15]:2015}' --intf dummy --ttl 60
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/reflect-nicfisheye-flash.sh b/examples/old-stream-stuff/reflect/reflect-nicfisheye-flash.sh
new file mode 100755
index 0000000..dd4da84
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/reflect-nicfisheye-flash.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+while :; do
+sudo vlc -vvv --intf dummy -v --sout-http-mark-start 25000 --sout-http-mark-end 27999 udp://@:4018 vlc://quit --sout '#duplicate{dst=std{access=http,mux=ts,dst=[::]:3018},dst=std{access=udp,mux=ts,dst=[ff7e:a40:2a02:ed02:ffff::18]:2018}' --intf dummy --ttl 60
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/reflect-noc-transcodes.sh b/examples/old-stream-stuff/reflect/reflect-noc-transcodes.sh
new file mode 100755
index 0000000..3a1fe4e
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/reflect-noc-transcodes.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+while :; do
+sudo cvlc -vvv --intf dummy -v --sout-http-mark-start 25000 --sout-http-mark-end 27999 udp://@:4019 vlc://quit --sout '#duplicate{dst="std{access=http{mime=video/x-flv},dst=[::]:5019/stream.flv}",dst="std{access=http,mux=ts,dst=[::]:3019}",dst="std{access=udp,mux=ts,dst=[ff7e:a40:2a02:ed02:ffff::19]:2019}"}' --intf dummy --ttl 60
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/reflect-nocfisheye.sh b/examples/old-stream-stuff/reflect/reflect-nocfisheye.sh
new file mode 100755
index 0000000..6a003f4
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/reflect-nocfisheye.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+while :; do
+sudo cvlc -vvv --intf dummy -v --sout-http-mark-start 14000 --sout-http-mark-end 15999 --network-caching 2000 rtsp://151.216.124.79/live.sdp vlc://quit --sout '#duplicate{dst=std{access=http,mux=ts,dst=[::]:3018},dst=std{access=udp,mux=ts,dst=[ff7e:a40:2a02:ed02:ffff::18]:2018}' --intf dummy --ttl 60
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/reflect-south-raw.sh b/examples/old-stream-stuff/reflect/reflect-south-raw.sh
new file mode 100755
index 0000000..720e94c
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/reflect-south-raw.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+while :; do
+sudo cvlc -vvv --intf dummy -v --sout-http-mark-start 10000 --sout-http-mark-end 11999 udp://@151.216.125.4:4016 vlc://quit --sout '#duplicate{dst=std{access=http,mux=ts,dst=[::]:3016},dst=std{access=udp,mux=ts,dst=[ff7e:a40:2a02:ed02:ffff::16]:2016}' --intf dummy --ttl 60
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/reflect-south-transcode.sh b/examples/old-stream-stuff/reflect/reflect-south-transcode.sh
new file mode 100755
index 0000000..65798dc
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/reflect-south-transcode.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+while :; do
+vlc -vvv --intf dummy -v --sout-http-mark-start 12000 --sout-http-mark-end 13999 udp://@:4017 vlc://quit --sout '#duplicate{dst=std{access=http,mux=ts,dst=[::]:3017},dst=std{access=udp,mux=ts,dst=[ff7e:a40:2a02:ed02:ffff::17]:2017}' --intf dummy --ttl 60
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/transcode-event-flash.sh b/examples/old-stream-stuff/reflect/transcode-event-flash.sh
new file mode 100755
index 0000000..34f546f
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/transcode-event-flash.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+while :; do
+sudo cvlc -vv --sout-http-mark-start 19000 --sout-http-mark-end 21999 --network-caching 5000 --sout-x264-preset fast --sout-transcode-threads 10 --sout-x264-tune film --no-sout-x264-interlaced --sout-x264-lookahead 50 --sout-x264-vbv-maxrate 800 --sout-x264-vbv-bufsize 800 --sout-x264-keyint 50 -v http://stream.tg13.gathering.org:3013 vlc://quit \
+--sout '#transcode{height=480,fps=25,vcodec=h264,vb=800,acodec=aac,ab=128}:std{access=http{mime=video/x-flv},dst=[::]:5013/stream.flv}'
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/transcode-fugle-flash.sh b/examples/old-stream-stuff/reflect/transcode-fugle-flash.sh
new file mode 100755
index 0000000..110b8b8
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/transcode-fugle-flash.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+while :; do
+sudo cvlc -vv --sout-http-mark-start 16000 --sout-http-mark-end 18999 --network-caching 3000 --sout-x264-preset fast --sout-transcode-threads 10 --sout-x264-tune film --no-sout-x264-interlaced --sout-x264-lookahead 50 --sout-x264-vbv-maxrate 800 --sout-x264-vbv-bufsize 800 --sout-x264-keyint 50 -v http://stream.tg13.gathering.org:3015 vlc://quit \
+--sout '#transcode{height=480,fps=25,vcodec=h264,vb=800,acodec=aac,ab=128,deinterlace}:std{access=http{mime=video/x-flv},dst=[::]:5015/stream.flv}'
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/transcode-nocfisheye-flash.sh b/examples/old-stream-stuff/reflect/transcode-nocfisheye-flash.sh
new file mode 100755
index 0000000..19f89ad
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/transcode-nocfisheye-flash.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+while :; do
+sudo cvlc -vv --sout-http-mark-start 25000 --sout-http-mark-end 27999 --network-caching 5000 --sout-x264-preset fast --sout-transcode-threads 10 --sout-x264-tune film --no-sout-x264-interlaced --sout-x264-lookahead 50 --sout-x264-vbv-maxrate 800 --sout-x264-vbv-bufsize 800 --sout-x264-keyint 50 -v http://stream.tg13.gathering.org:3018 vlc://quit \
+--sout '#transcode{height=480,fps=25,vcodec=h264,vb=800,acodec=aac,ab=128}:std{access=http{mime=video/x-flv},dst=[::]:5018/stream.flv}'
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/transcode-south-flash.sh b/examples/old-stream-stuff/reflect/transcode-south-flash.sh
new file mode 100755
index 0000000..6bf2cb8
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/transcode-south-flash.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+while :; do
+sudo cvlc -vv --sout-http-mark-start 22000 --sout-http-mark-end 24999 --network-caching 5000 --sout-x264-preset fast --sout-transcode-threads 10 --sout-x264-tune film --no-sout-x264-interlaced --sout-x264-lookahead 50 --sout-x264-vbv-maxrate 800 --sout-x264-vbv-bufsize 800 --sout-x264-keyint 50 -v http://stream.tg13.gathering.org:3016 vlc://quit \
+--sout '#transcode{height=480,fps=25,vcodec=h264,vb=800,acodec=aac,ab=128}:std{access=http{mime=video/x-flv},dst=[::]:5016/stream.flv}'
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/reflect/usage.txt b/examples/old-stream-stuff/reflect/usage.txt
new file mode 100644
index 0000000..8b90bee
--- /dev/null
+++ b/examples/old-stream-stuff/reflect/usage.txt
@@ -0,0 +1,3 @@
+event-sd - ./reflect-event-sd.sh
+event - ./reflect-event-lol.sh
+event-flash - ./transcode-event-flash.sh
diff --git a/examples/old-stream-stuff/transcode/count.sh b/examples/old-stream-stuff/transcode/count.sh
new file mode 100755
index 0000000..22f6aa1
--- /dev/null
+++ b/examples/old-stream-stuff/transcode/count.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+while :; do
+ date=$(date +"%Y-%m-%d-%H:%M:%S")
+ ( lsof -n | grep vlc ; ssh root@gaffeltruck.tg12.gathering.org 'lsof -n | grep vlc' ) > /var/log/stream-count/$date
+ for PORT in 3013 5013 3014 5014 3015; do
+ for PROTO in IPv4 IPv6; do
+ # 176.110.x.x / 2a01:798:76a:125:: -> TG12
+ # 176.31.230.19 / 2001:41d0:2:f700::2 -> OVH box
+ cat /var/log/stream-count/$date | grep EST | egrep $PROTO | egrep "(176\.31\.230\.19|2001:41d0:2:f700::.*):$PORT->" | cut -d'>' -f2 | sed 's/:[0-9]\+ (ESTABLISHED)//' | sort -u | grep -vEc 'fisk' | while read foo; do echo "$date $PORT $PROTO foreign $foo"; done | tee -a count_datacube.log
+ cat /var/log/stream-count/$date | grep EST | egrep $PROTO | egrep "(176\.110\..*|2a01:798:76a:125::.*):$PORT->" | cut -d'>' -f2 | sed 's/:[0-9]\+ (ESTABLISHED)//' | sort -u | grep -vEc -e "\[2a01:798:76a:|176\.110\." | while read foo; do echo "$date $PORT $PROTO external $foo"; done | tee -a count_datacube.log
+ cat /var/log/stream-count/$date | grep EST | egrep $PROTO | egrep "(176\.110\..*|2a01:798:76a:125::.*):$PORT->" | cut -d'>' -f2 | sed 's/:[0-9]\+ (ESTABLISHED)//' | sort -u | grep -Ec -e "\[2a01:798:76a:|176\.110\." | while read foo; do echo "$date $PORT $PROTO internal $foo"; done | tee -a count_datacube.log
+ done
+ done
+ sleep 60
+done;
+
diff --git a/examples/old-stream-stuff/transcode/flash.sh b/examples/old-stream-stuff/transcode/flash.sh
new file mode 100755
index 0000000..3c42a8c
--- /dev/null
+++ b/examples/old-stream-stuff/transcode/flash.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+# udp://@:5013
+while :; do
+vlc --intf dummy -vvv http://vivace.tg12.gathering.org:5013/stream.flv vlc://quit --network-caching 2000 --sout-mux-caching 3000 --sout "#std{access=http{mime=video/x-flv},dst=:5013/stream.flv}"
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/transcode/flashtest.sh b/examples/old-stream-stuff/transcode/flashtest.sh
new file mode 100755
index 0000000..83ea48d
--- /dev/null
+++ b/examples/old-stream-stuff/transcode/flashtest.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+while :; do
+ vlc --intf dummy -vvv http://stream.tg12.gathering.org:3013 vlc://quit --udp-caching 1000 --sout-x264-tune film --sout-x264-keyint 25 --sout-x264-preset veryfast --sout "#transcode{width=980,height=550,vcodec=h264,vb=1000,acodec=aac,ab=128}:std{access=http{mime=video/x-flv},dst=:5013/stream.flv}"
+ sleep 1
+done
diff --git a/examples/old-stream-stuff/transcode/ios-sd.sh b/examples/old-stream-stuff/transcode/ios-sd.sh
new file mode 100755
index 0000000..28a907a
--- /dev/null
+++ b/examples/old-stream-stuff/transcode/ios-sd.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+while :; do
+vlc -I dummy --live-caching 0 http://vivace.tg12.gathering.org:5013/stream.flv --sout-x264-profile baseline --sout-x264-preset veryfast --sout-x264-aud --sout-x264-keyint 30 --sout-x264-ref 1 vlc://quit --sout='#std{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=/srv/stream.tg12.gathering.org/ios/sd.m3u8,index-url=http://stream.tg12.gathering.org/ios/sd-########.ts},mux=ts{use-key-frames},dst=/srv/stream.tg12.gathering.org/ios/sd-########.ts}'
+ sleep 2
+done
+
+# --sout-x264-level 30
diff --git a/examples/old-stream-stuff/transcode/ios-south.sh b/examples/old-stream-stuff/transcode/ios-south.sh
new file mode 100755
index 0000000..ac06968
--- /dev/null
+++ b/examples/old-stream-stuff/transcode/ios-south.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+while :; do
+vlc -I dummy --live-caching 0 udp://@:5114 vlc://quit --sout='#std{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=/srv/stream.tg12.gathering.org/ios/south.m3u8,index-url=http://stream.tg12.gathering.org/ios/south-########.ts},mux=ts{use-key-frames},dst=/srv/stream.tg12.gathering.org/ios/south-########.ts}'
+ sleep 2
+done
+
+# --sout-x264-level 30