7 ms·
This is very impressive for archiving images. For a quick test, I run it over ~1.3GB JPEG pictures I had locally, the finally result is 810M, that's 66% of the
by ausjke 10y ago
This is very impressive for archiving images.
For a quick test, I run it over ~1.3GB JPEG pictures I had locally, the finally result is 810M, that's 66% of the original size, very impressive considering it's lossless. It only deals with jpg file though, no png, no iso, no zip, no any formats other than JPG.
If someone can do this over video files that will be PiedPiper comes into real life.
- zerr 10y agoOver 3D video files...
- daniel_rh 10y agoThanks for testing this! For archival purposes, be sure to check the exit code of the lepton binary after compressing each JPEG: the default parameters only support a subset of JPEGs (you need to pass -allowprogressive and -memory=2048M -threadmemory=256M to support a wider variety of large or progressive JPEG files). Lepton will not write images that it is unable to compress using the settings provided. In those cases be sure to keep the original JPEG.
- are595 10y agoHi Daniel, very cool project! I am interested in hearing your thoughts on alternative image formats / compression methods. WebP is very promising (also based on VP8) for lossless and lossy compression. Have you considered using it to compress PNGs in the same way Lepton is compressing JPGs? Odds are it wouldn't be bit-perfect though (despite being pixel-perfect). Also interested in hearing about the tradeoffs between server-side decoding and client-side. Not to keep focusing on it, but WebP has native support in Chrome and javascript decoders for everything else. I think it is a very exciting time for image formats with several promising new ones on the way (WebP, FLIF, maybe BPG but possible legal issues).
- PepeGomez 10y agoHow much better do you think it could get with JPEGs encoded with Lepton in mind?
- darksoul16 10y agoThe best I've seen is a new compressor at http://encode.ru/threads/2459-EMMA-Context-Mixing-Compressor http://encode.ru/threads/2459-EMMA-Context-Mixing-Compressor Can also recompress GIF and some RAW formats, but is much, much slower
- colechristensen 10y agoThe reason this can be done with JPEGs is the compression hasn't been updated. There are folks that have used h264 for compressing images and webp uses vp8 compression, both with much better results than JPEG. Lepton is cool because it helps make existing technology a whole lot better, but what we actually need is a better image format. You wouldn't see the same leap for videos because people have been working hard to make those great for a while while JPEG has been left to rot.
- neuronexmachina 10y agoI'd love to have something like this for archiving DVD ISOs though, where the VOBs are compressed with old-school MPEG.
- stephenr 10y agoHow does h.264/5 not fit the bill?
- IanCal 10y agoCan you run those losslessly?
- deleted 10y ago[deleted]
- thescriptkiddie 10y agohttps://trac.ffmpeg.org/wiki/Encode/H.264#LosslessH.264 https://trac.ffmpeg.org/wiki/Encode/H.264#LosslessH.264
- niftich 10y agoWhile there's a lossless H.264, it doesn't fit the implied use-case proposed in the thread. Using lossless H.264 to recompress lossy MPEG-2 would be akin to using PNG to recompress a JPEG -- silly and wasteful. Sure, it's an inexact analogy because PNG is not a block-based DCT coder, but all lossless H.264 does is set the quantizer as absurdly high as it needs to go to losslessly encode a particular frame. Staring from a compressed source, this is not a good recipe for achieving a space-saving result.
- ryanlm 10y agoSomeone just had to mention that _stupid_ show. Seriously. By empowering that show, you're just making fun of yourself and all the other programmers on here.
- Veratyr 10y agoI'm running over several terabytes and on the 5k images I've done so far (3.6GB), the compression has been 0.78x, which is damn good for lossless compression! EDIT: 17GB now (my server is kinda slow) and it's still holding at 0.78x.
- Apofis 10y agoIt seems like the real bottleneck here is binary... why can we not start supporting base 10 yet? Or even base 64? a-Z+0-9?
- odbol_ 10y agoIt's not really "lossless" if it only works with a lossy format though, right?
- mark-r 10y agoYes and no. It's not a lossless way to encode an image, but the Lepton step itself doesn't add any loss that wasn't already present in the JPEG to begin with, and it generates a smaller file overall.