tAdd logo to title slides - bitreich-tv - meme tv encoding and streaming | |
git clone git://src.adamsgaard.dk/bitreich-tv | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 178229acd2a49dc65dbdb6bebfc1fa753eca0eec | |
parent d4c0a183355e46aa879ba602b91a5a624e9b9347 | |
Author: Anders Damsgaard <[email protected]> | |
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(-) | |
--- | |
diff --git a/bin/brtv-generate-title-slides.sh b/bin/brtv-generate-title-slides… | |
t@@ -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… | |
+ffmpeg_codec="-loglevel error -acodec libopus -b:a 96K -f webm -vf scale=1280:… | |
# target video resolution | |
video_resolution=1280x720 | |
t@@ -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 \ |