Generalize deface filter paths. - annna - Annna the nice friendly bot.
 (HTM) git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
       ---
 (DIR) commit 3ffe23be2fcfaf14cb6a1736caffc5d6e9490c53
 (DIR) parent dd57a477f70af8279efc5ae0cc2107bccf719011
 (HTM) Author: Annna Robert-Houdin <annna@bitreich.org>
       Date:   Sun, 31 Jul 2022 13:45:37 +0200
       
       Generalize deface filter paths.
       
       Diffstat:
         M ffmpeg-effect                       |       9 +++++----
       
       1 file changed, 5 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/ffmpeg-effect b/ffmpeg-effect
       @@ -68,14 +68,15 @@ replace_face() {
                output="$3"
        
                ext="$(printf '%s' "$input" | awk -F. '{print $NF}')"
       +        tmp=/tmp/replace_face_$$.$ext
        
       -        /home/annna/.local/bin/deface "$input" --replacewith img \
       -                --replaceimg "$face_replacement" -o "/tmp/replace_face_$$.$ext"
       +        $HOME/.local/bin/deface "$input" --replacewith img \
       +                --replaceimg "$face_replacement" -o "$tmp"
                if has_audio "$input";
                then
       -                replace_audio "$input" "/tmp/replace_face_$$.$ext" "$output"
       +                replace_audio "$input" "$tmp" "$output"
                else
       -                mv "/tmp/replace_face_$$.$ext" "$output"
       +                mv "$tmp" "$output"
                fi
        }