Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/prog/ challenge - Compressing Visual Novels

Name: Cudder !cXCudderUE 2016-05-14 17:53

What makes VN companies come up with proprietary image/video/audio formats that compress worse than standard ones? Here's an example:

Proprietary format, original: 871KB
Proprietary format, recompressed[1]: 822KB
PNG: 676KB
Optimised PNG: 674KB
JPG (high): 221KB
JPG (medium): 125KB
JPG (low, artifacts start becoming obvious): 86.7KB

So they could be several times smaller while looking almost the same, and that's not even getting into things like difference encoding since the bulk of them are almost the same images with slight differences.

Here's the challenge: find an existing VN, and write a little utility to compress it to 1/2th its original size or less while maintaining all the content. You have until the end of the year.

[1] I RE'd the format and wrote a compressor for it, which performed better than the original while decompressing to the exact same data.

Name: Cudder !cXCudderUE 2016-10-10 17:47

Total images original size 1.05GB
After replacing duplicates with "symlinks" 534MB

This is ridiculously low-hanging fruit. It's not even hanging, it's sitting on the ground. A 5-minute postprocessor could save your disk space by up to 50%!

Next strategy I'm going to try: differencing successive images. There are many sequences of images which are basically the same except for some changes in things like facial expression. It's not even at the complexity of an H.264 encoder (or perhaps that would be an エッチ.264 encoder...)

Any bets on the resulting filesize?

Name: Cudder !cXCudderUE 2016-10-10 18:30

I decided to just throw them into ffmpeg's H.264 encoder at default settings to see what it could do, and... 32MB!!! HOLY FUCKING SHIT!!! THIRTY TWO TIMES SMALLER!!!

The resulting file even plays in any media player, since it's just a video (slideshow). Every frame looks identical to the original images.

1GB+ to 32MB. I knew they were bloated, but didn't think it would be that big of a difference. H.264 is amazing.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List