After Effects HDR Video Script

Started by Murphy, May 23, 2013, 02:11:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Hi all. So i started playing around with Magic Lantern's HDR video the other day, and decided to write a little After effect script to automate my workflow, and thought I should share it here if anyone is interested.

Its a pretty simple script, and it should be totally platform independent as long as you have AE (for all those mac heads who've been going insane with wine and enfuse).

The script will:
1) create a new composition for your video file
2) detect whether the first frame is high or low ISO
3) split the frames to seperate layers
4) tonemap those layers
5) add a few effects for fine tuning

Also totally GPL, so feel free to hack it to pieces.

Comments and criticisms are welcome. If you can think of anything that would improve the script, leave a comment.


wow great post, I can't wait to try it :) for now I probably did something wrong though !
I've just launched the script as I thought you explained but I got a message
seemingly saying that the error is line 65, and the "slider control" cannot be added at this point.
I don't really understand what it means or what I may have done wrong. Any idea ???
thanx in advance.


Hmmm, if the script is running I highly doubt that its anything you did wrong.

I'm on an earlier version of After Effect, so my guess is that they may have slightly changed the code API between the versions, on how filter effects are added to layers.

The "Slider Control" is an effect which doesn't actually alter the layer in any way (kindof a dummy effect) but is useful for controlling things with expressions. The HDR script temporarily adds a Slider Control effect to the video layer, so it can run an expression to analise the pixels on frame 0 and frame 1 and determine which order the high and low ISO frames are in.

I'll see if i can get my hands on the latest version of After Effects and find out whats going on. Money is a little tight which is why i'm still on an older version, but i've been told they have a new monthly subscription thing which could make life a little easier.

I'll keep you posted.


This is beautiful. Thank you very much, and I will try it when I have time.


Thanks Mucher.

Naturalbornsamy, i just installed the trial version of After Effects CS6 on my mac, and the script worked without any errors, so I'm scratching my head as too what the cause could be. Exactly what version are you running, and are you using windows or mac? Did you run it with only the HDR video files selected in the project media browser window? Also, could you go in the "Effects & Presets" panel and check under the "Expression Controls" drop down that the "Slider Control" effect is there.


Thanks for your answer Murphy,

- I run on Mac OS X 10.8.3, AE 11.0.2 (CS6)
- I just run it with a HDR video files only.
- I check in "effect and presets", the "Sliders Control" effect is right here.

I gonna the  clean the preference files of AE and try again...

thanks again


hi, Naturalbornsamy.
Is your after effects running in English, or another Language?
I have to translate it for the german version of effects.



This is so cool, I love  HDR feature, is this working on windows too?   5D Mark III, 6D, 550D


Hi, my after effect is running in french. Do you think it could be the problem?


Great Murphy ! Many thanks from me and all the ML community for sharing your great work !  ;)
If you think it's impossible, you have lost beforehand


Come on, people, Is there a way to use this on windows?   5D Mark III, 6D, 550D


I switch my After Effect in english and the script works well! thx ;)


Thanks for the kind words guys. Also thanks to scheng.pell again for the German translation and working out the bug. It didn't even occur to me that AE scripts would break depending on the language version.

kgv5, there's no reason i can think of why it shouldn't work in windows. The adobe scripting API is the same for both systems and should be platform independent (like python or JRE). If you want to give it a test, let us know if you have any problems.


Murphy, thank you very much for your response  :) So I will have to try this once again  :D   5D Mark III, 6D, 550D



thanks for this tool. How I have to export this file to use it in premerie pro???

I use:

Win 7, AE und PP CS 6, 25 fps


Joachim Buambeki

Interesting script.
Would it be possible to modify that script that it loads a bracketed RAW timelapse sequence and does the same than with the laternating video sequence?
If yes, could ghosting be removed aswell?

That would be great, because one could skip the HDRI creation of bracketed timelapse sequence totally. :-)


Murphy, thanks for writing this!!
Unfortunately .. here it does not work. Could it possibly produce errors on videos which don´t have the full 1080-height, since I captured in another aspect ratio?

It creates the comp, the high and low layer and an adjustment layer on top, but you still see the interlace lines after running it.

On the high exposure it applies the shift channels, an "invert alpha" and a curves effect with no change to the image.
On the low exposure image there is no effect applied at all.And the adjustment layer has just a curves effect without anything and a unsharp mask. But no sliders etc. anywhere. What could be wrong?




Hi, interesting script, but i don´t know how run it. I have bright and dark .DNG files mixed in the same folder after pass through Raw2dng .

How is the process to get the .mov files you show in that picture ?

Will be great if you explain all process.

I can import the DNG secuence with bright and dark .DNG files mixed, directly to AECS6, before AECS6 lets me adjust the first and applies the adjust to all the secuence of .DNG with Adobe Camera Raw. Maybe is there any script that shall be able to separate bright and dark .DNG files of the secuence of .DNG and after combines it to create an HDR secuence?

Sorry for my english



Unfortunately this script seems dead on my After CS6...or I dont know how to use it :0

Anyhoo I import HDR footage in AE and go to File/Scripts/This Script and nothing happens :(
Not sure Im doing it correctly, could anyone help? Do I need to extract hi/low ISO pictures from video first and how and then what?