diff options
Diffstat (limited to 'examples/old-stream-stuff/reflect')
20 files changed, 0 insertions, 216 deletions
diff --git a/examples/old-stream-stuff/reflect/count-retrofit.sh b/examples/old-stream-stuff/reflect/count-retrofit.sh deleted file mode 100755 index 1ff8c30..0000000 --- a/examples/old-stream-stuff/reflect/count-retrofit.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/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 deleted file mode 100755 index e1fa38c..0000000 --- a/examples/old-stream-stuff/reflect/count.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/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 deleted file mode 100755 index c6107ea..0000000 --- a/examples/old-stream-stuff/reflect/htb.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/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 deleted file mode 100755 index 39504e5..0000000 --- a/examples/old-stream-stuff/reflect/old/reflectsouth.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/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 deleted file mode 100755 index 355cf8e..0000000 --- a/examples/old-stream-stuff/reflect/old/reflectsouth720p.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/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 deleted file mode 100755 index 74dbea6..0000000 --- a/examples/old-stream-stuff/reflect/reflect-event-lol.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 deleted file mode 100755 index aa38018..0000000 --- a/examples/old-stream-stuff/reflect/reflect-event-sd.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/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 deleted file mode 100755 index 3ab8c42..0000000 --- a/examples/old-stream-stuff/reflect/reflect-event.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/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 deleted file mode 100755 index 5de38bb..0000000 --- a/examples/old-stream-stuff/reflect/reflect-fugle-flash.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/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 deleted file mode 100755 index c9a8917..0000000 --- a/examples/old-stream-stuff/reflect/reflect-fuglecam.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/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 deleted file mode 100755 index dd4da84..0000000 --- a/examples/old-stream-stuff/reflect/reflect-nicfisheye-flash.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/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 deleted file mode 100755 index 3a1fe4e..0000000 --- a/examples/old-stream-stuff/reflect/reflect-noc-transcodes.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/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 deleted file mode 100755 index 6a003f4..0000000 --- a/examples/old-stream-stuff/reflect/reflect-nocfisheye.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/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 deleted file mode 100755 index 720e94c..0000000 --- a/examples/old-stream-stuff/reflect/reflect-south-raw.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/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 deleted file mode 100755 index 65798dc..0000000 --- a/examples/old-stream-stuff/reflect/reflect-south-transcode.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/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 deleted file mode 100755 index 34f546f..0000000 --- a/examples/old-stream-stuff/reflect/transcode-event-flash.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/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 deleted file mode 100755 index 110b8b8..0000000 --- a/examples/old-stream-stuff/reflect/transcode-fugle-flash.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/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 deleted file mode 100755 index 19f89ad..0000000 --- a/examples/old-stream-stuff/reflect/transcode-nocfisheye-flash.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/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 deleted file mode 100755 index 6bf2cb8..0000000 --- a/examples/old-stream-stuff/reflect/transcode-south-flash.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/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 deleted file mode 100644 index 8b90bee..0000000 --- a/examples/old-stream-stuff/reflect/usage.txt +++ /dev/null @@ -1,3 +0,0 @@ -event-sd - ./reflect-event-sd.sh -event - ./reflect-event-lol.sh -event-flash - ./transcode-event-flash.sh |