Remove brtv script which belongs in a different repository - bitreich-memestats - Bitreich meme statistics and graphs.
 (HTM) git clone git://bitreich.org/bitreich-memestats git://hg6vgqziawt5s4dj.onion/bitreich-memestats
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) LICENSE
       ---
 (DIR) commit 9093a18858fbbc08bc3423e258eba8a87e94f7cd
 (DIR) parent 7503a598bf5ee73165e4deedf8b85c5a633de49e
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Tue, 11 Aug 2020 16:49:20 +0200
       
       Remove brtv script which belongs in a different repository
       
       Diffstat:
         D brtv-start.sh                       |     142 -------------------------------
       
       1 file changed, 0 insertions(+), 142 deletions(-)
       ---
 (DIR) diff --git a/brtv-start.sh b/brtv-start.sh
       @@ -1,142 +0,0 @@
       -#!/bin/sh
       -# generate title animations and start streaming server
       -
       -pass="$(cat icecastpass)"
       -
       -if [ $# -ne 1 ]; then
       -        printf 'usage: %s <memecache_path>\n' "$0" >&2
       -        exit
       -fi
       -
       -### CONFIGURATION START
       -
       -# streaming server executable
       -#bin=vlc
       -
       -# intermediate playlist file
       -playlist="playlist"
       -
       -# memecache source dir
       -memecache="$1"
       -
       -# converted memecache dir
       -memecache_conv="memecache"
       -
       -# title animations dir
       -title="title"
       -
       -# ffmpeg codec flags for generated animations
       -ffmpeg_codec="-acodec libopus -b:a 96K -vcodec libvpx -f webm -vf scale=1280:-1 -r 30 -ac 2"
       -
       -# target video resolution
       -video_resolution=1280x720
       -
       -# slide style
       -bgcolor=magenta
       -fcolor=white
       -
       -# show image memes for this duration, must be two digits [s]
       -image_display_time=10
       -
       -# show title slides for this duration, must be two digits [s]
       -title_display_time=05
       -
       -### CONFIGURATION END
       -
       -
       -fit_img_16_9() {
       -        convert -resize "$video_resolution"\> -size "$video_resolution" "$1" \
       -                xc:"$bgcolor" +swap -gravity center -composite "$2"
       -}
       -
       -video_from_img() {
       -        ffmpeg -y \
       -                -f lavfi \
       -                -i anullsrc=r=48000 \
       -                -i "$1" \
       -                -t "00:00:${image_display_time}" \
       -                $ffmpeg_codec \
       -                "$2";
       -}
       -
       -title_slide() {
       -        img="$(basename "${1%.*}".png)"
       -        convert -size "$video_resolution" "xc:${bgcolor}" \
       -                -pointsize 48 -fill "$fgcolor" \
       -                -gravity center -draw "text 0,0 '#${img%.*}'" "$img"
       -        ffmpeg -y \
       -                -f lavfi \
       -                -i anullsrc=r=48000 \
       -                -i "$img" \
       -                -t "00:00:${title_display_time}" \
       -                $ffmpec_codec \
       -                "$2" && rm "$img"
       -}
       -
       -video_conv() {
       -        ffmpeg -y -i "$1" $ffmpeg_codec -max_muxing_queue_size 1024 "$2"
       -}
       -
       -mkdir -p "$title"
       -mkdir -p "$memecache_conv"
       -
       -# generate video from each image
       -for f in "$memecache"/*.jpg "$memecache"/*.JPG "$memecache"/*.png "$memecache"/*.PNG; do
       -        out="${memecache_conv}/$(basename "${f%.*}.webm")"
       -        if [ -e "$f" ] && [ ! -e "$out" ]; then
       -                printf 'in: %s, out: %s\n' "$f" "$out"
       -                fit_img_16_9 "$f" "${out%.*}.jpg"
       -                video_from_img "${out%.webm}.jpg" "${out}"
       -        fi
       -done
       -
       -# make animation for fallback stream
       -if [ ! -f bitreich-tv.webm ]; then
       -        title_slide bitreich-tv bitreich-tv.webm
       -fi
       -
       -
       -# make title slides for video and converted images and encode to common codec
       -for f in "$memecache"/*.mkv \
       -         "$memecache"/*.mp4 \
       -                 "$memecache"/*.webm \
       -                 "$memecache_conv"/*.webm; do
       -
       -        title_path="${title}/$(basename "${f%.*}.webm")"
       -        [ ! -e "$title_path" ] && title_slide "$f" "$title_path"
       -
       -        out="${memecache_conv}/$(basename "${f%.*}.webm")"
       -        [ ! -e "$out" ] && video_conv "$f" "$out"
       -done
       -
       -# generate random playlist from converted memes and add title slides
       -find "$memecache_conv" -maxdepth 1 -name "*.webm" -type f | \
       -        sort -R | \
       -        awk -v memecachedir="$memecache" -v titledir="$title" '
       -        function add_title(s) {
       -                sub(/memecache/, "title", s);
       -                return s
       -        }
       -        {line=$0;
       -        print "file \""add_title($line)"\"";
       -        print "file \""$0"\""}' | sed "s/\"/'/g" > "$playlist"
       -        #print "file \""$0"\""}' | sed "s/\"/'/g" |grep -v title> "$playlist"
       -
       -printf '\nstarting fallback stream\n'
       -ffmpeg -loglevel quiet \
       -        -stream_loop -1 -i bitreich-tv.webm
       -        -f webm -codec copy
       -        icecast://source:${pass}@localhost:8000/brtvfallback
       -
       -exit 0
       -
       -sleep 5
       -
       -printf '\nstarting stream\n'
       -
       -ffmpeg -f concat -safe 0 -stream_loop -1 -i "$playlist" \
       -        -f webm -cluster_size_limit 2M -cluster_time_limit 5100 -content_type video/webm \
       -        -analyzeduration 2M -probesize 2M \
       -        -codec copy \
       -        -deadline realtime -threads 8 \
       -        icecast://source:${pass}@localhost:8000/brtv