Add logo to title slides - 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 178229acd2a49dc65dbdb6bebfc1fa753eca0eec DIR parent d4c0a183355e46aa879ba602b91a5a624e9b9347 HTML Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Mon, 17 Aug 2020 01:23:32 +0200 Add logo to title slides I had to change the video codec because of transparency-related libvpx errors(?) Diffstat: M bin/brtv-generate-title-slides.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) --- DIR diff --git a/bin/brtv-generate-title-slides.sh b/bin/brtv-generate-title-slides.sh @@ -11,7 +11,7 @@ title="/var/gopher/title" # ffmpeg flags for generated videos video_ext="webm" -ffmpeg_codec="-loglevel error -acodec libopus -b:a 96K -vcodec libvpx -b:v 64k -f webm -vf scale=1280:-1 -r 30 -ac 2" +ffmpeg_codec="-loglevel error -acodec libopus -b:a 96K -f webm -vf scale=1280:-1 -r 30 -ac 2" # target video resolution video_resolution=1280x720 @@ -23,15 +23,20 @@ fgcolor=white # show title slides for this duration [s] title_display_time=5 +# logo to draw in background +logo="bitreichtv.vtv" + ### CONFIGURATION END temp="$(mktemp).png" title_slide() { - convert -size "$video_resolution" "xc:${bgcolor}" \ - -pointsize 48 -fill "$fgcolor" \ - -gravity center -draw "text 0,0 '${1}'" "$temp" + convert -font Courier -size "$video_resolution" "xc:${bgcolor}" \ + -gravity center -pointsize 32 \ + -draw "text 0,0 '$(cat "$logo")'" \ + -gravity center -pointsize 48 -fill "xc:${fgcolor}" \ + -draw "text -50,140 '${1}'" "$temp" ffmpeg -y \ -f lavfi \ -i anullsrc=r=48000 \