What’s All This RAW Hack Business?

Published August 22, 2013

You’ve more than likely heard about the Canon 5D Mk III RAW Hack. We too have been keeping a close eye on the Magic Lantern (ML) team as of late. In the last 4 months they’ve enjoyed their greatest triumphs since initially cracking the 5D Mark II’s code almost 4 years ago. It’s been a wild ride, and even though it’s far from over, we’re ready to join in. The LensRentals crew has been independently testing the various new firmware builds all summer long and we feel it’s now safe to recommend them to our customers.

Fig. 1: Artist rendering of what the Magic Lantern team might look like.

As of last Friday we are renting a pre-hacked version of the 5D mark III that includes one of the 1000x Lexar cards required to get the most out of it. We are not saying the Raw Hack is perfectly stable, actually it is wise to keep a backup camera on hand; however, at this point in time we don’t think the hacked cameras are any less stable than the RED Scarlet, and that’s one of the most popular cinema cameras we carry. To celebrate the recent achievements of the ML project we’ve made a video and this blog post to acquaint the uninitiated with some of the amazing features they’ve implemented this summer. This is not an in-depth technical examination, but rather an attempt at introducing ML to a broader audience. So if you’ve been curious about why those ML posts have recently dominated your favorite camera blog, please read on.

RAW Video

Since last May experimental alpha builds of the ML hacked firmware have been circulating on the ML forums. These new versions feature the ability to capture RAW video with the 5D Mark III (5D3), hence the name “The 5D RAW HACK”. This wizardry is accomplished by diverting raw image data away from the image processor while it’s held in the camera’s internal buffer; instead of getting compressed by the image processor, the visual information is stored directly onto the camera’s memory card in a .RAW file. Later, that file can be converted into Adobe Digital Negative (.DNG) image sequences by a free program called RAW2DNG. Each 1920×1080 14-bit uncompressed .DNG file is a single frame and when viewed in sequence, at the proper frame rate, you have a video. Think of it as shooting photos in continuous mode, silently, at 24fps.

Fig 2: Technical illustration of the Raw Hack in action.

At this point things will become very familiar to anyone who has used a Blackmagic Design Cinema Camera, but there will be a bit of a learning curve for everyone else. You will need to organize the tens or hundreds of thousands of .DNG files known as your project and get to editing. We cover this a bit more in the video. It’s true that a post production workflow using unwieldy CinemaDNG sequences can be a bit challenging, not to mention tedious; however, in this case we think it’s absolutely worth it. Also, try to keep things in perspective. This workflow is some sort of miracled, reverse engineered, workaround for getting the most out of a much beloved camera. The Blackmagic Design Cinema Camera shipped like that.

[for nerds] Many people have been inquiring about possible shooting resolutions. Interestingly enough, you can set your own. In the ML menu there is a resolution option, in some previous builds you could dial in a wide variety of values; although, as of mid-August, the options are locked to just the most popular ones possible on fast Compact Flash cards. In theory, if the cards were fast enough, we’d all be shooting the 5D MK III’s native sensor resolution of 5760 × 3840 pixels, but they are not, so we are not. Fortunately, no matter what the resolution is set to we still get the whole sensor image. That’s right, no sensor cropping, but then how is the image is getting scaled? Typically, interpreting the unprocessed image data, in this case resizing, would involve a process called debayering; however, if the files produced by the RAWHack are truly RAW, they couldn’t have been debayered. So, how does the camera downsample the images without debayering? Well, only Canon knows that… but on his splendid blog Prolost, Stu Maschwitz theorized that it’s a combination of vertical line skipping and horizontal row binning. [/for nerds]

*It should be noted that there is no audio recorded with the Raw Hack at this time, but they anticipate getting it working again in the coming months.*

Flicker-Free ETTR Time-Lapse

Around the same time the RAW Hack started making the rounds, the ML team also finalized the long in development Flicker-Free ETTR Time-Lapse (FFETTRTL) feature. Using the intervalometer, ETTR, Bulb Ramping, and deflicker options in unison this feature finally makes in-camera flicker-free timelapses possible… almost. There is a script that the files need to run through in post, and it takes a while, but other than that it’s mostly automated from capture to completion.

To understand the FFETTRTL feature, we should start by talking about the ETTR part of that initialism. “Exposing to the Right” (ETTR) is a photography technique pioneered by Michael Reichmann and Thomas Knoll more than a decade ago. The term “Expose to the Right” itself is a reference to image histograms. A histogram is a linear graphical representation of the tonal distribution of an image (huh? read this). In a histogram shadows are represented on the left and highlights are shown on the right; therefore, following a line from the left to the right of the graph will take you from dark to bright (Fig 3). So when someone says “expose to the right”, they mean “lean toward overexposing the image, rather than a balanced image exposure.” This is where we get to the actual principle behind ETTR. More usable visual information is contained in the tonal values of highlights than is available in shadows; therefore, it is sometimes prudent to overexpose (without clipping of course) an image so you can balance the exposure later while retaining more detail in the process. Basically, it’s collecting the maximum amount of light to get the best performance out of a camera’s sensor. That’s a gross oversimplification of the whole idea, but should be fine for our purposes. One last thought before moving on, even though ETTR is a proven technique, that doesn’t mean it is always the “best” or “right” way to shoot. When possible, think ahead to how you plan to post process an image and shoot accordingly.

Fig 3: Exposure on the x-axis of a histogram.

So how does ETTR fit into this new FFETTRTL feature? ML offers an Auto ETTR option that will let you shoot in manual mode, but bump up your exposure to the edge of clipping every time you take a picture. When Auto ETTR is used with ML’s built in intervalometer, the camera will learn from the pictures it is taking and adjust exposure (ISO & Shutter Speed) accordingly as it goes. This is accomplished by having the camera evaluate the RAW histogram of the previous image it took before taking the next picture. Each image created in this way will have a matching .UFR sidecar file containing extra information about exposure and the image sequence. Once acquisition of the time-lapse is finished, all the images along with their matching sidecar files are run through a free script available from ML. If done correctly, you will end up with a smooth transitioning image sequence free of flicker.

Dual ISO Dynamic Range Hack

The most recent breakthrough came in July with the surprise unveiling of a Dual ISO Hack. This newest feature uses multiple ISOs to capture a single image resulting in significantly expanded dynamic range. The 5D Mk III has a dynamic range of around 10 stops depending on ISO settings. So by exposing at two ISOs about 4 stops apart at the same time the image gains those 4 stops on top of what it already has. You’re left with almost 14 stops of dynamic range and it’s a pretty massive improvement. Also, did we mention it works with the RAW video shooting?

One of the really unique things about this workaround is that it’s using both ISOs in a single frame. Most high dynamic range (HDR) solutions involve multiple frames being combined. That is true of HDR photography, RED’s HDRx mode, and even ML’s own DSLR HDR Video Hack from last year. Ironically, this innovation was inspired by a perceived weakness in the camera’s design. The 5D Mk III’s sensor performs differently depending on what ISO it’s set at. Some of the higher ISOs handle shadow detail better, but low ISOs definitely handle highlights better. This is not typically the case with most DSLRs, so the 5D Mk III is unusual in that respect; nevertheless, the ML team uses this fact to their advantage in a really creative way. They have the camera capture images interlaced with the 2 different ISOs alternating every 2 lines (Fig 4). For example, let’s say you’re shooting with ISOs 100 and 1600. Pixel rows 1&2 would be ISO 100, then pixel rows 3&4 would be ISO 1600, rows 5&6 100, rows 7&8 1600 and so on.

Fig 4: Dual ISO photo prior to de-interlacing. 

Now here comes the truly brilliant part, the image can be de-interlaced and maintain its 14 stop dynamic range. After taking an image it is quite obviously interlaced and must be put through another script the ML team came up with called Cr2HDR. It takes a minute and then spits out the de-interlaced image. At first the image will appear very dark and underexposed; however, once loaded in an image editor like Adobe Camera Raw you can bring the exposure back up and be delighted by how little noise is present in those recovered shadows.

The bad news is, in all of the finagling to wring an extra 4 stops out of the shadows (literally) you will have sacrificed about a quarter of the image’s vertical resolution. The ML team stands by the opinion that it is nearly imperceptible, and in most situations I agree (Fig 5). Especially if your intended display is a computer monitor, you’ll get away with a bit of murder and it will require a fair amount of zooming and scrutiny to find the seams. On the other hand, if you intend these pictures for high resolution purposes, like large prints or significant post cropping, it will be a bit more difficult to get by unnoticed. Very clean solid colors work great as do exceptionally busy materials like grass or concrete, but simple patterns will give you trouble. Also, as is usually the case, the deinterlacing process introduces a lot of aliasing and moire making it difficult to use for video. As a last thought, I cannot stress enough how well this feature works and useful it is as long as you’re careful with it.

Fig 5: 400% Crop of a test chart after de-interlacing… yeah, that’ll do.

ML team member A1ex released a very detailed technical breakdown of the feature; it includes both an explanation of the basic science behind imaging sensors, as well as how they exploited these principles to pull off their hack. It’s not for the casual photographer, but I would consider it a must read for any camera nerd. Terrific stuff!


All of this stuff might sound complicated; however, thanks to a thriving community, the learning curve isn’t so bad. Just be aware that there is a learning curve and becoming proficient with these new features will take some practice. A quick Google search can resolve most concerns; if that doesn’t work, one can simply go back to the source and search/post in the magic lantern forums. If you’re still left scratching your head, give us a call and we’ll take a crack at it. We’ve been enjoying these new features for a while now, but it’s exciting to finally be able to formally recommend them to our customers. Thanks for reading, here’s a goodie bag for your time; it has one short .RAW clip and one Dual ISO image file to play with.

If you would be interested in more articles like these or would like us to go into greater detail about any of the topics mentioned, please let us know. We look forward to answering your questions and continuing our discussion in the comments section. Happy shooting!

Kris Steward
Video Technician


Meanwhile at Canon…


Author: Kris

I’m Kris, and I’m one of the Lens Techs here at Oddly enough, imaging technology is much more interesting to me than creating images. That means I usually end up shooting whatever is handy, so long as it fulfills the requirements of a given test. Sometimes that is a chart, other times it is a cat. Mostly cats.

Posted in Equipment
  • Jay Dee

    I don’t even own Canon cameras (only printers) and I still LOVE these articles. Thanks to all for the effort and interesting topics!

  • Moon

    Any chance it will get a new firmware with mlb support? It looks like it records sound with .mlb format.

  • Kris

    We have been renting cameras loaded with Magic Lantern for two months now and it’s been very successful. Some have struggled a bit with the learning curve, but most customers have risen to the challenge and really enjoyed the camera. We haven’t had a single problem out of the fifteen hacked cameras we rent and the hacked 5D3 is still my goto camera, even with all of the other gear available to me. If you were asking about Magic Lantern itself, the answer is… not really. There have been some new builds in the past two months, but no major changes yet.

  • Great movie! Any update of this hack?

  • Kris

    Thanks David! We haven’t received our Sandisk cards yet so the jury is still out, but the Komputerbay cards are pretty unreliable. Only every third or fourth card hits advertised speeds, and those that actually perform up to spec fail after a few months anyway. Right now the only cards we recommend are the Lexar 1000x. We hadn’t ever given much attention to Lexar prior to renting these, but they’ve proven very trustworthy after all that we’ve put them through.

Follow on Feedly