Makes the create gif shell script producer a safer mp4
This commit is contained in:
parent
abee8f0969
commit
00ddc9156b
1 changed files with 5 additions and 2 deletions
|
@ -36,9 +36,12 @@ while read file; do
|
||||||
i=$((i+1))
|
i=$((i+1))
|
||||||
done
|
done
|
||||||
|
|
||||||
|
notify-send "Generating $format from images"
|
||||||
|
|
||||||
case "$format" in
|
case "$format" in
|
||||||
"mp4")
|
"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}"
|
ffmpeg -f image2 -framerate "$framerate" -i "${tmpdir}file%03d.${extension}" "${tmpdir}out.${format}"
|
||||||
|
@ -46,4 +49,4 @@ esac
|
||||||
|
|
||||||
mv "${tmpdir}out.${format}" "$HOME/Desktop/"
|
mv "${tmpdir}out.${format}" "$HOME/Desktop/"
|
||||||
|
|
||||||
notify-send "Done"
|
notify-send "Done" "File in $HOME/Desktop/out.${format}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue