Goodbye, APNG!
Anyone who has worked with the APNG format knows how inefficient it and hard it is to work with.
SteamGridDB will no longer allow uploading new APNGs and instead only allow WebP for animated assets. Previously uploaded APNGs will not be removed.
This decision was made after evaluating the state of APNGs:
- Huge file sizes.
- Due to its unpopularity, most apng demuxers have years old bugs which make it hard to work with.
- Converting to other formats and generating thumbnails for the site resulted in artifacting, dropped frames, and random frames merging with each other.
- Basically a dirty hack when using it with Steam.
Hello, Animated WebP!
- Still a dirty hack when using it with Steam but a little less so.
- Smaller file sizes (~20% smaller when comparing a lossles webp to an identical apng, even smaller if you make a lossy webp).
- More overall support.
- Can choose between a lossy or lossless output during the encoding process. (Yeah pixels are cool but have you ever had storage space?)
- Better and more available tools to work with.
To use a WebP in your client, rename the .webp file extension to .png or .jpg. Alternatively, you can use the "Download as .png" button to download it already renamed for you.
Some quick guides on converting various formats to an animated WebP using FFmpeg.
I encourage you to test with both lossless and lossy settings to see if you can find a good quality/size tradeoff.
Quick Flag Help
-loop 0
to loop forever.
-lossless 1
for lossless output.
If you want a lossy output, use -lossless 0
and play around with -compression_level
and -qscale
to find good results.
Refer to the ffmpeg docs for more.
Video File Source
$ ffmpeg -i input.mp4 -loop 0 output.webp
Separate File Per Frame
Images named frame001.png, frame002.png, frame003.png, etc. Remember to set -framerate
to your desired framerate.
$ ffmpeg -framerate 1/15 -i frame%03d.png -loop 0 output.webp