Jump to content


Photo

Batch compaction of media files - benefits and tools

media shareable cd website

  • Please log in to reply
2 replies to this topic

#1 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 5538 posts

Posted 05 January 2017 - 03:56 PM

While this is not especially a RootsMagic topic, compacting or compressing RootsMagic media files is of potential benefit to some RootsMagic outcomes:

  • Shareable CD/DVD: fitting a database with media within the respective 700MB/4GB capacities of a CD-R or DVD-R
  • MyRootsMagic (Publish online): upload succeeding within the 200MB limit; faster display when browsing website
  • Media Gallery: faster creation of thumbnails 

And more generally:

  • Dropbox et al: less consumption of the quota for storage space, faster syncing
  • Solid State Drives: less consumption of this expensive and restrictive storage, some Windows tablets having but 16GB free out of the box
  • Email: mail servers restrict a message and attachments to the 10-20MB range so compaction can make a difference for the number of media items in one message

There are many tools available to compress and convert files, especially image files. I wanted something that would batch compress all files below a root folder, including in sub-folders and do so losslessly, i.e., without affecting the quality of the image. I chose to try FileOptimizer which is an open-source utility that combines many other open-source compressors and optimizers for many different file types, not just image files. I'm very happy with the results and will relate three trials I did with it.

 

#1 A ShareableCD Pictures folder: From within the FileOptimizer graphical user interface (GUI), I added all the files using its browser. This folder did not have a size issue but contained a (representative) example of the types of media files used by a play database.

Original size: 362MB. After FileOptimizer: 175MB. Saving: 52%

 

#2 A FamilyTree Maker Media folder: This folder was populated by FTM and Ancestry TreeSync and the database imported to RootsMagic so it uses the same folder. Populated mostly with JPG files. 

Original size: 502MB. After FileOptimizer: 496MB. Saving: 1.2%

 

#3 My family history& genealogy media folder: This folder has all manner of file types and many more than are actually used by my RootsMagic databases. This was going to be the big test! It also has a multi-branch folder structure so it would be very tedious to select and add all the files using FileOptimizer's GUI. To the rescue is that it can be launched from the command line or shell with one argument, the path to the top folder. It then recurses through all sub-folders and adds all the files to the GUI. 18 hours later...

Original size: 3.47GB. After FileOptimizer: 2.07GB. Saving: 40%. It was nice to free up 10% of the Google Drive free quota of 15GB! 

 

One of the biggest reductions I saw was on certain PDF files, sometimes exceeding 90%! I don't know why there would be such wide variation because other PDFs were negligibly affected.

 

The most time consuming optimization was with PNG files. These seemed to take forever compared to similar size JPGs. FileOptimizer applies several different optimizers to PNG files, some repeatedly before it finishes.

 

I have tested samples of each file type with their default programs and can see no deterioration. Dragging and dropping everything in #2 to an empty RootsMagic database resulted in good thumbnails.

 

Your mileage with FileOptimizer won't be the same as mine. Use at your own risk. For safety, I used 7Zip first to make a zip file of each folder in case there was a problem. 


Tom user of RM7230 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> Rmtrix_tiny.png app, a growing bundle of RootsMagic utilities.


#2 geomouchet

geomouchet

    Member

  • Members
  • PipPip
  • 10 posts

Posted 27 January 2017 - 09:48 PM

I used IrfanView to do the same thing.  I still maintain both the original and resized file versions, but use the resized ones for uploading to websites and sharing with others.



#3 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 5538 posts

Posted 20 April 2017 - 10:15 AM

There is a major distinction between compressing and resizing image files. The latter changes the number of pixels and necessarily reduces quality when the number of pixels is reduced. Image data compression may be lossy (reduced quality) or lossless (no change in quality).

The latter (lossless compression) is what I did with FileOptimizer with variable savings in file size but no loss of quality. When that outcome is still exceedingly large for some purpose, it is necessary to resort to lossy compression for greater reductions in file size. Resizing the image size smaller is one lossy technique for large reduction: 50% on dimensions results in a 75% reduction.

Tom user of RM7230 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> Rmtrix_tiny.png app, a growing bundle of RootsMagic utilities.