ffmpeg-effect: fix conversion of images to video - annna - Annna the nice frien… | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 0dfb38734313976385a7e77abfc441c622e08554 | |
parent 4a7ed82162715fdd02ddd5f2588da3f4cf9686b5 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 21 Oct 2022 21:18:22 +0200 | |
ffmpeg-effect: fix conversion of images to video | |
Signed-off-by: Annna Robert-Houdin <[email protected]> | |
Diffstat: | |
M ffmpeg-effect | 10 +++++----- | |
1 file changed, 5 insertions(+), 5 deletions(-) | |
--- | |
diff --git a/ffmpeg-effect b/ffmpeg-effect | |
@@ -98,7 +98,7 @@ replace_face() { | |
} | |
process_filter() { | |
- # Filters which do not require image2mkv. | |
+ # Filters which do not require image2mkv | |
case "$1" in | |
wat) | |
replace_face "${mediadir}/wat.png" "$2" "$3" | |
@@ -115,12 +115,12 @@ process_filter() { | |
esac | |
# 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 | |
+ if is_image "$2" | |
+ then | |
tmp=/tmp/ffmpeg-effect.$$.mkv | |
trap 'rm -f "$tmp"' EXIT INT TERM HUP | |
- $ffmpeg_common -stream_loop 1 -to 20 -i "$2" -vf "pad=ceil(iw/… | |
- set -- $1 "$tmp" $3 | |
+ $ffmpeg_common -loop 1 -i "$2" -t 20 -vf "pad=ceil(iw/2)*2:cei… | |
+ set -- "$1" "$tmp" "$3" | |
fi | |
case "$1" in |