Make a high-quality GIF in Cinelerra GG.
I try to adapt this FFMPEG code to cinelerra GG.
Using the terminal and converting a video to GIF is easy.
But I try to use Cinelerra GG as it has FFMPEG options.
the source of the original code is here.
Do you think it is possible?
#!/bin/sh palette="/tmp/palette.png" filters="fps=15,scale=320flags=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
I did not see the pallette.png source in the url you quoted.
It was part of the script
is below Color mapping and dithering > USAGE.
I will look for more information in the ffmpeg manual. 😀
A little more discovery here. The problem with a few of the ffmpeg filters is the inability of Cinelerra to input a filename for the output. If the output file was a parameter, for example like "stats_mode=single" or in this case "output_file=/tmp/palette.png" then Cinelerra could handle it. That is the problem with both palettegen and paletteuse. I could get palettegen to work in "single" mode because it does not have to write to an unknown output file as you can see in the attached png file.
However, paletteuse requires not only an output.gif filename, but also the input palette.png file and there is no way to specify them as is done on the ffmpeg command line version.
As an example, the ffmpeg filters "metadata" and "ametadata" have "file" parameters. As in:
I tried other video editors same result.
this explains more.
You could easily finish the posted steps faster than you could click through Photoshop, once you’re familiar with the steps. Especially if they’re turned into a simple script file.
That aside, creating optimized GIF is a two-pass procedure. The first pass has to analyze what colors were most frequently used in the entire video, which can’t be known until the video is exported. Then it has to be reprocessed to convert colors to the optimized palette. Remember that Photoshop has access to something that Shotcut doesn’t — the finished video for analysis. So, it’s not really a Shotcut problem. It’s the procedural nature of GIF requiring two steps. Perhaps a second pass could be written into Shotcut, but that’s very custom code.
I totally sympathize with your goal of simpler export. GIF is just a bit unique.
I found more and GIF need "two pass" for better quality.
Using the script is easier. :/