Introduction
Introduction Statistics Contact Development Disclaimer Help
ffmpeg-effect: support images by converting them to video first - annna - Annna…
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 7f21c3fc6cece6371154259e3ecf4d1def0ac1df
parent 67da7afdc7b272b136032f637f425e6546b1844e
Author: Josuah Demangeon <[email protected]>
Date: Wed, 1 Sep 2021 15:08:40 +0200
ffmpeg-effect: support images by converting them to video first
Signed-off-by: Annna Robert-Houdin <[email protected]>
Diffstat:
M ffmpeg-effect | 10 ++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/ffmpeg-effect b/ffmpeg-effect
@@ -3,6 +3,7 @@
# requirements: ffmpeg, ffprobe.
ffmpeg_common="${FFMPEG_EFFECT_COMMON:-ffmpeg -n -loglevel error}"
+ffprobe_common="${FFMPEG_EFFECT_FFPROBE:-ffprobe -v error -of default=noprint_…
mediadir="${FFMPEG_EFFECT_MEDIA_DIR:-/home/annna/bin/modules/filter-media}"
repeats=5
@@ -62,6 +63,15 @@ mix_audio_video() {
}
process_filter() {
+ # extend duration if less than a second or image
+ dur="$($ffprobe_common -show_entries format=duration "$2")"
+ if test "$dur" = "N/A" || test "${dur%.*}" -lt 1; then
+ tmp=/tmp/ffmpeg-effect.$$.mkv
+ trap 'rm -f "$tmp"' EXIT INT TERM HUP
+ $ffmpeg_common -loop 1 -to 10 -i "$2" "$tmp"
+ set -- $1 "$tmp" $3
+ fi
+
case "$1" in
banjo)
replace_audio "${mediadir}/banjo.mp3" "$2" "$3";;
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.