Monday, June 30th, 2008

How to sanely compress Fuji RAF files

If you’re a Fuji DSLR shooter like myself, particularly a Fuji S5 shooter, you’ve probably discovered that if you shoot RAW, space on your hard drives disappears rather quickly. Unless you’ve got a mighty speedy workflow and can get your RAFs off the disk in a hurry, a space crunch is practically inevitable.

Without actually moving them to another media, there are basically three sane tacks:

  1. Compress the drive or directory the RAW files live on.
  2. Convert the files to DNG format.
  3. Use Fuji’s HS-V3 to convert to the files to compressed RAF.

#1 doesn’t yield a huge amount of compression as it’s geared to linear data rather than photos. #2 works great, but leaves your images limited to what RAW converters can handle them. In particular Fuji’s HS-V3 (HyperUtility Software version 3) can’t currently handle the DNGs, which is important to me since arguably HS-V3 does the best conversion job (even if it’s too painful in my opinion for regular use).

So, that leaves option #3. The problem with option #3 is you have to use HS-V3 to do the conversion. Not only is HS-V3 klunky in this regards, it can be extremely slow because the “RAW FILE COMPRESSOR” continually communicates with HS-V3’s management interface to redraw the RAFs as they are compressed. This makes the compressing take even longer and consumes more cycles on the PC, making it difficult to multi-task.

The answer is actually fairly simple. It turns out the “RAW FILE COMPRESSOR” is a standalone application. You can easily add it to your desktop or “Start” menu by creating a shortcut (note of course, this is Windows – if you’re Mac, well, I’m sorry you’ll have to figure this out yourself).

Creating a “Start” menu shortcut is a bit beyond the scope of this document, however creating a desktop shortcut is simple and if you do want a “Start” menu shortcut, you can always drag the desktop shortcut to your “Start” menu.

So here’s what you do:

  • Right click the desktop.
  • Choose “New / Shortcut”
  • When the “Shortcut” dialog pops up select “Browse”.
  • Navigate in the “Browse For Folder” to “My Computer / Local Disk (C:) / HyperUtility / HELPERS” and select “RAFCOMP.EXE”. Then click “OK” at the bottom. Note “Local Disk (C:)” may vary depending on how you installed Windows (it is also of course possible you didn’t put HyperUtility in the default directory).
  • You will drop back to the “Create Shortcut” dialog and it will have the “RAFCOMP.EXE” path inserted into the “location of the item”. Click “Next” on the bottom to continue.
  • In “Type a name for this shortcut” replace “RAFCOMP.EXE” with a reasonable name. I put “Fuji RAW File Compressor” as my value.
  • Select “Finish” at the bottom of the dialog.

Ok, so this creates a shortcut for the RAW File Compressor on your desktop (graphic is a vise), now what do you do?

Well, you run it. Double click to start it up. You’ll see that it brings up the same dialog as the compressor would if you ran it out of HS-V3. The thing is, what Fuji doesn’t tell you is you can drag and drop to this tool. So, open an “Windows Explorer” and find the RAF files you want to compress. Select them (using some combination of <CTRL> or <SHIFT> keys) and drag and drop them onto the compressor. They automatically get added to the compress list.

You can drag and drop as many as you want from various directories, even putting different directories into the same batch. Once you click “Convert” the compressor smartly handles these correctly and creates a “COMPRESS_1” subdirectory under each directory where the RAF files were stored. This “COMPRESS_1” directory contains the compressed RAF files. Usually I just drag the completed files right over the originals, letting it overwrite. Compression is roughly 50%.

By the way, you can even add files while it’s compressing, and it will handle those files correctly as well. Unlike running it out of HS-V3 it doesn’t endlessly try to redraw screens, it’s just a utility compressor in this state, just as it should be (well, at least in my opinion).

It actually turns out that it’s fairly easy to add to your “Send To” menu as well, but that seems to be limited to about 35 items per “Send To”, so I didn’t find it worth the effort.

One last note, just as many converters don’t handle Fuji DNGs, many also don’t handle compressed RAF, so there’s a bit of a trade off here. Capture One doesn’t, nor does DxO. My two favorite converters for Fuji do – Lightroom and HS-V3. Lightroom can also convert the “compressed RAF” to a DNG, which may give you a few more options (in my tests the conversion of a “compressed RAF” to DNG was the exact equivalent of a vanilla RAF to DNG – the compression is redone in DNG’s format). Capture One says they’ll handle Fuji DNGs some day, but it hasn’t shown up in a few revs already.

UPDATE:

As “dlbogdan” pointed out on DPReview, you can get similar compression levels out of WinZip or 7-Zip. Here’s some result testing with 27 RAF files with both S&R pixels (ie: 24mb RAFs):

  • 638 mb total for the originals (uncompressed)
  • 329 mb total for the Fuji Compressed RAF format
  • 421 mb when zipped into a ZIP archive using WinZip in default WinZip 2.0 compatibility mode
  • 323 mb when zipped into a “7z” archive using 7-Zip
  • 324 mb when zipped into a ZIP archive using WinZip with compression set to “Optimize for best compression”

The issue for me is that neither Lightroom nor HS-V3 can see into any of these other archive formats (ie: “.ZIP” or “.7z”). That means you have to unpack and re-pack to work with them. Supposedly HS-V2 could actually browse the WinZip 2.0 compatible archives, but unfortunately HS-V2 can’t handle Fuji S5 RAW files (HS-V2 only handles Fuji S2 RAF files plus a few older Fuji bridge cameras).

However, given that you preserve the original uncompressed RAF format in these archives formats, it may be worth the trade off. Using WinZip with say “Optimize for best compression” means that the RAW files will be usable by all converters that understand Fuji S5 format for the forseeable future.

UPDATE 2:

One question that also came up on DPReview from “acrystalball” (aka Crystal) is, “Is the Fuji RAW compression ‘destructive’?” The answer is, I don’t know – the HS-V3 help files don’t indicate one way or another. My personal guess is “no”. Certainly I have seen no degredation and given that there is in fact only 12 megapixels of RAW data, I would expect a much smaller RAW file by default than the 24 mb the S5 outputs. Thus, I think there is plenty of room to non-destructively compress.

UPDATE 3:

It also looks like SilkyPix handles compressed RAFs, which apparently a “free” version also exist:

http://www.isl.co.jp/SILKYPIX/english/download

However it’s pretty severely limited over the for-pay version.

UPDATE 4:

itt” (as in “Cousin”) at DPReview made some other notes based on this post:

  • Files can be dragged from Lightroom and Adobe Bridge directly into the Fuji compressor.
  • BreezeBrowser does show thumbnails and can export the embedded JPEG from compressed RAFs (to note, from what I can tell any app that can handle uncompressed RAFs can actually see the thumbnail and embedded JPEG in compressed RAFs, though they may not be able to actually open the RAF and/or process it).
  • It’s much easier to create a shortcut by dragging the “RAFCOMP.EXE” binary while holding the right mouse button to the desktop. This automatically creates a shortcut. Note make sure that you’re holding the right mouse button otherwise you will drag the actual binary to your desktop, removing it from the location it would normally run out of (and potentially breaking things!)!
  • Earlier he also pointed out that “s7raw“, a free Fuji converter, also handles compressed RAFs.

One Comment on “How to sanely compress Fuji RAF files”


  1. information of massive importance! THANK YOU! (although i’m running a Mac, it will sure turn out to be a separate binary file)

Leave a Reply