Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Best/Highest compression format for Debian

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
4joeyirosh1
Posts: 157
Joined: 2016-09-11 18:04
Been thanked: 3 times

Best/Highest compression format for Debian

#1 Post by 4joeyirosh1 »

Hi!I have Debian Bullseye 64 bit on my machine.I have numerous folders with many life photos and I want to store them on cloud like Google Drive for redundancy.

I have been trying to achieve as maximum compression as possible to reduce space utilization on Google Drive but so far the compression gains have been negligible.For instance I have a folder with 181.7 MB of family photos and if I use the best compression method I know so far ie 7z it compresses to a 7z file that's 181.6 MB with is hardy any compression.Is there a better compression scheme that's lossless or negligible lossy scheme that can achieve a compressed folder of much lower size?

Thanks.

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Best/Highest compression format for Debian

#2 Post by sunrat »

If the photos are jpeg they will already be highly compressed. You could try using jpegoptim for a little more size reduction but it won't be much.
See https://net2.com/how-to-compress-jpeg-o ... -terminal/
Both jpegoptim and optipng are available in the repo.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Best/Highest compression format for Debian

#3 Post by stevepusser »

HEIF may be able to compress the images down somewhat without losing quality....https://flat-icons.com/heif-vs-jpeg/
MX Linux packager and developer

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Best/Highest compression format for Debian

#4 Post by Segfault »

HEIF may be able to lossless compression, but will these images be smaller then? In lossy mode the images may be smaller, but converting from one lossy mode to another while achieving a few percent smaller files seems not feasible.
Heck, reminds me some fella from Linuxforums who converted his old MP3 files into AAC and bragged his files are higher quality now ... Sic!

User avatar
canci
Global Moderator
Global Moderator
Posts: 2502
Joined: 2006-09-24 11:28
Has thanked: 136 times
Been thanked: 136 times

Re: Best/Highest compression format for Debian

#5 Post by canci »

webp will also yield much better compression results than jpeg.
Gimp and many other tools that are in the repos can produce webp.
Image Stable / Asus VivoBook X421DA / AMD Ryzen 7 3700U / Radeon Vega Mobile Gfx (Picasso) / 8 GB RAM / 512GB NVMe

READ THIS:

* How to Post a Thread Here
* Other Tips and Great Resources

User avatar
ruwolf
Posts: 623
Joined: 2008-02-18 05:04
Location: Banovce nad Bebravou
Has thanked: 35 times
Been thanked: 26 times

Re: Best/Highest compression format for Debian

#6 Post by ruwolf »

You can try AVIF, too.
It is allegedly a bit better in compresion size (but worse in compresion speed) than HEIF...

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Best/Highest compression format for Debian

#7 Post by Segfault »

The correct solution for running out of storage is more storage. Period. Amen. And it better not be Google, they may lock you out any time when you happen to violate their rules. One prerequisite for a quality service is you pay for it.

Ushavilash
Posts: 12
Joined: 2024-02-10 08:56

Re: Best/Highest compression format for Debian

#8 Post by Ushavilash »

The best compression method for such tasks in Debian, especially for negligible lossy or lossless compression, is using the WebP format.
WebP offers a fine balance between compression efficiency and image quality preservation. Tools like cwebp can convert images to WebP, allowing for adjustable quality levels to manage the trade-off between file size and visual fidelity.
While 7z offers excellent compression for many data types, its effectiveness on JPEG images is limited due to JPEG's inherent compression. For lossless needs,
You can converting images to PNG and using pngcrush or optipng for further optimization.
For negligible lossy compression using WebP, the following command can be used to convert a JPEG image to WebP with a specified quality setting (e.g., 90, which is high quality):

Code: Select all

 cwebp -q 90 input.jpg -o output.webp
For lossless compression with

Code: Select all

WebP: cwebp -lossless input.png -o output.webp
or you can use any third party application such as image compressor to optimize your bulk images lossy or lossless compression.
Last edited by Ushavilash on 2024-03-01 13:01, edited 2 times in total.

CwF
Global Moderator
Global Moderator
Posts: 2638
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 192 times

Re: Best/Highest compression format for Debian

#9 Post by CwF »

I would rather you didn't do that.

Ushavilash
Posts: 12
Joined: 2024-02-10 08:56

Re: Best/Highest compression format for Debian

#10 Post by Ushavilash »

CwF wrote: 2024-02-23 06:46 I would rather you didn't do that.
I'm sorry but I don't intend to do so I was simply replying.

debianpwr
Posts: 26
Joined: 2014-11-21 13:38
Has thanked: 2 times

Re: Best/Highest compression format for Debian

#11 Post by debianpwr »

Ushavilash wrote: 2024-02-23 06:23 The best compression method for such tasks in Debian, especially for negligible lossy or lossless compression, is using the WebP format.
WebP offers a fine balance between compression efficiency and image quality preservation. Tools like cwebp can convert images to WebP, allowing for adjustable quality levels to manage the trade-off between file size and visual fidelity.
While 7z offers excellent compression for many data types, its effectiveness on JPEG images is limited due to JPEG's inherent compression. For lossless needs,
You can converting images to PNG and using pngcrush or optipng for further optimization.
For negligible lossy compression using WebP, the following command can be used to convert a JPEG image to WebP with a specified quality setting (e.g., 90, which is high quality):

Code: Select all

 cwebp -q 90 input.jpg -o output.webp
For lossless compression with

Code: Select all

WebP: cwebp -lossless input.png -o output.webp
or you can use any third party application such as image compressor to optimize you bulk images lossy or lossless compression.
Thank you, Ushavilash,

I'm eager to try this approach with my photo collection to optimize storage before uploading to Google Drive.

How does the quality of WebP images at a 90 setting compare to original JPEGs, especially for detailed photos?

Appreciate the tips and will also explore recommended third-party tools for bulk processing.

Ushavilash
Posts: 12
Joined: 2024-02-10 08:56

Re: Best/Highest compression format for Debian

#12 Post by Ushavilash »

Hey @debianpwr thanks and WebP images at a quality setting of 90 generally offer good compression while maintaining visual quality, even for detailed photos. You can expect a reasonable balance between file size reduction and image clarity.

Post Reply