From 00ddc9156be06a9af5b4dba16830332333655dd9 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Wed, 8 May 2019 11:16:05 +0100 Subject: [PATCH] Makes the create gif shell script producer a safer mp4 --- bin/createGif | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/createGif b/bin/createGif index 678101a4..24fbaf80 100755 --- a/bin/createGif +++ b/bin/createGif @@ -36,9 +36,12 @@ while read file; do i=$((i+1)) done +notify-send "Generating $format from images" + case "$format" in "mp4") - ffmpeg -f image2 -framerate "$framerate" -i "${tmpdir}file%03d.${extension}" -crf 0 "${tmpdir}out.${format}" + # Not entierly sure what all of these mean but they make it work in most browsers + ffmpeg -f image2 -framerate "$framerate" -i "${tmpdir}file%03d.${extension}" -pix_fmt yuv420p -vcodec libx264 -y -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" "${tmpdir}out.${format}" ;; *) ffmpeg -f image2 -framerate "$framerate" -i "${tmpdir}file%03d.${extension}" "${tmpdir}out.${format}" @@ -46,4 +49,4 @@ esac mv "${tmpdir}out.${format}" "$HOME/Desktop/" -notify-send "Done" +notify-send "Done" "File in $HOME/Desktop/out.${format}"