2013-10-10

Grading of Hero 3 (Above Waterline) Footage

In this article I'll show how to post-process video footage that was shot with a GoPro HD Hero 3 Black Edition (or Silver Edition) in Protune mode. In order to better understand the details of what really is going on in post processing, I'll show the necessary steps using the non-linear video editor Kdenlive.

On purpose, I'm not using proprietary software packages for demonstration, but instead open source software. However, with the knowledge gained here you should be able to easily transfer my description to any decent other video editor software ... as long as your software gives you the required basic tools.

As I mentioned basic tools: I won't cover reduced functionality video software, such as Cineform and GoPro Studio. Such software has been designed with the goal to make color grading as automatic and easy as possible for inexperienced users. To me, the downside of such a design is that users hardly learn the underlying basics. And without understanding the basics you won't ever get better or being able to use other tools.

Overview


This blog article is a follow-up to Helpful Hero 3 Practice Above + Below the Waterline. In this previous article I explained the steps necessary to configure a GoPro HD Hero 3 (Black and Silver Editions) for shooting footage for post processing: switching on Protune and automatic white balancing off.

We will now learn these three steps to process raw Protune footage in order to turn it into good-looking video, ready for general consumption:
  • uncompressing the Protune-specific red, green and blue channel curves,
  • increasing color saturation,
  • and sharpening the image.

This will give us quite good looking video, while avoiding color tints due to the automatic white balancing going berserk.

Raw Protune


Fernsteinsee (TY/A). Awesome.
...in Protune with WB Raw and without luma decompression.
When you straight look at HD Hero 3 Protune footage without any further processing done on it yet, it will look terribly flat and dull, also a little bit fuzzy.

In order to understand why the unprocessed Protune footage looks so shabby, we have to take a look into the topic of image tonality. Actually, tonality can refer to different things, such as luma (or simply spoken, the brightness), color (hue and saturation), or individual color components, such as red, green, or blue. But don't be afraid, you will literally see how this all works out quite easily.

The image as seen by the camera sensor consists of many picture elements, pixels; each of it having, for instance, particular tonal values in terms of luma, color, and so on. Alas, these values are not the values that are going to be stored in your video files. Instead, they will be processed in some ways, most noteably automatic exposure control and, of course, Protune.

In-camera Protune tonal curve.
When Protune is switched on, then the camera uses a special tonal curve to remap the tonal information for each pixel before writing the result to a video file. Leaving out all the complicated details we can put it simply this way: with Protune off, the tonal curve is just a simple line, so there is no change.

But with Protune on, your GoPro HD Hero 3 uses a tonal curve looking slightly like an inverted S curve. The idea here is that, since the number distinctive tonal values you have is unfortunately always fixed (256), don't space the values equal. Instead, spend more of the values to better differentiate in the highlights and shadows of an image than in the mid-tone parts. Of course, this results in less differentiation in the mid-range, but this often isn't so much of a problem at all.

The illustration to the right shows this situation; I've simplified to whole topic in order to make it much more easier to understand the general idea without getting lost in details. If you look at this illustration, you should see that in the mid-tone range there is less differentiation in the tonal values written to a video file. In contrast, near the minimum and maximum sensor tonal values Protune differentiates more. You can see this also from the fact that the curve is much steeper in this regions.

Post-processing Protune footage in Kdenlive.
Later, when you need to uncompress the tonal values in post production, you are free to either simply undo the original compression or instead to put more focus on the dark or light parts. Again, I came up with an illustration which should help you seeing what is really going on. For instance, you may want to make things more visible that may otherwise become to dark to clearly see: you then simply make the tonal curve for decompression less steep in the low range.

Of course, you cannot have your cake and eat it. You need to decide depending on scene and overall requirements where to put emphasis on: for instance, making things in the shadows become more visible, or getting more or less the original tonal situation back that the sensor saw, or avoiding things drowning in bright light. In the end, one extreme might be to grade each scene individually. But don't despair, as Kdenlive allows you to copy over your settings from one scene to the next or another one really easily.

You may now ask: why not simply using more resolution. Of course, that would be better. But it also increases storage requirements, writing performance (remember the SanDisk Ultar microSD debacle?), editing resource requirements, and so on. Protune is basically a nice hack to allow for more room in post-production without putting to much resource requirements on the overall tool chain.

Protune Tonal Curve


We've now seen that we need to uncompress the tonal values in your raw Protune footage. Luckily, any decent video editing software allows you to control the tonal curves in order to process your video footage. Unfortunately, there are many different terms in use, so look out for curves, bézier curvers, et cetera.

Kdenlives calls the video effect we need Bézier curve. You will find all the video (and audio) effects in Kdenlive in its effects list, which is one of the many views Kdenlive offers. To work on your video, first grap a source video clip (or a part of it, marked in the clip preview) and drag it into Kdenlive's timeline. Make sure to mark this clip in the timeline, then add the effect Bézier curve to it.

Video effect Bézier curve:
for grading Protune footage.
First, make sure that the effect gets applied to all three primary color channels simultaneously. This is usually what we often need, at least above the waterline. In the effect's properties window, Channel must be set to «RGB». As the Luma formula, select «Rec. 709» if not done already so. Otherwise you will experience a slight green tint.

When you first add the Bézier curve effect, you will get only a straight diagonal line. We need to bend it: click on the bottom left red marker. Then enter the values X: -1.414 and Y: 0 into the input fields for handle number 1. For the second handle, enter X: 0.387 and Y: 0 into the input fields.

Next, click on the top right red marker. Set handle 1 to X: 0.619 and Y: 1, the second handle to X: 2 and Y: 1. You should now see the same curve as in the screenshot.

Much better: Protune tonal correction.
But still slightly flat.
At the same time while you worked on your tonal curve you should have noticed the video clip preview in the project view changing. If you don't see any changes, make sure that you actually have the project clip view open. Anyway, your video clip should look much better by now! Yet, we need to process it further as the image is still slightly flat and fuzzy.

You can easily reuse any effect complete with its setting by simply saving it as a template for later use. When you open any effect's menu (which you find in the top right of any effect properties view) you'll see an menu item to save the effect. Any effect you save will be listed under the category «Custom».

Scene-specific Grading


Scene-specific tuning.
My example image already looks much better than raw Protune footage. Nevertheless, there is room for improvement, as the contrast isn't yet satisfying. In this particular scene, let's put emphasis on the shadows and avoid the light parts being too light.

For this to achieve, simple bent your tonal curve so that is more below the diagonal line than above. The screenshot to the right should give you an impression. You bent the curve by dragging the handles around. The precise curve parameters don't matter, as they often differ from scene to scene.


Much better contrasts.
And the result of tuning the tonal curve looks like this...

Color Saturation


While the contrast now looks good, the color saturation is rather dull. In an attempt to be politically correct, GoPro calls this «neutral colors». When you compare the Protune footage with footage from the same Hero 3 but without Protune you'll clearly notice the difference. Without Protune, your footage has vivid colors, with Protune, it looks slightly desaturated.

Saturated enough...?
We are now emulating to some extend what a Hero 3 does on its own when Protune is off: we slightly drown the footage in color. In Kdenlive, we use the Saturation effect to achieve the desired outcome. You should find this effect in any decent video editing software, maybe under a slightly different name.

Wait a moment: what does the parameter saturation mean?

At 100, there is no change in the color saturation of your clip. Beyond, this parameter basically works both ways: above 100 saturation will be increased. Below 100 saturation gets reduced.

One useful application is to slowly fade all colors in a scene to shades of grey only. There's a small clock icon in the dialog: when you click on it, the dialog will change to display a table of key frame setting instead. You simply choose some key frames, such as begin and end of a scene and then set suitable values for the saturation at each of these key frames. Kdenlive will then automatically calculate interpolated values for all other frames.

GoPro Kitsch: awesome colors..!
In order to reproduce the typical GoPro color impression, you don't need to be shy: crank up the saturation value to 200. This still doesn't let your footage look too much like the new Apple iPhone 5C generation, yet gives more saturation.

If you happen to look at my videos shot with a Hero 3, you can easily spot how I learned to better post process Protune footage. My first productions had dull saturation and wasn't sharpened. The overall impression fits the impression of meager cold water life. Only later I started to add more saturation and did sharpening ... you see, we all learn constantly.

Sharpening


This brings us to the third and final video effect we need to add to our example clip in order to reproduce what a Hero 3 normally does on its own with Protune off. With Protune on, we also need to sharpen the footage. So much for the quality of the optics.

Getting sharp images.
We thus need to apply the Kdenlive video effect Sharpen to our clip. I have to admit that I don't find the effect's two parameters exactly intuitive. You'll need to experiment. For 2.7K footage I usually get satisfying results with an Amount of 700 and a Size of 20. With these parameters I still cannot see noticeable artefacts. In particular, the default amount of 200 doesn't give me any noticeable change, so that's the reason I need to crank up this parameter so much. For lower resolution footage, such as 1080p you will probably want much lower settings especially for the amount.

Properly graded still from my real-world footage.
Left: sharpened. Right: unsharpened.
The final outcome of our work can be seen to the right. In my view, it's quite convincing. We turned the flat, dull, and fuzzy raw footage into vivid and good-locking video, even at least seemingly sharp. It's definitely worth the effort.


Any decent video editor allows you to copy effects from scene to scene. So does Kdenlive: simply choose Copy on a scene, as if you want to copy the scene. Then on the destination scene, choose Paste Effects instead of a simple Paste. This way you can very effectively work on your footage, especially when scenes are similar. Also, saving this set of three effects as a template also speeds up your grading work when post processing your footage.

Conclusion


We've finally made it to the end of this blog article. You see, working with Protune footage isn't really difficult, at least when you have gained some first practice. However, Protune can't make up for the incapability of the cameraman. Hopefully, you got some useful tips and tricks from my article so you can now gain your own experience in post processing Protune footage. Enjoy the results!

We use these three video effects when dealing with Protune footage:
  • Bézier Curve for decompressing the Protune tonal curve,
  • Color Saturation (saturation: 200),
  • Sharpen (amount: 700, size: 20).

Update: I'm covering grading of footage shot below the waterline in my new article.