mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-22 17:10:43 +03:00
ba9d78e0d2
Other files.
15 lines
491 B
Bash
Executable file
15 lines
491 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# Copyright 2021-2024 New Vector Ltd.
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
# Please see LICENSE in the repository root for full details.
|
|
|
|
set -e
|
|
echo "Converting file $1"
|
|
file=$(echo $1 | sed 's/\.[^.]*$//')
|
|
ffmpeg -i $1 -filter_complex "[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" $file-tmp.gif
|
|
echo "Converting to Gif"
|
|
gifsicle -O3 --lossy=80 -o $file.gif $file-tmp.gif
|
|
rm $file-tmp.gif
|
|
echo "Done, $file.gif has been generated"
|