I'm new to shell scripting, I'm using the following shell script to convert mp4 into gif:
palette="/tmp/palette.png"
filters="fps=12,scale=256:-1:flags=lanczos"
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
how do I use the reverse option (like this sample here) in the filter section in this shell script:
ffmpeg -i input.mp4 -filter_complex "[0]scale=320:-1,reverse[r];[0][r]concat=n=2:v=1:a=0,fps=10,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gif