Jump to content
LaunchBox Community Forums

Compression


Lahrs

Recommended Posts

I figured best place for media question. I understand there is no perfect solution, you compress, you lose something. I have .png files in particular that are 10mb each. That doesn't help with storage or quickness in Launchbox (they look great though in Big Box). Jpg looks horrible when blown up on the big screen, even at best quality. Is there a middle ground, or should I look for a better program for jpg compression? I currently use Irfanview, but I've had that for more than 20 years, and I wouldn't be surprised if there was something better now.

[EDIT] The downgrade in jpg picture quality is noticeable on my 83" TV. Everyday use on my 1080 monitor is not much of an issue.

Edited by Lahrs
Link to comment
Share on other sites

10 hours ago, Lahrs said:

I figured best place for media question. I understand there is no perfect solution, you compress, you lose something. I have .png files in particular that are 10mb each. That doesn't help with storage or quickness in Launchbox (they look great though in Big Box). Jpg looks horrible when blown up on the big screen, even at best quality. Is there a middle ground, or should I look for a better program for jpg compression? I currently use Irfanview, but I've had that for more than 20 years, and I wouldn't be surprised if there was something better now.

[EDIT] The downgrade in jpg picture quality is noticeable on my 83" TV. Everyday use on my 1080 monitor is not much of an issue.

I remember Irfanview!  But it's been a   l  o  n  g   time since I've used it.

I now use ffmpeg.  It's command line based, but it's also what many (most?) image compression programs use behind-the-scenes. 

For a general just-reduce-the-file-size, use the command

ffmpeg.exe -i "path/to/your/Original.png" -q:v 1 "path/to/your/New.jpg"

This will keep the original image dimensions.  But you're also converting to jpg.  Which isn't necessarily a bad thing. You do lose transparency.  But with a hue-jass 10MB image, it's probably a background image, so doesn't matter.  You can change the 1 to different values (higher the number, the smaller the output file).

Here's some sample numbers:
Original:  17,497 KB (17 BM)
-q:v 1          2,557 KB
-q:v 5          1,369 KB
-q:v 10           967 KB
-q:v 20           771 KB

(using 5, 10, or 20 is pretty extreme though)

 

Another option that keeps the quality of the png is to just reduce the dimensions.  The above image (17 MB) has oddball dimensions, but you'll get the idea...

Original dimensions are 3569 x 5724.  Reduce that to half scale (1784 x 2862) and the file size is 7.4 MB.  For 1/2 scale, use this:

ffmpeg.exe -i "path/to/your/Original.png" -vf scale="iw/2:ih/2" "path/to/your/New.png"

For a custom scale, use:  -vf scale=W:H  (changing W and H to your desired width and height)

 

ffmpeg can do things with videos too.  i.e. I've taken all my game video clips and made them all 20 seconds long (because I don't stare at them any longer than that).

The issue for most people is that ffmpeg doesn't have a GUI.  But a simple batch file can handle all you batch conversion needs. :) 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...