Introduction
Introduction Statistics Contact Development Disclaimer Help
ffmpeg-effect: reuse code where appropriate - annna - Annna the nice friendly b…
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 131094fe55b30a847c07fd53502ed73b2d1ddb2d
parent add54ddd2d5bd41f9f35f56043dd561d6f8248f4
Author: Anders Damsgaard <[email protected]>
Date: Sat, 12 Jun 2021 20:17:10 +0200
ffmpeg-effect: reuse code where appropriate
Signed-off-by: Annna Robert-Houdin <[email protected]>
Diffstat:
M ffmpeg-effect | 34 +++++++++++++++++------------…
1 file changed, 19 insertions(+), 15 deletions(-)
---
diff --git a/ffmpeg-effect b/ffmpeg-effect
@@ -15,6 +15,22 @@ usage() {
exit 1
}
+mix_audio() {
+ $ffmpeg_common -i "$2" -i "$1" \
+ -filter_complex "amerge=inputs=2" \
+ "$3" </dev/null
+}
+
+mix_audio_video() {
+ $ffmpeg_common -i "$2" \
+ -i "$1" \
+ -filter_complex "
+ [0:v] scale=w=${4:-1920}:h=${5:-1080}, pad=w=${4:-1920…
+ [video0][1:v] blend=all_mode=average:shortest=1;
+ amix=inputs=2:duration=shortest:weights=3 2" \
+ "$3" </dev/null
+}
+
process_filter() {
case "$1" in
wide|widen)
@@ -52,23 +68,11 @@ process_filter() {
-filter_complex "[0]reverse[r];[0][r]concat,lo…
"$3" </dev/null;;
sexify)
- $ffmpeg_common -i "$2" \
- -i "${mediadir}/careless_whisper.mp3" \
- -filter_complex "amerge=inputs=2" \
- "$3" </dev/null;;
+ mix_audio "${mediadir}/careless_whisper.mp3" "$2" "$3"…
scrollify)
- $ffmpeg_common -i "$2" \
- -i "${mediadir}/elder_scrolls.mp3" \
- -filter_complex "amerge=inputs=2" \
- "$3" </dev/null;;
+ mix_audio "${mediadir}/elder_scrolls.mp3" "$2" "$3";;
sendtohell|amsterdamify)
- $ffmpeg_common -i "$2" \
- -i "${mediadir}/hell.mkv" \
- -filter_complex "
- [0:v] scale=w=1920:h=1080, pad=w=1920:…
- [video0][1:v] blend=all_mode=average:s…
- amix=inputs=2:duration=shortest:weight…
- "$3" </dev/null;;
+ mix_audio_video "${mediadir}/hell.mkv" "$2" "$3" 1920 …
*) usage;;
esac
}
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.