
rm output.fmf output.mkv
fuse -m 128 aondemoshiru.trd --movie-start output.fmf --rate 1
# --rate 1
fmfconv output.fmf | ffmpeg -y -i - -vf palettegen palette.png
fmfconv --raw-sound --frate raw output.fmf | ffmpeg -i - -i palette.png -filter_complex "[0:v][1:v] paletteuse" -c:a flac -c:v zmbv -compression_level:a 12 output.mkv

exit 0 # do not do all the steps

# scale=960:720:flags=neighbor [x]; [x][1:v] paletteuse
# --frate raw

# make also video suitable for telegram messanger
# ffmpeg -i output.mkv -vf "scale=iw*2:-1:flags=neighbor:interl=0" -c:v libx264 -vprofile baseline -preset slow -pix_fmt yuv420p -b:v 800k -maxrate 1000k -bufsize 1000k -crf 26 -r 25 another_invitation.mp4

# crop video
ffmpeg -ss 29 -i output.mkv -vf "crop=220:41:50:85" -c:a flac -c:v zmbv -compression_level:a 12 output_cropped.mkv

ffmpeg -i output_cropped_50.mkv -vf eq=saturation=2 -c:a flac -c:v zmbv -compression_level:a 12 -r 25 output_cropped.mkv
ffmpeg -ss 35.663 -t 5.351 -i output_cropped.mkv -c:a flac -c:v zmbv -compression_level:a 12 output_logo.mkv
ffmpeg -ss 12.280 -t 3.159 -i output_cropped.mkv -c:a flac -c:v zmbv -compression_level:a 12 output_starting_jumper.mkv

echo ready
