add torture effect - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 36407d15b8cddcd5f9bb038749da3a0b9127a717 | |
parent 3c6e1575b23d4ce97d1abd225b1f17ec6db88d46 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sun, 8 Aug 2021 09:43:38 +0200 | |
add torture effect | |
Signed-off-by: Annna Robert-Houdin <[email protected]> | |
Diffstat: | |
M annna-message-common | 1 + | |
M ffmpeg-effect | 13 +++++++++++++ | |
2 files changed, 14 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/annna-message-common b/annna-message-common | |
@@ -715,6 +715,7 @@ case "${text}" in | |
"${botname}, please loop #"*|\ | |
"${botname}, please bounce #"*|\ | |
"${botname}, please sexify #"*|\ | |
+"${botname}, please torture #"*|\ | |
"${botname}, please banjo #"*|\ | |
"${botname}, please concatenate #"*|\ | |
"${botname}, please ww1 #"*|\ | |
diff --git a/ffmpeg-effect b/ffmpeg-effect | |
@@ -21,6 +21,17 @@ replace_audio() { | |
"$3" </dev/null | |
} | |
+side_by_side() { | |
+ $ffmpeg_common -i "$1" -i "$2" \ | |
+ -filter_complex " | |
+ amix=inputs=2:duration=shortest; \ | |
+ [1:v][0:v] scale2ref=oh*mdar:h=in_h:[v1][v0]; | |
+ [v0][v1] hstack=shortest=1, | |
+ scale='2*trunc(iw/2)':'2*trunc(ih/2)'" \ | |
+ -shortest \ | |
+ "$3" </dev/null | |
+} | |
+ | |
mix_audio() { | |
if has_audio "$2"; then | |
$ffmpeg_common -i "$1" -i "$2" \ | |
@@ -102,6 +113,8 @@ process_filter() { | |
mix_audio "${mediadir}/elder_scrolls.mp3" "$2" "$3";; | |
mow) | |
mix_audio "${mediadir}/lawn-mower.mp3" "$2" "$3";; | |
+ torture) | |
+ side_by_side "${mediadir}/clockworkorange.mkv" "$2" "$… | |
sendtohell|amsterdamify) | |
mix_audio_video "${mediadir}/hell.mkv" "$2" "$3" 1920 … | |
*) usage;; |