Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Linguica

Horrible ffmpeg GIF palette WAD for some reason

Recommended Posts

There is a program called ffmpeg that can convert video files from one format to another. One format it can output is animated GIFs.

 

ffmpeg -i doom3.mp4 doom3.gif

gPnALbW.gif

 

When used with the simplest default options, ffmpeg uses a predefined GIF palette and just stipples the image into these colors:

 

zepz0n4.png

 

Various sites do this - imgur does for sure, I imagine many others as well. If you upload a video of Doom gameplay and have it converted to GIF the above palette will be applied to the video. So I figured I could make a pre-palette-shifted Doom WAD, so when ffmpeg converts it to a GIF, all the colors are already there and it doesn't have to do anything!

 

igt3xuh.png

 

1zLw6aJ.png

 

326m7hU.png ➡️ ERjisch.png

 

Yeah, please do not use this.

 

ffmpeg playpal.zip

Share this post


Link to post

That is not.. very good looking. How about instead "forcing" ffmpeg into using the Doom palette? This way we'd get perfect Doom anim gifs.

Share this post


Link to post

I believe it's not really possible to do "ordered" dithering with an arbitrary palette like DOOM's.  Hence why ffmpeg uses a carefully crafted palette which can support ordered dithering.

 

Ordered dithering looks a lot better for animated gifs or video than error-diffusion kinds of dithering (like Floyd-Steinberg).  That's because each frame is slightly different, so the errors get diffused differently, and it spreads over the whole image -- a single pixel difference in top left can affect everything else.  This makes animated gifs or video look much "noisier" or "busier" than ordered dithering.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×