URI: 
       Clean up script and add diagnostic output during encoding - bitreich-tv - Meme TV encoding and streaming
  HTML git clone git://bitreich.org/bitreich-tv git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/bitreich-tv
   DIR Log
   DIR Files
   DIR Refs
   DIR Tags
   DIR LICENSE
       ---
   DIR commit beded2279cdfa35a7d896bfa5729b2dbddec92c6
   DIR parent 9955fec4d21435eae1aa98c8c7078932d192df5c
  HTML Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Wed, 12 Aug 2020 16:09:23 +0200
       
       Clean up script and add diagnostic output during encoding
       
       Diffstat:
         M brtv-start.sh                       |      13 +++++--------
       
       1 file changed, 5 insertions(+), 8 deletions(-)
       ---
   DIR diff --git a/brtv-start.sh b/brtv-start.sh
       @@ -59,6 +59,7 @@ fit_img_16_9() {
        }
        
        video_from_img() {
       +        printf 'image to video %s -> %s\n' "$1" "$2"
                ffmpeg -y \
                        -f lavfi \
                        -i anullsrc=r=48000 \
       @@ -70,7 +71,7 @@ video_from_img() {
        
        title_slide() {
                img="$(basename "${1%.*}".png)"
       -        #echo "title_slide $1 -> $img"
       +        printf 'title_slide %s -> %s\n' "$1" "$img"
                convert -size "$video_resolution" "xc:${bgcolor}" \
                        -pointsize 48 -fill "$fgcolor" \
                        -gravity center -draw "text 0,0 '#${img%.*}'" "$img"
       @@ -84,7 +85,8 @@ title_slide() {
        }
        
        video_conv() {
       -        printf 'encode %s -> %s\n' "$1" "$2"; ffmpeg -y -i "$1" $ffmpeg_codec -max_muxing_queue_size 1024 "$2"
       +        printf 'encode %s -> %s\n' "$1" "$2"
       +        ffmpeg -y -i "$1" $ffmpeg_codec -max_muxing_queue_size 1024 "$2"
        }
        
        mkdir -p "$title"
       @@ -136,7 +138,6 @@ find "$memecache_conv" -maxdepth 1 -name "*.webm" -type f | \
                {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 \
       @@ -148,19 +149,15 @@ find "$memecache_conv" -maxdepth 1 -name "*.webm" -type f | \
        # encode daily video file
        ffmpeg -n -f concat -safe 0 -i "$playlist" \
                -f "${video_ext}" -cluster_size_limit 2M -cluster_time_limit 5100 -content_type video/webm \
       -        -analyzeduration 2M -probesize 2M \
                -codec copy \
       -        -deadline realtime -threads 8 \
                -to "$out_video_duration" 
                "$video_out"
        
       -exit 0
       -
        printf '\nstarting stream\n'
        
        ffmpeg -f concat -safe 0 -stream_loop -1 -i "$video_out" \
                -f webm -cluster_size_limit 2M -cluster_time_limit 5100 -content_type video/webm \
                -analyzeduration 2M -probesize 2M \
                -codec copy \
       -        -deadline realtime -threads 8 \
       +        -deadline realtime -threads 4 \
                icecast://source:${pass}@adamsgaard.dk:3232/brtv