I'm attempting to get a digital indexed palette for my own work, roughly mirroring that used in Akira (1988). The movie had a famed 327-color palette, fifty of which were created for that specific film (which was not a small thing in the days of hand-drawn and painted cells).

Normally, this would be a basic ffmpeg command...

ffmpeg -i AkiraMovie.mp4 -vf "palettegen=maxcolors=327" palette.png 

Except that ffmpeg, expecting a indexed palette for an indexed image (and not a literal color palette), will only extract the first 256 colors and leave the rest of them black. This is warned of in the documentation. This is likely something involving the internal representation of the color index being a byte... but then, I haven't dug through the code for palettegen yet.

It's a shame too, because that would have taken a little time but would be incredibly clean. I would have the 327 best-guess colors based on the medians.

Is there another way to extract a large-size color palette from a digital video?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.