Adding #adc-wat tag. - annna - Annna the nice friendly bot.
HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
---
DIR commit cd68996ce034764124e4133103137e34c9d3df63
DIR parent 5167284a3de216fe51ff9143dec89627e04d71d6
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sun, 31 Jul 2022 13:11:59 +0200
Adding #adc-wat tag.
Diffstat:
M annna-message-common | 1 +
M ffmpeg-effect | 19 +++++++++++++++++++
M modules/hashtags/hashtags.txt | 1 +
3 files changed, 21 insertions(+), 0 deletions(-)
---
DIR diff --git a/annna-message-common b/annna-message-common
@@ -872,6 +872,7 @@ case "${text}" in
"${botname}, please thin #"*|\
"${botname}, please torture #"*|\
"${botname}, please trumpapprove #"*|\
+"${botname}, please wat #"*|\
"${botname}, please widen #"*|\
"${botname}, please ww1 #"*|\
"${botname}, please yellow #"*)
DIR diff --git a/ffmpeg-effect b/ffmpeg-effect
@@ -62,6 +62,23 @@ mix_audio_video() {
fi
}
+replace_face() {
+ face_replacement="$1"
+ input="$2"
+ output="$3"
+
+ ext="$(printf '%s' "$input" | awk -F. '{print $NF}')"
+
+ /home/annna/.local/bin/deface "$input" --replacewith img \
+ --replaceimg "$face_replacement" -o "/tmp/replace_face_$$.$ext"
+ if has_audio "$input";
+ then
+ replace_audio "$input" "/tmp/replace_face_$$.$ext" "$output"
+ else
+ mv "/tmp/replace_face_$$.$ext" "$output"
+ fi
+}
+
process_filter() {
# extend duration if less than a second or image
dur="$($ffprobe_common -show_entries format=duration "$2")"
@@ -144,6 +161,8 @@ process_filter() {
side_by_side "${mediadir}/clockworkorange.mkv" "$2" "$3";;
trumpapprove)
mix_audio "${mediadir}/trump-approves.opus" "$2" "$3";;
+ wat)
+ replace_face "${mediadir}/wat.png" "$2" "$3";;
wide|widen)
$ffmpeg_common -i "$2" \
-vf "scale=iw*4:ih,crop=iw/4:ih:iw/4:ih,setsar=1" \
DIR diff --git a/modules/hashtags/hashtags.txt b/modules/hashtags/hashtags.txt
@@ -252,6 +252,7 @@
#adc-snow-research gopher://bitreich.org/9/memecache/adc-snow-research.mp4
#adc-team gopher://bitreich.org/I/memecache/adc-team.png
#adc-thumbs gopher://bitreich.org/I/memecache/adc-thumbs.JPG
+#adc-wat gopher://bitreich.org/9/memecache/adc-wat.mkv
#adc-wipe gopher://bitreich.org/9/memecache/adc-wipe.mkv
#adc-work gopher://bitreich.org/9/memecache/adc-work.mkv
#address gopher://bitreich.org/I/memecache/address.png