Magic Lantern Forum

Using Magic Lantern => Post-processing Workflow => Timelapse Postprocessing => Topic started by: dmilligan on October 17, 2013, 12:32:09 AM

Title: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 17, 2013, 12:32:09 AM
This script is for deflickering and ramping pretty much any ACR setting from Adobe Bridge over a sequence of images

Website:
http://davidmilligan.github.io/BridgeRamp

Script download:
https://raw.github.com/davidmilligan/BridgeRamp/master/BridgeRampingScript.jsx

Place this script in:
Windows:
%APPDATA%\Adobe\Bridge CC\Startup Scripts\
Mac:
~/Library/Application Support/Adobe/Bridge CC/Startup Scripts/

to have it automatically load on startup (or you can just double click it or open it with Bridge when you want to use it). It will add three new items to the context menu 'Ramp...', 'Ramp Multiple...' and 'Deflicker...'

Simply select all the images you want to ramp, right click, go to 'Ramp...', 'Ramp Multiple...' or 'Deflicker...' and fill out the dialog.

'Ramp Multiple' ramps the existing ACR settings that you select from the first image to last (kind of like a smart version of the 'Synchronize' in the ACR dialog). You can also specify keyframes by rating them 1 star. It will ramp settings from one keyframe to the next. The first and last images are considered keyframes even if not marked. The deflicker will use keyframes marked like this as well.

This script is useful for timelapse as well as RAW video. There's an "additive" mode so you can add to the existing value (useful for modifying the exposure value calculated by ML Post Deflicker, easier than the exif tool way, and you can make it ramp as well)

There's also a version of this script for Lightroom:
Download:
https://github.com/davidmilligan/LrDeflick/releases/download/v0.1.0/

Code
https://github.com/davidmilligan/LrDeflick
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: RenatoPhoto on October 17, 2013, 02:31:03 PM
Sounds very interesting.  I have windows ACR 8.2 and Bridge CS6.  Is there any way I can use it?
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 17, 2013, 02:32:49 PM
yeah it should work fine in cs6, just change that path to ...\Bridge CS6\Startup Scripts
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 17, 2013, 02:43:51 PM
Sounds very promising. Gonna try asap. Thanks for contributing
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: RenatoPhoto on October 17, 2013, 03:04:17 PM
Quote from: RenatoPhoto on October 17, 2013, 02:31:03 PM
Sounds very interesting.  I have windows ACR 8.2 and Bridge CS6.  Is there any way I can use it?

Ok found the startup scripts here:

C:\Users\RE\AppData\Roaming\Adobe\Bridge CS6\Startup Scripts

Copied the script
Paste to notes and saved it as BridgeRampingScript.jsx
Placed a copy in : C:\Users\mycomputername\AppData\Roaming\Adobe\Bridge CS6\Startup Scripts
Opened Bridge and asked me if I wanted to load the script.  Clicked yes
Selected a group of images I wanted to change the exposure
Right mouse click and selected "Ramp ACR Settings"
On the drop down menu you can select any of the xmp settings, default "Exposure2012"
In Start I entered -2
in End I entered 0  (This will ramp my exposures starting at -2 and ending at 0)
Clicked additive
click ok

Whala!  All of the xmps where succesfully modified and ramped to my taste.

Nice script!  Thanks and great work.


Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 17, 2013, 03:36:04 PM
Sounds like solving the missing piece of the timelapse puzzle. Gonna try on my mac tomorrow
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 18, 2013, 02:28:29 PM
So I'm actually close to getting this script to be able to do deflickering itself, I just need a little help with some Maths. I've managed to pull a bitmap of the Bridge preview (it's lowres, 8bit, but should be enough info to do the deflicker I think, also that helps speed b/c this is a script not native code) and generate a histogram from it from within my script. This entire process takes about 1-2s, so I think this should actually be feasable in terms of speed since that's the vast majority of the computation. It's certainly less time than it would take to have it load the entire image in photoshop and use photoshop's histogram data.

So now what I'm assuming I need to do is calculate where some target percentile is on the histogram (should be easy). Then calculate how far I need to move that to get it to some target level, and convert that to EV.

For example, let's say my target percentile is 50% and the target level is 127. I calculate the histogram and find that 50% is at 143, so now I know I need to shift left by 16. So how do I compute that as EV from an 8 bit (0-255) value? Am I on the right track at all here?

I found the function used by ML post deflicker called raw_to_ev, it basically does the following calculation: ev = -log2(raw_max) + log2(raw_value). Is that all I need to do?
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: a1ex on October 18, 2013, 02:33:01 PM
You need to compute it either in raw or 16-bit linear space, or know the curve somehow.

log2 is a very crude approximation of this curve.
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 18, 2013, 02:42:52 PM
so should I just reverse engineer the curve in 8 bit space, like take a blank white image apply a bunch of different EVs to it and do a logarithmic regression on the data points? Or is it just not feasible to try and calculate with 8 bit data?
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: a1ex on October 18, 2013, 02:46:32 PM
Yes, if the "picture style" is always the same, this should work.

To simplify things, you may want to convert the image to grayscale first. For reversing, I think it's enough to render some image at say -0.5 and +0.5 EV (or maybe even smaller) and recover the curve from there, but I'm not sure if the accuracy is enough.

Some theory: http://en.wikipedia.org/wiki/Histogram_matching

Also look at the older bulb ramping algorithm: it reversed Canon curve on the fly in order to compute the EV from it. Should be exactly what you are looking for.
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 18, 2013, 03:07:49 PM
thanks a1ex!
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 19, 2013, 12:23:20 AM
It's working!!!

So what I ended up doing was using the tone curve instead of trying to calculate exposure adjustment. The tone curve is specified in 0-255 values so no conversion is needed. I computed the values of several various percentiles (25,50,75 perhaps more or a better selection would work better?) on a reference image, then those become the y values of the tone curve with the image's percentiles values as the x.

It seems to be working, I haven't had much of a chance to test and put it through it paces yet.

Any suggestions?
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 19, 2013, 12:51:15 AM
hats of to you. Can,t wait to try it out. See if I get up to do I night to day timelapse tonight
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: rsmith02 on October 19, 2013, 03:30:38 AM
Is it possible to do any of this in Lightroom? I only have old versions (CS3) of bridge. Could it work in CS3 Bridge and then Lightroom can read the fixed .xmps?
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: rsmith02 on October 19, 2013, 03:45:00 AM
I tried it with CS3 and got an error:

"An error occurred while running a startup script named 'BridgeRampingScript'. It may not be compatible with this version of Bridge;


Error in C:\Users\me\AppData\Roaming\Adobe\Bridge CS3\Startup Scripts
Line 4: <!DOCTYPE html>
Variable or value expected
"
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 19, 2013, 05:34:46 AM
Sorry, wish I could help you, Lightroom does not have scripting support and I don't have CS3. The script will probably work as far back as CS5, but that's about it.
Title: Re: Script for ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 19, 2013, 05:59:11 AM
Updates:
I've added a couple more percentile levels and tried to optimize their distribution.

Skipping lines to speed things up a little

Deflicker now ramps from the first image selected to the last image selected. (initially it just tried to make all the images look like the first one). This should help for scenes where the lighting changes dramatically (i.e. sunset, sunrise). If you have a scene with a pretty static period, then a transition (such as some amount of night sky then a sunrise), you might want to select and deflicker the static period, then select and deflicker the transition separately, so the ramping is smoother, or you may not need to deflicker the static period at all, in which case only deflickering the transition will save you time.

You should be able to use some amount of the various controls that are known for causing flicker such as clarity and highlights, just apply those settings first to non-deflickered images, then run the deflicker.

If you need to rerun the deflicker make sure you clear the tone curve from all images before hand or the script will calculate the tone curve to apply incorrectly (since there is already one being applied).

I've got some before/after sample videos rendering at the moment, will post them soon.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: a1ex on October 19, 2013, 09:21:44 AM

var percentiles = [0, 0.3, 0.5, 0.75, 0.95, 0.99, 1.0];


Are you sure? This is no longer statistically robust, try to stay close to the median.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 19, 2013, 02:27:45 PM
I have no idea what should work, just trying things, what would you suggest? only the median?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: a1ex on October 19, 2013, 02:35:34 PM
I'd say try a few percentiles and choose the one that crosses the middle of the sky (roughly).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 19, 2013, 03:01:49 PM
Maybe I need a UI with a preview like you showed me with the percentile highlighted and let the user pick.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: a1ex on October 19, 2013, 03:05:11 PM
Yeah, that would be perfect. You can try the 2.3 version to see a UI that lets you select a percentile; something like that would be good IMO.

What I'd like to try is to use the median of the difference between images. I'm using it in dual ISO for matching brightness line-by-line; you can see the result here: http://www.magiclantern.fm/forum/index.php?topic=7139.msg83086#msg83086

(look at horizontal banding)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 19, 2013, 07:40:17 PM
okay, so I dropped trying to use the curve to deflicker and using exposure instead.  ev = 2 log2(x) seems to be a pretty decent approximation. You can now run several passes of the deflicker, it should get better each time (basically each iteration is reducing the error between ev = 2 log2 (x) and what ACR exposure is actually doing). After about 3 passes it's just about perfect. Percentile is now user selectable, I'm working on a percentile preview (image manipulation in scripting language may prove to be just to slow, we'll see).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 20, 2013, 12:07:03 AM
Deflickering Test
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 20, 2013, 12:10:04 AM
genius!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 20, 2013, 12:47:11 AM
Hi! Tried it on my mac on adobe cs6 but no success :(. Is there anything I,m missing here? It looks like this.
(http://s7.postimg.org/teryfppbf/skript.png)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: RenatoPhoto on October 20, 2013, 01:31:15 AM
I tested the new script and gave me the two options.  I tried first to ramp the exposure but this did not work.  It did not process any images.
The deflicker option worked on the files but the deflicker did seem proper.  i will test again..
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 20, 2013, 03:08:48 AM
oops, broke the ramping accidentally, try it now.

You need to make sure you pick an appropriate percentile, according to a1ex pick a percentile that 'crosses the sky'.

Also you might have to do several passes. Make sure the Bridge previews get regenerated between iterations (right click and go to "Purge Cache for Selection").

Here's an example of the preview (0.7 percentile highlighted):
(https://bitbucket.org/dmilligan/magic-lantern/downloads/PercentilePreview.jpg)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 20, 2013, 08:10:42 AM
Hi again. Got it to work. Wasn,t aware I had to copy paste the coding from the link to get it to work. First I simply downloaded the jsx file from the first post which obviously didn,t work. Thanks again Dmilligan.
//D
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 20, 2013, 12:57:22 PM
Just discovered this. Great work (again) David.

A few questions:

- Can you ramp values based on keyframes (frames that are marked with 1 star)? For a sunset one would pick 6 frames for example, adjust WB, exposure, shadows, highlights, colours, etc. and let your script ramp ALL sliders you can access within ACR including the curves? That would be MUCH easier than the current dialogue because you could use ACR dialog itself and see what you are actually doing.

- If that is possible, could you also animate/ramp the graduated and radial filter? They are useful for sunsets and/or when you have a dolly shot or want to track a subject like the milky way.

- Could you add a small dialogue to create those keyframes where you enter how many of them you want and they are evenly distributed evenly over the sequence then?

- Can you detect sudden changes in shutter speed with the script? Since you can't bulb ramp with Nikon cameras you have to adjust the shutter speed in steps of x EV (depending on how fine you want the steps to be) from day to night and then smooth those transitions, could you automate that? Those frames could be marked with 2 stars for the first and 3 stars the second of each pair.

- If the keyframing is possible, can you take care that those keyframes aren't changed by the deflickering algorithm? Meaning the exposure of those stays untouched and the surrounding frames are adjusted accordingly.

- If the keyframing is possible, what happens if I change the keyframes after the deflickering? Do I have to run those multiple passes again or could the offset for each frame be stored and be adjusted to those .xmp values of the keyframes?

- How robust is the deflickering? What if there are headlights from a car in a single frame, will the exposure of this frame be lowered because of its higher overall brightness? If it works that way and since you can access the small bridge preview image, could you add threshold that discards sudden local changes in brightness as flickering? Black birds in the sky or a fly one the lens would be another example where the deflickering algorithm might be thrown off.

- Could you implement a dialogue to raise/lower exposure of the sequence of after it has been colour corrected and deflickered? I often find the overall sequence a tad to dark/bright after reviewing the whole sequence and want to raise/lower the overal exposure.


Keep up the good work, it is really appreciated. :-)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 20, 2013, 09:50:06 PM
It seems that some folks downloaded the link I posted in the OP, which is actually an html page for the script, not the script itself, which is why you had trouble running it. I have updated the OP with the link to the actual raw file, so you can just right click and download, sorry for the confusion. (If you saw a bunch of html tags in an error message, this is probably what happened)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 20, 2013, 11:07:05 PM
Quote from: dmilligan on October 20, 2013, 09:50:06 PM
It seems that some folks downloaded the link I posted in the OP, which is actually an html page for the script, not the script itself, which is why you had trouble running it. I have updated the OP with the link to the actual raw file, so you can just right click and download, sorry for the confusion. (If you saw a bunch of html tags in an error message, this is probably what happened)

Sorry for asking, but where am I supposed to put the scripton my Win8 CC version? I don't have the folder you're describing in your opening post. As of now I am opening the script by opening it in Bridge each time I start it.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 20, 2013, 11:31:33 PM
Quote from: Joachim Buambeki on October 20, 2013, 12:57:22 PM
- Can you ramp values based on keyframes (frames that are marked with 1 star)? For a sunset one would pick 6 frames for example, adjust WB, exposure, shadows, highlights, colours, etc. and let your script ramp ALL sliders you can access within ACR including the curves? That would be MUCH easier than the current dialogue because you could use ACR dialog itself and see what you are actually doing.
I like your idea about using the the existing ACR settings to do the ramp, I can have the dialog pull the values of the selected setting from the first and last selected photos as the default for the text boxes. And then also have some kind of "ramp all" option.

I don't really think keyframes are necessary, just select the photos in groups and do one ramp at a time. I don't think that's any more difficult than defining keyframes, and makes things much less complicated for the script (and me).

Quote from: Joachim Buambeki on October 20, 2013, 12:57:22 PM
- If that is possible, could you also animate/ramp the graduated and radial filter? They are useful for sunsets and/or when you have a dolly shot or want to track a subject like the milky way.
Is stuff like this really necessary to do with ACR? Why not do stuff like that in AE? You should be able to achieve exactly the same results.

Quote from: Joachim Buambeki on October 20, 2013, 12:57:22 PM
- Could you implement a dialogue to raise/lower exposure of the sequence of after it has been colour corrected and deflickered? I often find the overall sequence a tad to dark/bright after reviewing the whole sequence and want to raise/lower the overal exposure.
This is already possible, just use the "additive" mode.

Quote from: Joachim Buambeki on October 20, 2013, 12:57:22 PM
- Can you detect sudden changes in shutter speed with the script? Since you can't bulb ramp with Nikon cameras you have to adjust the shutter speed in steps of x EV (depending on how fine you want the steps to be) from day to night and then smooth those transitions, could you automate that? Those frames could be marked with 2 stars for the first and 3 stars the second of the pair.
Just use the deflicker.

Quote from: Joachim Buambeki on October 20, 2013, 12:57:22 PM
- How robust is the deflickering? What if there are headlights from a car in a single frame, will the exposure of this frame be lowered because of its higher overall brightness? If it works that way and since you can access the small bridge preview image, could you add threshold that discards sudden local changes in brightness as flickering? Black birds in the sky or a fly one the lens would be another example where the deflickering algorithm might be thrown off.
I think it should be pretty robust. It's based on the histogram, so transients should be okay as long as they have a relatively small impact on the overall histogram distribution. A1ex could answer questions about the theory behind this, better than I can.

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 20, 2013, 11:40:00 PM
Quote from: Joachim Buambeki on October 20, 2013, 11:07:05 PM
...Win8...

Sorry, I feel your pain. I have no idea, if Microsoft decided to move that stuff around, there's no telling. Honestly, a child could come up with a better directory structure than Windows has. It's seriously embarrassing for MS, but I think MS should be embarrassed by Windows in general. I have no idea why people use that crap. (or why they PAY for it when linux is FREE!).

Maybe try doing a search for "Bridge CC", though I've heard Win8's search is pretty much totally useless, would end up searching the internet, even if you are just looking for a local file.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 20, 2013, 11:55:50 PM
Quote from: dmilligan on October 20, 2013, 11:40:00 PMI have no idea why people use that crap. (or why they PAY for it when linux is FREE!).
The day you or anyone else hacks together a patch for Adobe programms to use the MacOS (=Unix) version on Linux I am done with Windows - I'll give you my word on that...

Quote from: dmilligan on October 20, 2013, 11:40:00 PMMaybe try doing a search for "Bridge CC", though I've heard Win8's search is pretty much totally useless, would end up searching the internet, even if you are just looking for a local file.
Thanks, I'll do some searching on the interwebz, I wasn't able to find the folder with the search in the explorer - not that this ever was of any use since I am with Win95...

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: RenatoPhoto on October 21, 2013, 12:05:10 AM
Quote from: Joachim Buambeki on October 20, 2013, 11:07:05 PM
Sorry for asking, but where am I supposed to put the scripton my Win8 CC version? I don't have the folder you're describing in your opening post. As of now I am opening the script by opening it in Bridge each time I start it.
Probably something like this: C:\Users\RE\AppData\Roaming\Adobe\Bridge CS6\Startup Scripts

Or search in C:\Users for "scripts"
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 21, 2013, 01:26:10 AM
Quote from: dmilligan on October 20, 2013, 11:31:33 PMI like your idea about using the the existing ACR settings to do the ramp, I can have the dialog pull the values of the selected setting from the first and last selected photos as the default for the text boxes. And then also have some kind of "ramp all" option.
I don't really think keyframes are necessary, just select the photos in groups and do one ramp at a time. I don't think that's any more difficult than defining keyframes, and makes things much less complicated for the script (and me).
I am just talking from a user POV, so I don't know how much work the coding is and I am grateful for the work you put in, but IMO keyframes are crucial for an easy workflow. For me ramping those sets is pretty annoying when having 10+ keyframes, especially since I tend to re-edit my keyframes alot during editing.
If keyframing would be implemented like layed out in my previous post (or in a similar manner) this could become a serious alternative for commercial software (which uses the star rating in the manner I proposed), the deflickering could even be able to surpass it in quality because it works directly with the output of ACR's render engine.

Quote from: dmilligan on October 20, 2013, 11:31:33 PMIs stuff like this really necessary to do with ACR? Why not do stuff like that in AE? You should be able to achieve exactly the same results.
I am no experienced colorist, but changing white balance (hint: gamma correction), contrast and other things localy on an already highly graded image with a bad ratio of noise vs. signal (like a noisy milky way shot) is pretty hard to do for me within After Effects. If you would attempt to try/do it you would defeat the whole purpose of the scripting which is getting highest quality output from a RAW file IMHO. In that case you would be better off to output a flat interpretation of the actual RAW file and do ALL (=global and local) adjustments in AE or a designated colour grading suite like Speedgrade or Resolve.
By the way, all those features are implented in commercial software, some of them based on requests made by users.

Quote from: dmilligan on October 20, 2013, 11:31:33 PMJust use the deflicker.
I would have to run deflickering then within every set of keyframes to keep them at the brightness I want them to be, right? This is again a case where the proposed keyframing integration would be handy for a much smoother workflow.

Quote from: dmilligan on October 20, 2013, 11:31:33 PMThis is already possible, just use the "additive" mode.
Maybe you could create a small wiki like with your HDR script to clarify things?

Quote from: dmilligan on October 20, 2013, 11:31:33 PMJust use the deflicker.
So, the deflickering would have to be processed again in sets of neighboring keyframes? If yes, my plea would be the same as in the first paragraph of this posting.

Quote from: dmilligan on October 20, 2013, 11:31:33 PMI think it should be pretty robust. It's based on the histogram, so transients should be okay as long as they have a relatively small impact on the overall histogram distribution. A1ex could answer questions about the theory behind this, better than I can.
Ok, I'll try if I can break it with one of my sequences with such frames.
By the way: Is deflickering supposed to be that slow? With high precision, it takes half an hour on my 4GHz quadcore (though only one core seems to be used).

PPS: Did you see my reply to this thread (http://www.magiclantern.fm/forum/index.php?topic=8431.msg83990#msg83990)? Just in case you missed it.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 21, 2013, 03:01:01 AM
Quote from: RenatoPhoto on October 21, 2013, 12:05:10 AM
Probably something like this: C:\Users\RE\AppData\Roaming\Adobe\Bridge CS6\Startup Scripts

Or search in C:\Users for "scripts"
I figured it out, I had to create folder myself within the Bridge directory and put the script in there. Maybe this should be added to the initial post?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 21, 2013, 03:21:17 AM
Quote from: Joachim Buambeki on October 21, 2013, 01:26:10 AM
By the way: Is deflickering supposed to be that slow? With high precision, it takes half an hour on my 4GHz quadcore (though only one core seems to be used).

Yeah, that's the major drawback, doing image processing in scripting language is not exactly efficient. 99% of that time is spent simply generating the histogram. Something that should take a fraction of a millisecond takes 1-2 seconds in javascript. Nothing I can really do about it except write this in native code, which would kind of defeat the purpose, which is that it's extremely easy and simple and only requires Bridge to run. Alex is working on something that will be native and not require Bridge, so why duplicate the effort there.

You can play with the skip lines parameter and see how large you can make it before the histogram becomes inaccurate (basically it's skipping over pixels when calculating the histogram to improve speed, at some point you start drifting away statistically from the true histogram). It should be okay to at least skip 3 like I have as the default, there's more error in the ev calculation than in the histogram calculation at that point. If you have a lot of clear sky in the image (a smooth gradient) you should be able to get away with skipping 5 or 6 I should think.

If I could figure out a way for Br to give me a histogram it would be much much faster, but I haven't found anything. Taking the time to open in photoshop and getting a histogram from there would be slower I think than just computing in javascript.

If you would like to write a C++ plugin to Br for calculating the histogram I would gladly incorporate it into the script.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 21, 2013, 03:53:00 AM
Quote from: dmilligan on October 21, 2013, 03:21:17 AMIf you would like to write a C++ plugin to Br for calculating the histogram I would gladly incorporate it into the script.
Unfortunatelly I have zero programming knowledge. A while ago I stumbled over this (http://feedback.photoshop.com/photoshop_family/topics/histograms_in_bridge) but never got it to work because it is written for CS5 and doesn't work with later versions. I am not sure if it is of any use or your script is already doing something similar to get the histogram.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 22, 2013, 11:41:55 PM
@Joachim
So I think I finally understood what you meant by the keyframe thing with the star rating (I was thinking you wanted me to come up with some kind of dialog/UI for creating keyframes, the rating thing is not to hard at all) and I have implemented it for the deflicker and a new "Ramp All ACR Settings" menu. Good idea, thanks.


Mark the frames that you don't want to be touched (used as keyframes) with 1 star. First and last selected frames are assumed to be keyframes even if not marked. Deflicker will run the histogram matching on a ramped EV target from one keyframe to the next. "Ramp All ACR Settings" works basically the same way, except just blindly ramping all settings from one keyframe to the next.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 24, 2013, 10:50:27 AM
Finally got some time to play around with your script. I must say this is brilliant stuff. The ramping method using "ramp all ACR settings is perfect". I just tried starring 6 in and out points and by simply editing first and last of each starred pic it performed the ramping flawlessly exactly like I wanted. Gonna explore some more on occasion. Meanwhile. Biggest thanks!
//D
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 24, 2013, 04:19:30 PM
Hi! Anybody maybe someone could shed some light.
When using "ramp all ACR settings" it all works accordingly. When selecting "ramp ACR setting" it doesn,t respond. Also when applying deflicker I can,t see any changes whatever percentile I try? I only tried selecting around 10 pictures for tryout
My setup is this.

1 - Import dual iso files with applied xmp sidecarfiles which I apply to the metadata inside the cr2 files through lightroom.
2 - Importing the cr2 files to bridge and all my metadata changes follows nicely.
3 - trying to apply the script. Only get the "ramp all ACR settings" to work

(http://s10.postimg.org/gaqzy2hid/Ska_rmavbild_2013_10_24_kl_16_30_24.jpg) (http://postimg.org/image/gaqzy2hid/)

*somehow my deflickering started to work with the new script? I don,t know why really? Gonna investigate further.
Deflicker now seems to work but not the exposure ramping with "the ramp ACR settings" in the new script. In the older one it works
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: agour on October 24, 2013, 04:39:10 PM
Just been trying out the deflicker, but can't seem to get it to work.

It runs through and processes the files, however bridge doesn't 'find' them in the normal way (where it shows a little icon on the top right of thumbnail preview). I opened a few images and they DID however have adjustments applied... Weird.

I left the deflicker at default settings and ran it through. It didn't work at all, so I'm not sure what's going on. Has anyone else experienced this issue before?


HOWEVER, that 'ramp all ACR settings' is GENIUS. It's so easy to use, it's going to help me out a lot! Another question, will it affect the exposure adjustments, or just ramp the other settings?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 24, 2013, 04:43:11 PM
Quote from: agour on October 24, 2013, 04:39:10 PM
HOWEVER, that 'ramp all ACR settings' is GENIUS. It's so easy to use, it's going to help me out a lot! Another question, will it affect the exposure adjustments, or just ramp the other settings?

It affects all settings, exposure included. Would be swift to be able to unselect parameters but that,s when I tried the other setting, which I couldn,t get to work :). It is still crazy good being able to ramp several points...
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 24, 2013, 04:56:37 PM
Actually, I tried an older script which doesn,t contain the "ramp all ACR settings" and this one works with deflicker and so on. Maybe something wrong with the latest script?
Did two "passes" with deflickering and it worked very good!

*somehow my deflickering started to work with the new script? I don,t know why really? Gonna investigate further.
Deflicker now seems to work but not the exposure ramping with "the ramp ACR settings" in the new script. In the older one it works
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 24, 2013, 05:17:30 PM
Quote from: agour on October 24, 2013, 04:39:10 PM
I left the deflicker at default settings and ran it through. It didn't work at all, so I'm not sure what's going on. Has anyone else experienced this issue before?

I'm not sure what you mean by "didn't work at all". Did it do anything (did you see the progress window?) or did it just not deflicker correctly - it applied exposure corrections but they were wrong? Did your images already have xmp sidecars? If so, when you did the deflicker were they modified? If not already created, were they created? Can you post the image that's generated when you click the 'Preview' button in the deflicker dialog.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 24, 2013, 05:39:15 PM
For myself it,s now only the "ramp ACR setting" that doesn,t apply changes. Really nice script I must say anyway
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 25, 2013, 01:24:43 AM
Updates:
Fixed 'Ramp ACR Setting...' and renamed to just 'Ramp...'
Renamed 'Ramp All ACR Settings" to 'Ramp Multiple...' and added option to select which things to ramp (like the ACR dialog when you select 'Synchronize...').
Added some error handling so hopefully it will be easier to diagnose errors you guys come across.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 25, 2013, 02:02:57 AM
Quote from: dmilligan on October 22, 2013, 11:41:55 PM...(I was thinking you wanted me to come up with some kind of dialog/UI for creating keyframes, the rating thing is not to hard at all) and I have implemented it for the deflicker and a new "Ramp All ACR Settings" menu.
Actually that was part of my earlier post. It would be nice to have dialoge that asks you how many keyframes you want to create and then those are evenly distributed among the sequence. Right now you have to rate them with 1 star by hand which takes quite a bit of time if you want to have 10+ keyframes for day to night sequence .

Quote from: dmilligan on October 22, 2013, 11:41:55 PMGood idea, thanks.
The latest version works great, so we all have to thank you! :-)

Quote from: dmilligan on October 22, 2013, 11:41:55 PMMark the frames that you don't want to be touched (used as keyframes) with 1 star. First and last selected frames are assumed to be keyframes even if not marked. Deflicker will run the histogram matching on a ramped EV target from one keyframe to the next. "Ramp All ACR Settings" works basically the same way, except just blindly ramping all settings from one keyframe to the next.
When shooting with Nikon in manual mode and adjusting exposure along a sunset/rise you don't have any flickering (except natural light flicker) if you use a manual lens apart from the obvious jumps in brightness. Could you implement a special mode for that where the two adjacent are just matched (pull down the brighter frame by half of the difference in EV and push the darker one by the same amount) and the rest is adjusted accordingly to the surrounding keyframes? Could they be detected based on metadata?
That is why I suggested to mark them with 2 and 3 stars for the first and second image of those pairs. According to my experience with deflickering that is based on image content you can only make it worse if you have perfect source material.

Deflickering works on the histogram of the preview thumbnails that are extracted based on the current .xmp settings, right? Is it a problem if I use a super flat profile like this (http://www.magiclantern.fm/forum/index.php?topic=8816.0), if yes could you make it more robust?

Could the deflickering be sped up by working on lower resolution DNGs of the same images? That would be great since you store the DNG and original RAW files in the folder with just one .xmp file for each pair of images (or you just copy the .xmp files to another folder if the DNG and RAW file have the same name).

Would it be possible to have the deflickering only using certain parts of the frame?
The reason is that for example you want to have the shadows or general foreground flickerfree, since you don't care about the sky as much or vice versa (or you want to to deflicker them separately and merge them later in AE for ultimate smoothness).
Would it be possible to have preview window where I can draw a rectangle that specifies where the brightness is measured? If yes, could that area also be animated (for motion control shots where the camera rotates/pans)?

Could the multi-pass deflickering for best precision be automated?
With a dialogue where you select the amount of passes (you mentioned somewhere more than 3 is not necessary) and maybe a second input field for the line skipping of the last pass (if necessary, I still don't understand how that works -see below), it then does everything by itself and purges the cache automatically between the passes (I know I'll forget that half of the time...). 

What exactly does percentile do?
How does the "Line Skip" work? Does it skip lines in the histogram?
What is preview under deflickering supposed to do? I get nothing when I press it.

Any chance to get those animated gradients I mentioned? That would be tremendously useful for sunsets, milkyway and dolly shots. If you do that please implement the possibility to ramp more than one (3 linear and 2 radial ones should be more than sufficient)

Is it possible to adapt your script to stereoscopic sequences (especially the deflickering!)?

I am not sure if it is necessary, but commercial software initalises the .xmp files before working on them, I think it does that because otherwise it doesn't work reliably, for the gradients mentioned above it is probably necessary. I am not sure if you know that or if that information is of any use for you, but I thought I'd mention it.
Creating keyframes and the initialisation could also be combined into one dialogue.

Quote from: dmilligan on October 25, 2013, 01:24:43 AM
Renamed 'Ramp All ACR Settings" to 'Ramp Multiple...' and added option to select which things to ramp (like the ACR dialog when you select 'Synchronize...').
Just a suggestion for better usability - maybe you could create tabs or divide them another way like they are arranged in the Camera Raw Dialogue? Also check groups additionally to single checkboxes.
The FX-Vignetting could be added aswell for the sake of completeness (Grain is useless since it generates a static noise pattern).
The checkboxes for the colour adjustments are a bit random, why don't you order them by the name of the colour and and Hue/Sat/Lum (for example "Aqua Hue, Aqua Saturation, Aqua Luminosity")
Could you add ramping for the curves too?


Quote from: dmilligan on October 21, 2013, 02:14:56 PM
I decided to go with Br instead (hence the script I created), it's much faster. AE takes several seconds to render a RAW frame, even on low quality (this is so annoying, why adobe why?!), Br has some kind of fast preview mode that takes fractions of a second. It's just much easier and faster to do in Br.
I hope you don't mind that I pulled that quote into this thread, it seems to fit better in here.
I would love to have everything in AE instead of going back and forth between it and Bridge. Can you call Bridge from within AE for the .xmp stuff? Deflickering would take as long as full length render time of sequence (meaning hours) if done entirely in AE...
Maybe you could consider it again once the Bridge script is more mature?


Bug report (though only a minor one):
The last digit of the amount of selected images is cut in half verticaly (meaning the right half is not displayed).


Thanks for your time and keep up the good work!

Is there way to tip you for all your effort so far? I would be happy to do that if you keep the script under GPL. :-)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 25, 2013, 02:22:27 PM
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
When shooting with Nikon in manual mode and adjusting exposure along a sunset/rise you don't have any flickering (except natural light flicker) if you use a manual lens apart from the obvious jumps in brightness. Could you implement a special mode for that where the two adjacent are just matched (pull down the brighter frame by half of the difference in EV and push the darker one by the same amount) and the rest is adjusted accordingly to the surrounding keyframes? Could they be detected based on metadata?
That is why I suggested to mark them with 2 and 3 stars for the first and second image of those pairs. According to my experience with deflickering that is based on image content you can only make it worse if you have perfect source material.
But you don't have perfect source material, you have flickery source material. It has discrete jumps in it. It sounds like you don't trust my algorithm (which it's not my algorithm, just my implementation). Why don't you try it and see if it doesn't produce satisfactory results. I think the error between the calculated EV and what ACR exposure actually does (it is 'image-adaptive' apparently) is going to be larger than the error achievable with several passes of deflickering, and that will be completely automatic.
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
Deflickering works on the histogram of the preview thumbnails that are extracted based on the current .xmp settings, right?
yes
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
Is it a problem if I use a super flat profile like this (http://www.magiclantern.fm/forum/index.php?topic=8816.0), if yes could you make it more robust?
My estimate for how to convert from the color space to exposure values is probably going to be wrong if you do that. Why not deflicker first, then apply the picture style? I think that should work.
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
Could the deflickering be sped up by working on lower resolution DNGs of the same images?
No, it's spending 99.99% of it's time generating the histogram from an already lowres 8 bit bitmap. The time it takes Br to generate this preview is a tiny fraction of the total time. Really the only way to significantly speed it up is to generate this histogram natively, which I haven't found a way to do. (or get Adobe to improve the efficiency of their javascript engine)
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
Would it be possible to have the deflickering only using certain parts of the frame?
Yes, but:
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
Would it be possible to have preview window where I can draw a rectangle that specifies where the brightness is measured?
That is something I thought about and would like to do, however, that would be incredibly difficult if not impossible to do in ScriptUI. After several hours of simply trying to display an image in ScriptUI (for the percentile preview), with no success I gave up . I just write the preview to a temp file and tell it to open it.
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
Could the multi-pass deflickering for best precision be automated?
Probably. I prefer to just check between each pass to see if I need to do another one, but I can add an option to run it multiple times. I'm pretty sure I can force Br to regenerate it's previews, so that shouldn't be a problem.
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
What exactly does percentile do?
That's the percentile of the histogram that is used to match histograms. If you choose 0.7 the script tries the make the 70th percentile on each histogram all at the same brightness.
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
How does the "Line Skip" work? Does it skip lines in the histogram?
It just skips pixels in the image when calculating the histogram. Analgous to how your image sensor line skips when shooting video. The only other way to speed things up is a 'crop' which difficult to define for the reasons mentioned previously.
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
What is preview under deflickering supposed to do? I get nothing when I press it.
It should pop up an image with the deflickering percentile highlighted in red dots, to help you choose the best percentile. (This might be a windows pathname issue, I'll see if there's a cross platform way to do this)
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
Any chance to get those animated gradients I mentioned? That would be tremendously useful for sunsets, milkyway and dolly shots. If you do that please implement the possibility to ramp more than one (3 linear and 2 radial ones should be more than sufficient)
Like I said before, I think it's probably best to do stuff like that in AE. You can work with 16 or even 32 bit data in AE, so I don't see the need for trying to do this kind of stuff in ACR.
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
Just a suggestion for better usability - maybe you could create tabs or divide them another way like they are arranged in the Camera Raw Dialogue? Also check groups additionally to single checkboxes.
The way the script is set up that would be hard and add a ton of UI code that I don't really want to have. The script automatically generates all those checkboxes based on a simple list of ACR property names which is easy and requires very little code. I'd rather keep this script somewhat simple.
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
Could you add ramping for the curves too?
No, it's not a simple scalar property, it's a collection of x,y points, very hard to ramp. Explain to me mathematically how to ramp a curve defined by varying numbers of x,y points. Just use the parametric curves.
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
I would love to have everything in AE instead of going back and forth between it and Bridge.
Alt-Tab. Br has much faster previews (pretty much the only way to quickly check flicker and get your deflicker right), and the multifile ACR dialog. IDK what I would do without Br when editing timelapse/raw, it would be a huge pain in the ... without it.
Quote from: Joachim Buambeki on October 25, 2013, 02:02:57 AM
Bug report (though only a minor one):
The last digit of the amount of selected images is cut in half verticaly (meaning the right half is not displayed).
Tell Adobe to fix their buggy scripting UI
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 25, 2013, 06:11:48 PM
Tried importing to after effects, the cr2 as a sequence. This however doesn,t allow metadata to follow within every cr2 but applies only the first cr2 that pops up in acr. My last timelapse has no xmp sidecarfiles. It stores metadata inside the actual cr2. Might have something to do with it.

I really, really like the ramping script in bridge created by simply starring pics. metadata gets save quickly and I can switch between lightroom and bridge really fast.
Still exploring the deflicker option. Does a good job most of the time but started testing different percentiles which led to flicker in darker shots.
For now I export finished cr2 to jpeg which gets imported to AE and exported to prores. Works nice!
Thanks
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 25, 2013, 07:24:37 PM
Quote from: Danne on October 25, 2013, 06:11:48 PM
Tried importing to after effects, the cr2 as a sequence. This however doesn,t allow metadata to follow within every cr2 but applies only the first cr2 that pops up in acr. My last timelapse has no xmp sidecarfiles. It stores metadata inside the actual cr2. Might have something to do with it.
The ACR dialog only pops up for the first image, just ignore it and click okay, AE should still abide all the ACR metadata settings you've already set in Br for the rest of the images. Try it and see if this is not the case. I'm not sure why AE doesn't give you the multifile ACR dialog like Br does when you import a sequence, this seems to have been a blunder on Adobe's part.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 25, 2013, 08:12:47 PM
Big blunder from adobe. Tried but unlike lightroom and multfile acr in bridge and photoshop ae does not apply individual metadata in sequence import. Maybe why it,s so fast importing. This is why I trust lightroom and bridge for my postproduction with stills/timelapse much more atm...
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 25, 2013, 08:44:09 PM
Quote from: Danne on October 25, 2013, 08:12:47 PM... ae does not apply individual metadata in sequence import. Maybe why it,s so fast importing.
I can assure that AE can do this, I did it dozens of times - not sure where the problem lies but your maybe have a look in your preferences in AE or ACR.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 25, 2013, 08:57:53 PM
Yeah, maybe.
I import my sequence without xmp sidecar files. Could it be it? Information shows up in other applications though? Is there something else maybe? Tried googling it but couldn, t find any direct answers. Suggestions are welcome
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 25, 2013, 09:06:42 PM
Quote from: Danne on October 25, 2013, 08:57:53 PMI import my sequence without xmp sidecar files. Could it be it? Information shows up in other applications though? Is there something else maybe?
Yep. That is the problem, the sidecar files have to there for EVERY image. Lightroom stores those sidecars in its catalogue (or whereever...) by default, you can write them to disk with "Photo->Save metadata to file".
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 25, 2013, 09:20:41 PM
Yes, found out! Lightroom creates xmp files for camera specific raw files. However, in my workflow using dualiso cr2 the metadata is created inside the file. THis information is read by bridge and acr in photoshop but not in AE. Bummer. Now, how to create sidecarfiles for those nonspecific raws?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 25, 2013, 09:36:08 PM
I guess you're working with DNG files and not CR2 files then?!
No idea what to do then, but AFAIK you can have sidecar files with DNG aswell.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 25, 2013, 09:45:14 PM
dual iso dng:s named cr2, will try naming them back. I have some tricks using xmp sidecars created with magic lantern changing original cr2 to converted dualiso named cr2. Kind of screwy but it works :)

Can,t find out how to create sidecarfiles  for dng:s?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 25, 2013, 10:04:02 PM
Found this little plugin tool for lightroom. Creates sidecar xmps. Think it uses exiftool. Worked with AE, yey :)
http://www.robcole.com/Rob/ProductsAndServices/xEmPLrPlugin/

Oh man the rendering time in AE. Back to lightroom ;)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 25, 2013, 11:44:56 PM
Quote from: dmilligan on October 25, 2013, 02:22:27 PMBut you don't have perfect source material, you have flickery source material. It has discrete jumps in it. It sounds like you don't trust my algorithm (which it's not my algorithm, just my implementation). Why don't you try it and see if it doesn't produce satisfactory results. I think the error between the calculated EV and what ACR exposure actually does (it is 'image-adaptive' apparently) is going to be larger than the error achievable with several passes of deflickering, and that will be completely automatic.
I know that ACR is image adaptive, but I also know that adjusting metadata the way I described it works 100% (for more info see this (http://www.elysiavisuals.com/content/elysiavisuals-ramperpro-time-lapse-controller)). It is not that I don't trust you, it is just that I have a hard time believing that an(y) automatic algorithm can be better, especially for stereoscopic content (did you have a look at this?) where I suspect the deflickering to wreak havoc on a sequence because it treats each eye differently.

Quote from: dmilligan on October 25, 2013, 02:22:27 PMMy estimate for how to convert from the color space to exposure values is probably going to be wrong if you do that. Why not deflicker first, then apply the picture style? I think that should work.
Yeah, I realised I could do that this morning aswell - probably the best way around it since you don't ramp anything except WB when use use such a development setting anymway.

Quote from: dmilligan on October 25, 2013, 02:22:27 PMNo, it's spending 99.99% of it's time generating the histogram from an already lowres 8 bit bitmap. The time it takes Br to generate this preview is a tiny fraction of the total time. Really the only way to significantly speed it up is to generate this histogram natively, which I haven't found a way to do. (or get Adobe to improve the efficiency of their javascript engine)
Too bad, it was just an idea.
About getting Adobe to change anything with their software: Nice try mate. :-p (while researching for input on your HDR script I stumbled again over this (http://forums.adobe.com/thread/369637?start=0&tstart=0) - pure comedy gold...)

Quote from: dmilligan on October 25, 2013, 02:22:27 PMThat is something I thought about and would like to do, however, that would be incredibly difficult if not impossible to do in ScriptUI. After several hours of simply trying to display an image in ScriptUI (for the percentile preview), with no success I gave up . I just write the preview to a temp file and tell it to open it.
Too bad, would be really cool to have that working. I am crossing my fingers you'll find a way!

Quote from: dmilligan on October 25, 2013, 02:22:27 PMProbably. I prefer to just check between each pass to see if I need to do another one, but I can add an option to run it multiple times. I'm pretty sure I can force Br to regenerate it's previews, so that shouldn't be a problem.
Since rendering those sequences in AE takes hours if you work with 6-7K RAW files I would rather run one 20 minute high precision pass more than necessary than having to realise my sequence would have needed another final deflickering pass.

Quote from: dmilligan on October 25, 2013, 02:22:27 PMThat's the percentile of the histogram that is used to match histograms. If you choose 0.7 the script tries the make the 70th percentile on each histogram all at the same brightness.
So I should choose a percentile that represents the luminance area that I care about most (might be my shadows or mids aswell) to be flickerfree, right?

Quote from: dmilligan on October 25, 2013, 02:22:27 PMIt just skips pixels in the image when calculating the histogram. Analgous to how your image sensor line skips when shooting video. The only other way to speed things up is a 'crop' which difficult to define for the reasons mentioned previously.
That doesn't sound like it would introduce a huge margin of error. Since 3 is default I guess you recommend that?

Quote from: dmilligan on October 25, 2013, 02:22:27 PMIt should pop up an image with the deflickering percentile highlighted in red dots, to help you choose the best percentile. (This might be a windows pathname issue, I'll see if there's a cross platform way to do this)
I suspect I should get an image like this post (http://www.magiclantern.fm/forum/index.php?topic=8850.msg83925#msg83925)? There is no popup happening on my Win8 64bit CC Bridge.

Quote from: dmilligan on October 25, 2013, 02:22:27 PMLike I said before, I think it's probably best to do stuff like that in AE. You can work with 16 or even 32 bit data in AE, so I don't see the need for trying to do this kind of stuff in ACR.
Too bad if I can't change your mind about that.
I am sure an experienced colorist might be able to do something prettly close on a already highly graded high ISO file, but I can certainly say that I can't and I am sure most others can't too. Doing that within ACR on the other hand is as easy as child's play. Commercial software also supports animating those gradients by the way. If it is not too much work for you please consider implementing it.
Another point would be that you could skip using After Effects totally (by using Bridge to render out the images) with the animated gradients implemented which is a significant cost advantage for users of the script.

Quote from: dmilligan on October 25, 2013, 02:22:27 PMThe way the script is set up that would be hard and add a ton of UI code that I don't really want to have. The script automatically generates all those checkboxes based on a simple list of ACR property names which is easy and requires very little code. I'd rather keep this script somewhat simple.
No biggie, for me, it was just something that caught my attention.

Quote from: dmilligan on October 25, 2013, 02:22:27 PMNo, it's not a simple scalar property, it's a collection of x,y points, very hard to ramp. Explain to me mathematically how to ramp a curve defined by varying numbers of x,y points. Just use the parametric curves.
.xmp files support up to 12 (?) different adjustment points in a curve. If those points are all initialised first and all have the same input value, can't you ramp the output values? I just don't like the parametric curves because I get finer control over the image with the real curves (treating each RGB channel is also only possible with them - not that I used that in the past)

Quote from: dmilligan on October 25, 2013, 02:22:27 PMTell Adobe to fix their buggy scripting UI
Again, no biggie. Just thought I'd mention it.


Another thing:
Since you can access the lowres 8bit images, would it be possible to generate a fast preview clip from that? It would be splendid to render out a quick 480p/720 preview that still has all the adjustments made in ACR in very little time to see if the grading and deflickering works as one expects.


Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 25, 2013, 11:51:35 PM
By the way:
I just sent David a tip via paypal as a sign of appreciation for the time he is investing free of charge and I encourage others that use this script and want David to keep working on it to do the same aswell.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 26, 2013, 12:50:33 AM
Paypallink?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 26, 2013, 04:10:29 AM
If anyone wants to, PM me and I'll send you my email for donating with paypal.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 26, 2013, 02:56:50 PM
Quote from: Joachim Buambeki on October 25, 2013, 11:44:56 PM
So I should choose a percentile that represents the luminance area that I care about most (might be my shadows or mids aswell) to be flickerfree, right?
Yes, but statistically speaking, I think you want to try and stay as close to the median as you can. (The farther you get from the median the more effect small transients are going to have, if you think about it this makes sense)
Quote from: Joachim Buambeki on October 25, 2013, 11:44:56 PM
That doesn't sound like it would introduce a huge margin of error. Since 3 is default I guess you recommend that?
I haven't really fully tested how much error this creates, 3 is just a guess, so you're welcome to run some tests and see if you can come up with a better value. I will change the default in the script based on what you find.
Quote from: Joachim Buambeki on October 25, 2013, 11:44:56 PM
I suspect I should get an image like this post (http://www.magiclantern.fm/forum/index.php?topic=8850.msg83925#msg83925)? There is no popup happening on my Win8 64bit CC Bridge.
Try messing with line 533 in the script. That is just based on some boiler plate code I found for creating a temp file, perhaps the '/' is making it not cross-platform. Try just hard coding a valid windows path name there and see if it works.   i.e:

var tempFilename = "c:\\temp\\myfile.jpg";

If that's the problem, I'll try and see if there's a more cross platform way to handle file names in the API.
Quote from: Joachim Buambeki on October 25, 2013, 11:44:56 PM
Too bad if I can't change your mind about that.
.xmp files support up to 12 (?) different adjustment points in a curve. If those points are all initialised first and all have the same input value, can't you ramp the output values? I just don't like the parametric curves because I get finer control over the image with the real curves (treating each RGB channel is also only possible with them - not that I used that in the past)
Again, no biggie. Just thought I'd mention it.
I'll look into these. The main issue is that these are not simple scalar properties in xmp, so I'd have write specialized code for ramping them instead of being able to reuse the same generic code to ramp any simple scalar property (with those the only thing have to change is the 'name' of the property, so I just have a list of all properties and loop through it applying the ramp with the same code)
Quote from: Joachim Buambeki on October 25, 2013, 11:44:56 PM
Another thing:
Since you can access the lowres 8bit images, would it be possible to generate a fast preview clip from that? It would be splendid to render out a quick 480p/720 preview that still has all the adjustments made in ACR in very little time to see if the grading and deflickering works as one expects.
Good idea! It's easy to save the previews to a low res jpg, that should make it easy to do a fast render, could also be useful for fast proxies. (Also, I've found that I can preview in Br by just holding down the arrow key to fast scroll through the previews)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 27, 2013, 10:43:09 PM
Quote from: Joachim Buambeki on October 25, 2013, 11:44:56 PM
Too bad if I can't change your mind about that.
I am sure an experienced colorist might be able to do something prettly close on a already highly graded high ISO file, but I can certainly say that I can't and I am sure most others can't too. Doing that within ACR on the other hand is as easy as child's play. Commercial software also supports animating those gradients by the way. If it is not too much work for you please consider implementing it.
After trying for a little while, I cannot figure out how to read and write the xmp metadata for gradient corrections. Documentation for Adobe's xmp API is pretty much useless, I just can't make sense of it (reading the other values was possible b/c I found enough example code out there to do it). As I would never use this myself, and there are other ways to do this, I don't see much of a reason to keep trying.

I think there are lots of easy ways to do what you are trying to do in AE:
Duplicate your sequence so that you have two different ones.
Give one set the ACR settings for one side of you gradient, give the other the ACR settings for the other part of the gradient.
Import these into two different layers in AE, then you can blend between the two with a simple gradient layer mask of your choosing. You can make the layer mask look like anything you want, so you're not just limited to linear or radial. You can use all of the great animation tools in AE to control the movement of this mask, you can even link it up to a motion track to have it move automatically. This is what I would do if I was trying to do what you are talking about. It's so much easier, powerful, and flexible to do it this way. I also see absolutely no reason this would produce inferior results in terms of quality.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 28, 2013, 12:53:55 AM
Thanks for your effort so far.
Unfortunatelly the solution is not that simple.
If you reopen the ACR in AE to AE to change the settings you're working on the Camera RAW Sequence in the "Projects" panel NOT on the duplicated layer you chose. This means of course that the changes will be visible not only in that duplicate layer.
The alternative then would be to import the sequence twice, but this means I would need a second copy in a different folder with second set of ramped .xmp files which is not really what I would consider a smooth workflow experience. Also nothing would be linked to one another (let's say my sky has always to be a bit warmer than the forground but I am ramping the white balance of the foreground).

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 28, 2013, 02:30:07 AM
Quote from: Joachim Buambeki on October 28, 2013, 12:53:55 AM
The alternative then would be to import the sequence twice, but this means I would need a second copy in a different folder with second set of ramped .xmp files which is not really what I would consider a smooth workflow experience. Also nothing would be linked to one another
That's what I'm talking about, duplicate of all the files. I realize it's somewhat of a hassle, but it is at least possible, and not too difficult to do it like this. (It's at least easier than figuring out Adobe's XMP API)

WB is really the only thing that is absolutely necessary to do in ACR like this (it's pretty much the only thing that is a 'destructive' part of the debayer process). If you just need to do something simple like adjust exposure, saturation, contrast, etc. you can use an adjustment layer with a mask in AE: http://forums.adobe.com/message/4623729
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 28, 2013, 07:53:30 PM
I always get:
QuoteReference Error: k is undefined
when I run the deflickering at the same frame.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 28, 2013, 10:03:31 PM
Quote from: Joachim Buambeki on October 28, 2013, 07:53:30 PM
I always get:when I run the deflickering at the same frame.
Should be fixed now, I also added auto keyframing for deflicker and there's some code to do multiple iterations, but I haven't figured out how to purge the preview cache yet so it's disabled.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 28, 2013, 10:38:23 PM
Quote from: dmilligan on October 28, 2013, 10:03:31 PM
Should be fixed now, I also added auto keyframing for deflicker and there's some code to do multiple iterations, but I haven't figured out how to purge the preview cache yet so it's disabled.
Thanks. Why is the auto keyframing in the deflicker module?!
Am I not supposed to adjust image parameters on every keyframe according to my liking and THEN run the deflickering? Wouldn't it make sense to create keyframes before the deflickering because of that? I am confused.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 28, 2013, 11:08:11 PM
Wow! good progress. Multiple ramping, nice! Question. What is auto keyframing suppose to do?
Thanks again for this!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 28, 2013, 11:42:52 PM
Hi again. Workflow question.
Will ramping reset the deflicker runs? Tried deflicker, then running a multiple ramp. This resets my deflicker exposure values to follow exposure ramp. Would be nice to keep the deflicker settings and ramp from those instead of resetting.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 29, 2013, 02:09:08 AM
Quote from: Joachim Buambeki on October 28, 2013, 10:38:23 PM
Thanks. Why is the auto keyframing in the deflicker module?!
Okay, now I don't really understand what you want it for. If you're going to manually edit settings for keyframes, how much more difficult is it to mark that keyframe with a star? I figured the auto keyframing thing would only be very useful if you were trying to do everything automatically, and it only makes sense for deflickering. For ramping you have to manually edit each keyframe anyway.

Quote from: Danne on October 28, 2013, 11:42:52 PM
Hi again. Workflow question.
Will ramping reset the deflicker runs? Tried deflicker, then running a multiple ramp. This resets my deflicker exposure values to follow exposure ramp. Would be nice to keep the deflicker settings and ramp from those instead of resetting.

If you want to change the exposure after a deflicker you need to use the single ramp and check the 'additive' checkbox. If you want to do a ramp multiple after deflicker, you need to uncheck the Exposure2012, so that it is not modified.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 29, 2013, 06:52:08 AM
Thank you!
Your script is amazing. Multiple ramping, additive setting. Together with ML and the dual-iso one can really get the timelapse workflow cooking.
Before you explained the additive method I tried exporting to jpeg and tiff, then applying ramping and shows the script works for those filetypes as well within the acr module.
Thanks
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 29, 2013, 08:45:14 AM
Quote from: dmilligan on October 29, 2013, 02:09:08 AM
Okay, now I don't really understand what you want it for. If you're going to manually edit settings for keyframes, how much more difficult is it to mark that keyframe with a star? I figured the auto keyframing thing would only be very useful if you were trying to do everything automatically, and it only makes sense for deflickering. For ramping you have to manually edit each keyframe anyway.

My idea was as following:
- Run the part (that isn't yet implemented in that way) of your script that creates keyframes (I would prefer to be able to choose the number of keyframes that are then evenly distributed instead of every n-th frame) 
- choose the 1* filter in Bridge so only the keyframes are displayed
- Ctrl+A to select all of them
- open them in ACR and adjust until it looks good
- apply deflicker if needed
- render out

The auto set keyframes would just be there for a more convenient workflow, nothing more.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 30, 2013, 03:00:55 AM
Some updates:
I figured out how to do a fast resize, so I'm using that to improve speed rather than line skipping, you'll now see an 'Analysis Size' option, this is the size in pixels to shrink the longest side down to. Default is 200, you might get away with 100, it's pretty fast.

You can specify a crop for the histogram analysis. You just have to enter x,y,width,height (in percent), no way to allow you to draw it with some sort of UI, but the preview will draw the crop box so at least you can see where it is.

You specify max iterations, rather than iterations, the script wont do another iteration if it thinks it doesn't need to (the histograms are already as close as it can make them). If the script thinks there is still potential room for improvement after max iterations have been reached, it will popup a message box indicating this.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 30, 2013, 06:56:09 AM
Awesome! Gonna try this tonight
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 30, 2013, 10:00:21 AM
Quote from: dmilligan on October 30, 2013, 03:00:55 AM
Some updates:
...
You can specify a crop for the histogram analysis. You just have to enter x,y,width,height (in percent), no way to allow you to draw it with some sort of UI, but the preview will draw the crop box so at least you can see where it is.
...
Great update, would you please give me the line in the script to hardcode the folder to enable the preview? It's not 533 anymore.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 30, 2013, 12:09:04 PM
Quote from: Joachim Buambeki on October 30, 2013, 10:00:21 AM
Great update, would you please give me the line in the script to hardcode the folder to enable the preview? It's not 533 anymore.
Just search for "var tempFilename ="
Did hardcoding it work for you? If so I might be able to make a cross platform solution, perhaps the 'Folder.temp' property is wrong on windows. I can't actually find any documentation for that property, I just found an example of someone using it and it seems to work at least on mac.
Try this:

var tempFilename = ".PercentilePreview.jpg";

This should just put it in the current directory so we don't have to worry about / vs. \ and temp folders being wrong.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 30, 2013, 09:25:53 PM
Quote from: dmilligan on October 30, 2013, 12:09:04 PM
Just search for "var tempFilename ="
Did hardcoding it work for you?
Didn't get to try it before. With the latest version and the modification Bridge hangs if I press the "Preview" button - before the modification it just didn't do anything if pressed.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 30, 2013, 09:39:31 PM
Try it now as is, run the script from the ExtendScript Toolkit (not as a startup script), I've included some debug info, it should display the filename of the temp file in the upper right console log. Send me the output from that.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 30, 2013, 09:40:47 PM
tried your fine script again. Deflickering is really much slower now with the new algorithm.
Actually with two iterations with the older 3 line skipping it was very fast and accurate. Didn,t clock or any extensive comparisons but the former method is about five times faster. How fast would lineskipping be with crop? Preview works fine here
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 30, 2013, 09:56:09 PM
Try making the preview smaller
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 30, 2013, 10:07:39 PM
I have run on analyse size 100, 50, even 30 but it,s still quite slow compared to the old one. I noticed that with two iterations and the former script it gets the job done. Problem is I can,t change iteration number in the old script. The number 1 is greyed out?

old script(greyed out)
(http://s22.postimg.org/ry9mu33bh/Ska_rmavbild_2013_10_30_kl_22_32_52.jpg) (http://postimg.org/image/ry9mu33bh/)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 30, 2013, 10:38:09 PM
Yeah, I didn't have it working yet. I'll look into it and see if I can figure out what's slowing it up, seemed to go pretty fast for me.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 30, 2013, 11:01:12 PM
Haha, I accidentally deleted the actual resize part, no wonder it's slow. It should be fixed now. (I made that change in a sleepy stupor right before bed last night)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 30, 2013, 11:18:57 PM
lol, I,ll try again
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 30, 2013, 11:31:42 PM
Quite a difference now :) Works great. Ran 3 iterations and got completetly flickerfree results. One thing. When opening preview it also opens up the software extendScript toolkit?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 31, 2013, 01:52:04 AM
I put some code to write some debug info in the console to try and track down JB's issue, I guess it automatically opens extendscript if you do that, you can just comment out any lines that start with $.writeln.  I'll take it out once we figure it out.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 31, 2013, 02:19:46 AM
Quote from: dmilligan on October 30, 2013, 09:39:31 PMTry it now as is, run the script from the ExtendScript Toolkit (not as a startup script), I've included some debug info...
Quote from: dmilligan on October 31, 2013, 01:52:04 AM
I put some code to write some debug info in the console to try and track down JB's issue, I guess it automatically opens extendscript if you do that, you can just comment out any lines that start with $.writeln.  I'll take it out once we figure it out.
Thanks, will run some tests tomorrow. Gotta go to bed now.

Another thing:
Could you add adjustments that divide the deflickering into:
- average exposure = how much the algorithm tries to straighten out the exposure graph
- deflicker strength = how agressive the algorithm is adjusting the exposure to the average exposure

Why?
I am working on a sequence where the sky is free from any flicker but the foreground in on the other hand is flickering because of clouds (that aren't in the frame) that cast large shadows. I am now running a render where I am blending those two together in AE but I wanted to keep some of the flicker on the foreground trying to make it look similar to how the human eye with its adaptive vision would see it (if one could see in timelapse, hehe). I did that by just weakening the flicker (with commercial software) instead of trying to get rid of it totally.
Could you implement that? Feel free to come up with better names for those options.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on October 31, 2013, 07:39:16 AM
Playing with cool script here. Great work. The best of all it that it accounts for adjustments made. Supercool.

But I think deflicker is not changing keyframes. And IMHO it should - otherwise deflikering is not working correctly if several keyframes are set for changing color temperature for example.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on October 31, 2013, 01:55:30 PM
Quote from: itsskin on October 31, 2013, 07:39:16 AMBut I think deflicker is not changing keyframes. And IMHO it should - otherwise deflikering is not working correctly if several keyframes are set for changing color temperature for example.
From my perspective it is working exactly as it should.
By adjusting the exposure of the keyframe and the deflickering adjust the surrounding frames to that target - if you don't touch your exposure this is your target. Just open all the keyframes in ACR and bring the exposure/brightness close to each other.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 31, 2013, 02:06:23 PM
Quote from: Joachim Buambeki on October 31, 2013, 02:19:46 AM
- average exposure = how much the algorithm tries to straighten out the exposure graph
In terms of the way this algorithm works, I can't make sense of what you mean by this. The algorithm simply matches where a particular percentile falls on the histogram from one frame to the next. I'm not sure what you mean by 'exposure graph'.
Quote from: Joachim Buambeki on October 31, 2013, 02:19:46 AM
- deflicker strength = how agressive the algorithm is adjusting the exposure to the average exposure
I could easily implement something like this (see the 'evCoefficient' at the top of the script, simply make it smaller), but...
Quote from: Joachim Buambeki on October 31, 2013, 02:19:46 AM
I am now running a render where I am blending those two together in AE but I wanted to keep some of the flicker on the foreground trying to make it look similar to how the human eye with its adaptive vision would see it (if one could see in timelapse, hehe).
If you're already making two different layers, you could just only partially blend the ground of fully deflickered footage (i.e. your layer mask makes the sky of the original 100% opaque, and the ground 50% or whatever). That should be basically the same I should think.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on October 31, 2013, 02:33:03 PM
Quote from: Joachim Buambeki on October 31, 2013, 01:55:30 PM
From my perspective it is working exactly as it should.
By adjusting the exposure of the keyframe and the deflickering adjust the surrounding frames to that target - if you don't touch your exposure this is your target. Just open all the keyframes in ACR and bring the exposure/brightness close to each other.

My keyframes looks like skipped in deflicker algorithm...
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 31, 2013, 03:13:49 PM
Quote from: itsskin on October 31, 2013, 02:33:03 PM
My keyframes looks like skipped in deflicker algorithm...
Exactly, they're keyframes, the deflicker algorithm does not touch them, it uses them as a reference to make the images around them try to look the same. That's the whole point. When you mark a frame as a keyframe you are saying 'I want the other frames to look like this'.  The algorithm measures the specified percentile on the histogram of the keyframes, this gives a grayscale color level 0-255, for example 127. It then tries to match the histogram percentile of all the frames inbetween the keyframes to this target that is interpolated linearly (ramped) from one keyframe to the next. For example: frame 0 and 30 are keyframes. frame 0 measures the percentile at 100, frame 30 measure the percentile at 130. The script will then try to make the percentile of frame 1 at 101, frame 2 102, frame 3 103 and so on.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on October 31, 2013, 03:44:07 PM
Quote from: dmilligan on October 31, 2013, 03:13:49 PM
Exactly, they're keyframes, the deflicker algorithm does not touch them, it uses them as a reference to make the images around them try to look the same. That's the whole point. When you mark a frame as a keyframe you are saying 'I want the other frames to look like this'.  The algorithm measures the specified percentile on the histogram of the keyframes, this gives a grayscale color level 0-255, for example 127. It then tries to match the histogram percentile of all the frames inbetween the keyframes to this target that is interpolated linearly (ramped) from one keyframe to the next. For example: frame 0 and 30 are keyframes. frame 0 measures the percentile at 100, frame 30 measure the percentile at 130. The script will then try to make the percentile of frame 1 at 101, frame 2 102, frame 3 103 and so on.

I guess I wanted to say that I get flicker around keyframes. Anyway, I'll play a little bit more with it and report back. Thx for clarification!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on October 31, 2013, 05:02:28 PM
I'm running script on sequence of 600 images and it randomly can stuck "Processing xxxxx.CR2". Both in CS6 and CC. Any ideas how to avoid this?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 31, 2013, 05:35:20 PM
Quote from: itsskin on October 31, 2013, 03:44:07 PM
I guess I wanted to say that I get flicker around keyframes. Anyway, I'll play a little bit more with it and report back. Thx for clarification!

I had to run the deflicker program about three times to get excellent results.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on October 31, 2013, 06:17:41 PM
Here is what I'm talking about.
Check 8340 (keyframe) and 8341 transition:
(https://dl.dropboxusercontent.com/u/17452116/Screen%20Shot%202013-11-01%20at%2001.04.31%20.jpg)
This is not deflickered sequence. ETTR decided to go from 5 sec in 8340 to 4 sec in 8341.

This is what happens with defliker after after 1, 5, 10 iterations. All the same result:
(https://dl.dropboxusercontent.com/u/17452116/Screen%20Shot%202013-11-01%20at%2001.02.56%20.jpg)
Script just continue to underexpose 8341, instead of adding exposure.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 31, 2013, 06:23:52 PM
Strange. Should level the exposures more
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on October 31, 2013, 06:35:12 PM
Yes. keyframe is 0 EV and next one is -1.2 EV.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 31, 2013, 06:44:59 PM
I see you that you have a "star" on 8340, what,s the reason for that? Could this affect the outcome since it will become a keyframe handle
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on October 31, 2013, 06:51:44 PM
It is keyframe, yes. I have 4 of them. First and Last images of the sequence and 2 in the middle to handle some WB and other adjustments transition. So 8341 should have been matched to 8340 keyframe. Instead it's going to opposite direction.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on October 31, 2013, 06:58:24 PM
WHat happens if you deflicker everything without any starred keyframes and after that you start apply ramping and such? You could keep the first and last frame alone as your keypoints after deflicker and create a ramping additive exposure after deflickering right?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 31, 2013, 07:22:40 PM
@itsskin
Can you help me debug this? here's what I need you to do:
Edit the script (any text editor will do) and uncomment all the lines that you see $.writeln commented out, i.e. if you see something like:

  //$.writeln(...);

take out the double slashes and change it to

  $.writeln(...);

(a simple find and replace should do the trick: find: //$.writeln  replace: $.writeln)

When the script runs, the ExtendScript Toolkit (you might have to install it if you don't already) should pop up. In the upper right corner of that window is a console, the script will print a bunch of debug information there, send me that information (just one iteration should be fine).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on October 31, 2013, 08:21:26 PM
In case PM didn't work (can't see any sent folder) I'll post it here too:


*** Iteration 1 ***
keyframe 108B8326.CR2: 201
keyframe 108B8340.CR2: 193
108B8327.CR2: 0.1546200767843ev (200.764705882353 - 197)
108B8328.CR2: 0.18067945827999ev (200.529411764706 - 195)
108B8329.CR2: 0.21202748185588ev (200.294117647059 - 192)
108B8330.CR2: 0.05213793341141ev (200.058823529412 - 202)
108B8331.CR2: 0.06745294370828ev (199.823529411765 - 200)
108B8332.CR2: -0.03123530744516ev (199.588235294118 - 206)
108B8333.CR2: 0.05064978091786ev (199.352941176471 - 200)
108B8334.CR2: 0.00853158892045ev (199.117647058824 - 202)
108B8335.CR2: 0.14161791784376ev (198.882352941176 - 192)
108B8336.CR2: 0.14326958944278ev (198.647058823529 - 191)
108B8337.CR2: 0.14499630687368ev (198.411764705882 - 190)
108B8338.CR2: 0.06662311624361ev (198.176470588235 - 195)
108B8339.CR2: 0.20509297546206ev (197.941176470588 - 185)
keyframe 108B8359.CR2: 108
108B8341.CR2: -0.21309330529631ev (155.5 - 168)
108B8342.CR2: -0.14492432038395ev (153 - 162)
108B8343.CR2: -0.1103221428348ev (150.5 - 158)
108B8344.CR2: -0.07466635013191ev (148 - 154)
108B8345.CR2: -0.13249812473191ev (145.5 - 155)
108B8346.CR2: -0.09706680509338ev (143 - 151)
108B8347.CR2: -0.06049204923087ev (140.5 - 147)
108B8348.CR2: -0.06276926647353ev (138 - 145)
108B8349.CR2: -0.00426795118219ev (135.5 - 140)
108B8350.CR2: 0.4452787722787ev (133 - 118)
108B8351.CR2: 0.50003196481029ev (130.5 - 114)
108B8352.CR2: 0.55728057295068ev (128 - 110)
108B8353.CR2: 0.61724619877515ev (125.5 - 106)
108B8354.CR2: 0.62414957439629ev (123 - 104)
108B8355.CR2: 0.63092798851693ev (120.5 - 102)
108B8356.CR2: 0.66657285856446ev (118 - 99)
108B8357.CR2: 0.6935730813898ev (115.5 - 96)
108B8358.CR2: 0.22152619213017ev (113 - 111)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 31, 2013, 08:53:02 PM
Thanks for your help, figured it out, try the script now.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 01, 2013, 04:19:57 AM
It worked! Really smooth transitions now. Except small glitch with 1st keyframe and second after it.
keyframe is +0.9 EV, second frame is +0.22 EV. But after this it's flawless. Thank you!

(https://dl.dropboxusercontent.com/u/17452116/Screen%20Shot%202013-11-01%20at%2011.11.37%20.jpg)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 01, 2013, 04:50:47 AM
@JB,
I finally figured out the gradient corrections (GND, Radial filters) thingy in XMP API, so I added it to the script.
Caveat: All frames must already have the same number of gradient corrections applied before running (just 'synchronize' from the first frame in ACR dialog once you've created the gradient correction, then modify it in each keyframe).

Basically the problem is I can read/write the settings for gradients but I can't figure out how to create them if they don't exist, so they have to already be there in the XMP or the script will fail.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 01, 2013, 04:03:52 PM
Quote from: dmilligan on November 01, 2013, 04:50:47 AM
@JB,
I finally figured out the gradient corrections (GND, Radial filters) thingy in XMP API, so I added it to the script.
Caveat: All frames must already have the same number of gradient corrections applied before running (just 'synchronize' from the first frame in ACR dialog once you've created the gradient correction, then modify it in each keyframe).
AWESOME! I will try it and report back here, I will laos have a look at the debugging stuff you posted before.


Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 01, 2013, 10:28:54 PM
Flickerfree:)
Pretty demanding timelapse. Camera stopped in the middle causing a longer pause and ettr creates small steps of flicker. Weather conditions changes etc. The script took care of it all. Splendid.
Posted another version of this timelapse a while ago when using xmp sidecarfiles. Also worked but not as good as with the script.

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 01, 2013, 11:02:23 PM
Quote from: dmilligan on October 30, 2013, 09:39:31 PMTry it now as is, run the script from the ExtendScript Toolkit (not as a startup script), I've included some debug info, it should display the filename of the temp file in the upper right console log. Send me the output from that.
Sorry, I don't know what the "ExtendScript Toolkit" is and how to use it, could you give me a link with more detailed description, all I found is this (http://www.adobe.com/support/downloads/detail.jsp?ftpID=3205) (which is from 2006).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 01, 2013, 11:24:22 PM
Says here you get it bundled with adobe premiere pro cs6
http://forums.adobe.com/message/4823346
I have it in my application folder, maybe it could work as a standalone application?
What version of adobe are you uisng? Mac?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 01, 2013, 11:34:56 PM
Quote from: dmilligan on October 31, 2013, 02:06:23 PM
In terms of the way this algorithm works, I can't make sense of what you mean by this. The algorithm simply matches where a particular percentile falls on the histogram from one frame to the next. I'm not sure what you mean by 'exposure graph'.
Okay, let me call it average brightness of each frame.
I f I am not mistaken if there is flicker between keyframes, the algorithm evens that out - no matter what, especially with multiple passses.
With my proposed method, it would just reduce the flicker leading to a more natural result. This is important when there are clouds blocking the sunlight and the exposure decreases significantly, for a natural result one would like to have a darker image in the shadow, but not 3EV darker as it was in reality.
(http://imageshack.us/a/img35/1570/f0tz.png)
Red graph = average image brightness (per frame)
Green graph = brutally averaged brightness target
Blue graph = gentle brightness target for pleasing and natural results©
Black bars = keyframes
The blue graph could be adjusted to anything in between from beeing like the red one (no changed brightness target) or the green one (smoothed out totally).
The deflickering strength then determines how hard the algorithm tries to match that target graph.

Do you understand now what I mean?


Quote from: dmilligan on October 31, 2013, 02:06:23 PMI could easily implement something like this (see the 'evCoefficient' at the top of the script, simply make it smaller), but...
...
If you're already making two different layers, you could just only partially blend the ground of fully deflickered footage (i.e. your layer mask makes the sky of the original 100% opaque, and the ground 50% or whatever). That should be basically the same I should think.
That would be possible, but in my case that means adding 50% more render time to that particular render and having to manage another iteration of the same sequence (3 instead of 2). I am also not sure if the blending would lead to the same natural looking results that you get with proper deflickering because that exposure slider of ACR acts really filmlike (in the sense of how chemical film behaves).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 01, 2013, 11:36:13 PM
Two feature requests:

Could you implement a check for settings that can't be ramped?
If there are conflicting settings, a dialogue pops up where the user can decide which one to keep. If that is not possible with the script then a reminder what to change would be good.
Examples:
Curves
Camera calibration
Lens profile
If you forget to sync those earlier this screws up your shot.


Would it be possible to create snapshots of the recent .xmp data? If I decide to alter the settings but want to keep the old ones aswell it would be nice to back them up with a right click.
If that is possible, what do you think of the idea to create a folder with the .xmp files and implement a dialogue where one can to load stored sets of .xmp files?
That would be handy to try and compare different developing styles quickly.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 01, 2013, 11:47:46 PM
Quote from: Danne on November 01, 2013, 11:24:22 PM
Says here you get it bundled with adobe premiere pro cs6
http://forums.adobe.com/message/4823346
I have it in my application folder, maybe it could work as a standalone application?
What version of adobe are you uisng? Mac?
Thanks, I'll look into it, stuff like that is always giving me a headache...
I am on Win8.1 64bit , first CC version.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 02, 2013, 04:42:45 PM
Quote from: Danne on November 01, 2013, 10:28:54 PM
Flickerfree:)
Pretty demanding timelapse. Camera stopped in the middle causing a longer pause and ettr creates small steps of flicker. Weather conditions changes etc. The script took care of it all. Splendid.

:) Awesome!!

Keep 'em coming, I love to see what you guys are doing with this script!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: a1ex on November 02, 2013, 05:05:05 PM
Yeah, robust statistics are really powerful. Now I guess I can just focus on a Python version to provide a fully open source workflow, and then post deflicker can be removed from ML and replaced by PC tools.

Great job!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 02, 2013, 07:10:48 PM
If the last bug would be addressed when scrip ignores the first keyframe as per my previous post - it would be 100% awesome.
That's what I managed to get with current version:
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 03, 2013, 09:37:31 PM
Quote from: itsskin on November 02, 2013, 07:10:48 PM
If the last bug would be addressed when scrip ignores the first keyframe as per my previous post - it would be 100% awesome.
That's what I managed to get with current version:
Nice!

Can you send me the debug info again? I'll see if I can fix it.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 03, 2013, 11:36:02 PM
Quote from: itsskin on November 02, 2013, 07:10:48 PM
If the last bug would be addressed when scrip ignores the first keyframe as per my previous post - it would be 100% awesome.
That's what I managed to get with current version:
YOUTUBE
Lookin' good!

I am still trying to get the animated radial gradient to work, the linear one works as expected based on my obersavtions so far.
I am starting to suspect there is a bug in Bridge itself:
If I create a radial gradient (for this particular example I chose one with -3EV to make it REALLY visible) and press "sync everything" (including local adjustments) NOTHING happens.

Can you replicate that issue in some way David?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 04, 2013, 06:16:12 AM
Quote from: dmilligan on November 03, 2013, 09:37:31 PM
Nice!

Can you send me the debug info again? I'll see if I can fix it.

I replicated the issue and now it looks different. Second frame is OVERexposed. But still seems because of first keyframe is ignored. Keyframe is +1 EV, second is +6.

Initial sequence with 4 keyframes:
(https://dl.dropboxusercontent.com/u/17452116/1.%20Initial%20sequence%20with%204%20keyframes.jpg)

Ramp All:
(https://dl.dropboxusercontent.com/u/17452116/2.%20Ramped.jpg)

Settings:
(https://dl.dropboxusercontent.com/u/17452116/3.%20Settings.jpg)

Result:
(https://dl.dropboxusercontent.com/u/17452116/4.%20Deflickered.jpg)

Iterations log: https://dl.dropboxusercontent.com/u/17452116/10%20Iterations.rtf
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 04, 2013, 12:12:58 PM
I can't help with any debugging info, because I still don't get how to create it but I am having the same issue as itsskin.
My keyframes are in the range of +-0.3EV and the deflickered frames are SEVERELY underexposed in one pass and overexposed in the next one.
See here. (https://www.dropbox.com/s/au8jlsdwtxfunbj/deflicker.jpg)

I also noticed that Bridge is seems very unstable/unresponsive since the iteration of your script with gradient ramping.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 04, 2013, 05:14:03 PM
Quote from: Joachim Buambeki on November 04, 2013, 12:12:58 PM
I can't help with any debugging info, because I still don't get how to create it but I am having the same issue as itsskin.
You should see it in the CC application manager/installer or whatever they call that program. Just click 'install' (like you would to install any other CC component, like Ps, Ae, Pr, Sg, Dw, etc).

Quote from: Joachim Buambeki on November 04, 2013, 12:12:58 PM
I also noticed that Bridge is seems very unstable/unresponsive since the iteration of your script with gradient ramping.
Strange, does it still happen without the script loaded? Can you reliably reproduce it by loading this version of the script vs. the old version?

Quote from: Joachim Buambeki on November 01, 2013, 11:34:56 PM
Okay, let me call it average brightness of each frame.
Technically it's not the average, but the median (or some other percentile of your choosing, median is simply the 50th percentile), which is much more statistically robust than the mean. Notice how the median is the same between the two different statistical distributions on this graph, while the mean and mode are different (a histogram is a type of statistical distribution)

(http://upload.wikimedia.org/wikipedia/commons/thumb/d/de/Comparison_mean_median_mode.svg/500px-Comparison_mean_median_mode.svg.png)
Quote from: Joachim Buambeki on November 01, 2013, 11:34:56 PM
I f I am not mistaken if there is flicker between keyframes, the algorithm evens that out - no matter what, especially with multiple passses.
With my proposed method, it would just reduce the flicker leading to a more natural result. This is important when there are clouds blocking the sunlight and the exposure decreases significantly, for a natural result one would like to have a darker image in the shadow, but not 3EV darker as it was in reality.
Your two different parameters are exactly the same thing in terms of this algorithm. You can either correct the exposure completly to the target or not by some amount. Change this by adjusting the coefficient I mentioned. Make it smaller. 2 / log(2) is the best estimation of the ACR black box that I've found, it would represent 100% deflicker (or at least as close as we can get by guessing). 1 / log(2) would be like 50% deflicker. 0 / log(2) would be no deflicker at all.

Quote from: Joachim Buambeki on November 01, 2013, 11:36:13 PM
Would it be possible to create snapshots of the recent .xmp data? If I decide to alter the settings but want to keep the old ones aswell it would be nice to back them up with a right click.
If that is possible, what do you think of the idea to create a folder with the .xmp files and implement a dialogue where one can to load stored sets of .xmp files?
That would be handy to try and compare different developing styles quickly.
Yes, that should be possible assuming Br always uses the sidecars and doesn't ever store the metadata directly in the files, which has always been the case in my experience.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 04, 2013, 10:59:18 PM
Quote from: itsskin on November 04, 2013, 06:16:12 AM
I replicated the issue and now it looks different. Second frame is OVERexposed. But still seems because of first keyframe is ignored. Keyframe is +1 EV, second is +6.

Thanks, I think I figured it out. Try it now.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 04, 2013, 11:06:52 PM
Quote from: Joachim Buambeki on November 03, 2013, 11:36:02 PM
Lookin' good!

I am still trying to get the animated radial gradient to work, the linear one works as expected based on my obersavtions so far.
I am starting to suspect there is a bug in Bridge itself:
If I create a radial gradient (for this particular example I chose one with -3EV to make it REALLY visible) and press "sync everything" (including local adjustments) NOTHING happens.

Can you replicate that issue in some way David?

I can create and synchronize the radial gradients just fine (ACR 8.2.094). They actually don't work with the script though, I figured the tag names would be the same, and I didn't actually test the radial, but they're not the same, so I'll add them, should be pretty much the same code as the linear ones, just with slightly different tags.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 04, 2013, 11:40:48 PM
Quote from: dmilligan on November 04, 2013, 11:06:52 PMI can create and synchronize the radial gradients just fine (ACR 8.2.094). They actually don't work with the script though, I figured the tag names would be the same, and I didn't actually test the radial, but they're not the same, so I'll add them, should be pretty much the same code as the linear ones, just with slightly different tags.
Thanks for letting me know. I will wait for the next update with the radial filters and the fix for itsskins and my problem with the deflickering before I start trying to isolate the problems only I seem to have.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 05, 2013, 01:17:28 AM
Quote from: dmilligan on November 04, 2013, 05:14:03 PMYour two different parameters are exactly the same thing in terms of this algorithm. You can either correct the exposure completly to the target or not by some amount. Change this by adjusting the coefficient I mentioned. Make it smaller. 2 / log(2) is the best estimation of the ACR black box that I've found, it would represent 100% deflicker (or at least as close as we can get by guessing). 1 / log(2) would be like 50% deflicker. 0 / log(2) would be no deflicker at all.
If I understand you correctly you would just need a "strength slider" that changes the coefficient in the script and that would take care of my "blue graph" in my improvised painting, right?

Quote from: dmilligan on November 04, 2013, 05:14:03 PMYes, that should be possible assuming Br always uses the sidecars and doesn't ever store the metadata directly in the files, which has always been the case in my experience.
That should only be true if you work with DNG files, right? With native RAW files like CR2 or NEF Adobe can't store any metadata within those file formats and has to store them in the sidecar files if I am not mistaken.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 05, 2013, 02:50:43 AM
Quote from: Joachim Buambeki on November 04, 2013, 11:40:48 PM
Thanks for letting me know. I will wait for the next update with the radial filters and the fix for itsskins and my problem with the deflickering before I start trying to isolate the problems only I seem to have.
Problem fixed, also added backup xmp option.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 05, 2013, 08:34:09 AM
Hi!
Tried the gradient tool and ramping. Worked perfect. Awesome! I,m on cs 6 and acr 8.2.0.94

How,s the xmp backup sidecars suppose to work? Selected a folder but no xmps are created? Is it suppose to work with dng files or only original cr2?

Thanks for still developing this superb tool

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 05, 2013, 10:17:09 AM
Tested the new version and no bugs so far. Thank you. Great work!!!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 05, 2013, 12:58:48 PM
Quote from: Danne on November 05, 2013, 08:34:09 AM
How,s the xmp backup sidecars suppose to work? Selected a folder but no xmps are created? Is it suppose to work with dng files or only original cr2?
I guess Adobe stores metadata directly in the dng instead of sidecars, so that's why it's not working. Verify there are actually .xmp sidecar files for what you're trying to backup. Otherwise it could be some file path issues I need to work out (all this really does is copy the *.xmp files to the folder you select).

I think there might still be a way to backup the metadata even if it's embeded in the dng. I'm looking into this.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 05, 2013, 02:24:52 PM
Quote from: dmilligan on November 05, 2013, 02:50:43 AMadded backup xmp option.
This keeps getting better and better!

It seems I still have issues with the deflickering not working correctly, but I need to rule out errors on my side first before starting to complain.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 05, 2013, 04:56:25 PM
Tried to Ramp All on 1700 images, got this error:

(https://dl.dropboxusercontent.com/u/17452116/Screen%20Shot%202013-11-05%20at%2023.45.19%20.jpg)

Found the problem: 1 folder was selected within the sequence.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 05, 2013, 05:28:24 PM
No error messages, but something is still going wrong:
(https://dl.dropboxusercontent.com/u/17452116/Screen%20Shot%202013-11-06%20at%2000.16.15%20.jpg)

First white frame XMP file: https://dl.dropboxusercontent.com/u/17452116/_08B8132.xmp
The first white is just after second keyframe. Other non-whites are keyframes also.

Managed to Ramp Multiply selecting less files using keyframes as first and last. Running deflicker process on all files selected now.

UPDATE: Deflicker worked on 1700 images like a charm with great results.

UPDATE 2: Seems like Lightroom can not read .XMP files created. Just doing nothing importing files, or updating from xmp metadata. Unreadable XMP+RAW https://dl.dropboxusercontent.com/u/17452116/Archive.zip
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 05, 2013, 07:15:32 PM
Quote from: dmilligan on November 05, 2013, 12:58:48 PM
I guess Adobe stores metadata directly in the dng instead of sidecars, so that's why it's not working. Verify there are actually .xmp sidecar files for what you're trying to backup. Otherwise it could be some file path issues I need to work out (all this really does is copy the *.xmp files to the folder you select).

I think there might still be a way to backup the metadata even if it's embeded in the dng. I'm looking into this.

Ok, I understand, will try out after creating sidecarfiles.
@itsskin Had the same issue with white files created when selected keyframes(star) and tried to ramp gradient changes. When I skipped the stars it worked. Will try again tonight...
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 05, 2013, 08:29:08 PM
Works perfect. Gotta find some place to create some nice timelapses though :)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 05, 2013, 09:10:08 PM
Quote from: itsskin on November 05, 2013, 05:28:24 PM
UPDATE 2: Seems like Lightroom can not read .XMP files created. Just doing nothing importing files, or updating from xmp metadata. Unreadable XMP+RAW https://dl.dropboxusercontent.com/u/17452116/Archive.zip

I think there's a setting somewhere in Lr that you have to set, otherwise it keeps all metadata in it's library file rather than in sidecars. What is it that you actually need to do in Lr?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 05, 2013, 09:19:50 PM
QuoteUPDATE 2: Seems like Lightroom can not read .XMP files created. Just doing nothing importing files, or updating from xmp metadata. Unreadable XMP+RAW https://dl.dropboxusercontent.com/u/17452116/Archive.zip

@itsskin
Tried your file, with and without the xmp. Reads the xmp just fine in lightroom over here. My catalogue settings looks like this in lighroom

(http://s22.postimg.org/kfbdhl0bx/Ska_rmavbild_2013_11_05_kl_21_44_57.jpg) (http://postimg.org/image/kfbdhl0bx/)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 05, 2013, 09:30:12 PM
Quote from: itsskin on November 05, 2013, 05:28:24 PMUPDATE 2: Seems like Lightroom can not read .XMP files created. Just doing nothing importing files, or updating from xmp metadata. Unreadable XMP+RAW https://dl.dropboxusercontent.com/u/17452116/Archive.zip

Please try "Metadata->Read Metadata from files" and see if that works.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 05, 2013, 09:58:01 PM
Quote from: Joachim Buambeki on November 05, 2013, 09:30:12 PM
Please try "Metadata->Read Metadata from files" and see if that works.

After this step LR5 is stuck updating. Importing is stuck on "importing".

I prefer LR to edit keyframes and copy\paste settings. It's just my main tool overall.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 05, 2013, 10:31:57 PM
Fixed the white thingy
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 05, 2013, 10:42:37 PM
Thank you again :)

Here is another example of what script can do. It was shot earlier in "manual ettr" :) Adjustments were made in 1EV stops. I'm super happy with the result.

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 06, 2013, 04:00:31 AM
Very Nice!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 06, 2013, 04:10:10 AM
Quote from: dmilligan on November 05, 2013, 10:31:57 PM
Fixed the white thingy
Deflickering is still producing random results (https://www.dropbox.com/s/au8jlsdwtxfunbj/deflicker.jpg) with the latest version.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 07, 2013, 02:50:44 AM
Quote from: Joachim Buambeki on November 06, 2013, 04:10:10 AM
Deflickering is still producing random results (https://www.dropbox.com/s/au8jlsdwtxfunbj/deflicker.jpg) with the latest version.
I can't replicate your issue, can you get me the debug info.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on November 07, 2013, 03:32:58 AM
Will take a while, sorry.
I just realised my CPU fan isn't working anymore and probably didn't in the last days aswell....
So my general lagginess in Bridge and the random crashes I had were likely caused by that.
I'll get back to you ASAP.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: timdit on November 09, 2013, 11:45:53 PM
I seem to be running into an issue where the first time I run the deflicker script on a group of files, it processes everything, but no values are changing in the exposure2012 in the xmp file.  If I run it again, it seems to be working and adding values to the files.

It seems like I either need to change iterations to 2, or I need to  change some parameter from whatever the window pops up with as default, or just run it more than once on a set of files to get it to work.  Not sure which change has made it work, but it does seem to be working well on the second go for some reason.

Tim
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 10, 2013, 12:07:12 AM
I think you have to clean the cache after you run the script. Sometimes bridge doesn,t update the thumbnails automatically.
Rightclick on the files. Should say something about cache higher up in the menu
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: timdit on November 13, 2013, 05:24:18 PM
Yeah, I figured that out, I'll try again to see if I can get it to go the first time.

I'm also having trouble getting it to ramp Temperature.  I have it set on the first and last photos, and when I choose temperature from the dropdown, it recognizes both values, but it doesn't change anything.  If I check additave, it will change the first and last but they will be very high numbers, and no photos inbetween are changed.  I'm working with about 360 photos in this instance.  Any ideas?  The exposure ramp works brilliantly.

Tim
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 13, 2013, 05:30:19 PM
you need to set the wb on all photos to 'custom' or it wont work, the temperature is actually being set, but it's being overridden by the value coming from 'auto' or 'as shot' mode

I'll see if there's a way I can have the script do this automatically for you
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 17, 2013, 04:51:17 PM
A short night to day timelapse this time using gradient filters.
Ettr, always on
dual iso
Post, script, adobe bridge

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 17, 2013, 08:38:46 PM
 ;D Nice!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 20, 2013, 05:04:08 PM
Hi! Is it possible to get the script to ramp whitebalance also with jpeg,s? I find I can ramp exposure, contrast and so on but when I try white balance it say ´NaN´suddenly. Does it have to be raw files whe ramping whitebalance?
Thanks!
/D
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 21, 2013, 01:06:14 PM
You can sort of white balance images that aren't raw, but you loose a lot of flexibility compared to raw. So if you can, ramp the white balance in camera (with adv_int.mo) if you're shooting a jpg sequence.

ACR may have a different tag name for white balance for non raw images, since it's not a true white balance, they way white balance on raw works. I'll investigate...
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 21, 2013, 07:34:50 PM
Hi David! Thanks for taking your time. The question about whitebalance on jpeg entered my mind when I was planning a larger project with my students. Not everyone will be served a camera with raw-capabilities. Would be cool to stretch this project and let the class use their phones and so on. Absolutely not necessary in any way to be able to alter wb on jpegs if It,s a hassle. The script is still rock solid as is.
Big thanks!
/D
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 23, 2013, 05:29:00 PM
Hi!
I noticed that when I,m working with gradients I can actually ramp whitebalance, clarity etc on both jpeg and raw. It seems it,s also flickerfree when applying clarity and using highlight recovery when working with gradients. This would be ideal for working with movieclips as well. The only hick-up is these white frames when I try to work with starred frames. EVerything is fine going from one point to the next but when trying several starred frames they become white. Any clues?

(http://s21.postimg.org/rutyr8bw3/Ska_rmavbild_2013_11_23_kl_17_34_07.png) (http://postimg.org/image/rutyr8bw3/)

(http://s21.postimg.org/j2d03jqr7/Ska_rmavbild_2013_11_23_kl_17_35_16.png) (http://postimg.org/image/j2d03jqr7/)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 23, 2013, 07:49:04 PM
I thought I fixed that, do you have the latest version?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 23, 2013, 08:22:55 PM
aah, you are right. Must have switched somehow. Working againg. Sorry. I,ll post some results in a couple of days. Another donation coming.
Thanks!
/D
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on November 23, 2013, 11:45:32 PM
Working with the gradient tool in acr gives full control of whitebalance and other parameters through your script. Ramping jpegs work really well and also highlight recovery with filmfiles. Giving flickerfree highlight recovery to my understanding going through gradients.

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on December 18, 2013, 07:07:02 PM
Hi!

I have a new bug here with version from the website.
On every 3rd iteration, it is stuck at one file before the keyframe. Suppose it's my one special sequence, but still:

(https://dl.dropboxusercontent.com/u/17452116/Screen%20Shot%202013-12-19%20at%2001.54.03%20.jpg)

Update: Running script in 2 iterations "batches" works fine.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on December 18, 2013, 10:34:06 PM
Quote from: itsskin on December 18, 2013, 07:07:02 PM
I have a new bug here with version from the website.
On every 3rd iteration, it is stuck at one file before the keyframe. Suppose it's my one special sequence, but still:

Hmm... Not sure what could be going on. If the script crashes, the progress window can actually stay open, even though the script has 'terminated', so it might have just quit, rather than getting 'stuck'.

Use this version of the script and send me the console output:
https://raw.github.com/davidmilligan/BridgeRamp/debug/BridgeRampingScript.jsx

Also, do you know how to step through the code? Set a breakpoint at line 745 and see if you can figure out where it's choking.

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on December 19, 2013, 10:00:06 AM
Here is the debug log. I changed the sequence and now it hangs in other place.
https://dl.dropboxusercontent.com/u/17452116/Debug%20log.zip

I don't know how to go through the code step by step. If log won't help, probably you'll have to tell me how to do this.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on December 19, 2013, 10:40:17 PM
Thanks, looks like somehow the calculated ev is getting set to NaN (not a number):


keyframe 108B0295.CR2: 216
keyframe 108B0383.CR2: 210
108B0296.CR2: NaNev (215.931818181818 - 189)


The computed ev in the log is NaN. The computation is:

var ev = convertToEV(target) - convertToEV(computed) + offset;


target and computed are the two values listed (215.9... and 189) so there's nothing wrong with them, so it must be the offset that is a NaN. The offset is simply the current Exposure2012 value read from the xmp file.

But IDK if that is the source of the crash, doesn't seem like it would be (I intentionally put NaN in the xmp file and ran the script it actually didn't bother the script at all and it worked fine). I changed the script to explicitly check that offset is not a NaN, IDK if that well help, but try it and see:
https://raw.github.com/davidmilligan/BridgeRamp/debug/BridgeRampingScript.jsx
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on December 20, 2013, 06:35:22 PM
Tried new script.
Stuck in new place...
https://dl.dropboxusercontent.com/u/17452116/Debug-2.rtf

Thx!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on December 20, 2013, 10:22:43 PM
So it looks like the values are not changing from one iteration to the next. This doesn't make a lot of sense. Is it writing values in the XMP sidecars? Are the exposure values changed in the ACR dialog? Try re-initializing all the exposure values back to 0 (back up the current xmp sidecars if you want) in the ACR dialog and running it again. Maybe also try getting rid of all the sidecars and starting from scratch. It seems to me like something is wrong with either the reading or writing (or both) of the metadata.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on December 21, 2013, 09:34:28 AM
What I did last time was deleting all non-keyframe XMP files, syncing crop value form first keyframe to all others, Ramp all values and run deflicker process.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on December 24, 2013, 06:19:58 AM
So any ideas how to fix this? Can I help?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on December 24, 2013, 09:05:32 PM
Looking at that log it appears that the values are not changing at all from one iteration to the next. It's as if the metadata is not being written to the XMP files. Delete the XMPs, run one iteration and then look to see that XMPs got created. Look in the XMP files themselves and see that some values other than 0 got written into the "Exposure2012" field. Also open any non-keyframe in the Bridge ACR dialog and verify that the Exposure slider is on something other than 0.0.

If the XMPs are not getting created, try opening the ACR dialog and just changing some value of something and synchronizing for all frames, so that ACR itself will initialize all the XMP files. Verify that XMPs are in fact created when you do this.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: limey on February 21, 2014, 02:59:02 PM
I'm running into an issue with deflickering. I've run probably 30 iterations without much change. I saw that you have to make the white balance "custom," but it still hasn't really improved much. I just used the bridge script the other day and it worked great, however, it wasn't a full night to day timelapse.

Flickering example (20 second interval):
https://vimeo.com/87230529

No flicker example (maybe 6 second interval):
https://vimeo.com/85634622
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on February 21, 2014, 04:50:05 PM
you shouldn't need more than about 2 or 3 iterations so it sounds like the metadata is not getting changed (see the above few posts, might be the same problem, I can't seem to duplicate it myself), try this debug version and send me the debug console output:
https://raw.github.com/davidmilligan/BridgeRamp/debug/BridgeRampingScript.jsx

Also try the things I mentioned aboved, check the XMPs, recreate them, ensure the values are changing, etc.

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: limey on February 22, 2014, 01:58:21 PM
Did another timelapse this time day to night and still getting flicker. Do I need to use the adv_int.mo I saw you posted in other thread for this to be flicker free?

I did auto ettr, image review 2 sec, live view, only edit the tone curve. I've tried ramping exposure in bridge script, then deflicker, I've also tried just deflicker. Yet still getting flicker.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on February 22, 2014, 02:34:55 PM
Quote from: limey on February 22, 2014, 01:58:21 PM
Did another timelapse this time day to night and still getting flicker. Do I need to use the adv_int.mo I saw you posted in other thread for this to be flicker free?
No

Quote from: limey on February 22, 2014, 01:58:21 PM
I did auto ettr, image review 2 sec, live view, only edit the tone curve. I've tried ramping exposure in bridge script, then deflicker, I've also tried just deflicker. Yet still getting flicker.
Is the script actually adjusting the exposure?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: limey on February 22, 2014, 06:21:14 PM
Based on this portion of one XMP file:

   crs:ProcessVersion="6.7"
   crs:Exposure2012="+8.65441"


Yes.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on February 22, 2014, 10:28:19 PM
Wow that's a lot, the max is +/-5 so there is def. something wrong. Does the brightness appear to actually change after running the script? (8ev should be quite noticeable, in fact above 5 I think everything pretty much just turns white).

It would be most helpful if you could run that debug version and send me the output. Otherwise I'm just going to have to keep playing 20 questions with you like this.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: finges on February 28, 2014, 05:14:34 PM
Quote from: dmilligan on October 17, 2013, 12:32:09 AM
There's an "additive" mode so you can add to the existing value (useful for modifying the exposure value calculated by ML Post Deflicker, easier than the exif tool way, and you can make it ramp as well)
just saw this, especially the "additive" function is very good for postprocessing a night to day timelapse using ml post deflicker.
Thanks!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on March 01, 2014, 01:33:01 PM
Script still stops for me randomly.
XMP is being written correctly. It just stops in the middle of the process. If I press "cancel" after it hangs I get something like "resize undefined" if I remember correctly.

EDIT: It says "ReferenceError: resize is undefined"
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 01, 2014, 05:22:03 PM
'resize' is a function of the preview image data object. This tells me that the preview data is probably for some reason not available. I've added a check to the debug version of the script. It should try to wait up to 30s for the preview to be 'ready'. If it's still not ready it should give you an error. Let me know if that helps.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on March 01, 2014, 05:24:07 PM
Great! Let me deflicker some other timelapse. Be back with the results.
Thank you!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on March 01, 2014, 05:31:55 PM
An error occurred while running a startup script named 'BridgeRampingScript'.  It may not be compatible with this version of Bridge; you can check for available updates by selecting the Updates command from the Help menu.  The script has been disabled, but can be re-enabled in the 'Startup Scripts' section of Preferences.

Error in /Users/itsskin/Library/Application Support/Adobe/Bridge CC/Startup Scripts/BridgeRampingScript.jsx
Line 736: int timeout = 30;//30 seconds
Illegal use of reserved word 'int'
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 01, 2014, 05:36:34 PM
Haha, I've been writing too much C recently...
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 01, 2014, 05:39:16 PM
try it now
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on March 01, 2014, 05:44:02 PM
You are awesome :D Working now. int... var... who cares :D
Please give me some some time to run it with some test material.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on March 02, 2014, 06:20:02 AM
Ok, it did not hang this 2 times, but result is strange. Please have a look:
How keyframes looked
(https://dl.dropboxusercontent.com/u/17452116/Screen%20Shot%202014-03-02%20at%2013.17.18%20.jpg)

What script did:
(https://dl.dropboxusercontent.com/u/17452116/Screen%20Shot%202014-03-02%20at%2013.16.21%20.jpg)

Log:
https://dl.dropboxusercontent.com/u/17452116/Debug.zip
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on March 02, 2014, 04:36:44 PM
Would you be so kind to explain how to choose percentile correctly. "Cross the sky"... What if it is day to night timelapse? How much to cross it?
Or may be just explain how it works, I still do not get it fully. Every single time it works ok, no matter if I select 0.7 0.8 or 0.9
Thx!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 03, 2014, 12:09:00 AM
Here's how the script works: first it computes the value of a given percentile of the image. So for example 0.5 would be the median, and would correspond to the value where half the pixels in the image have a brightness greater than that value and half have a brightness less than that value. For 0.7 that would mean the brightness at which 70% of the pixels are darker than that value and 30% are brighter than that value. Then it computes the same percentile of some target image. Then it applies a correction to the exposure to make the percentiles in each image match. So for example if we compute the median of some image to be 120 and the median of the target image to be 140, we would apply an exposure  compensation of +20 (converted to EVs of course), to try and get to that target value. The reason the script does multiple iterations is that ACR's curve is not linear and is not precisely known, so the EV is sort of 'best guess'. Then we see how well that guess came, say in our example our correction actually got us to 138. We would then apply just a little bit more to get to 140.

This method works b/c of the way brightness tends to be distributed in 'real' images. If you look at a probability distribution (a histogram of an image is simply a type of probability distribution), changing something like the stdev causes the average to change, while the median remains the same. We would say that the median (or a percentile, which is kind of like the same thing) is more 'statistically robust' than something like an average.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 03, 2014, 12:20:23 AM
Quote from: itsskin on March 02, 2014, 06:20:02 AM
Ok, it did not hang this 2 times, but result is strange. Please have a look:
How keyframes looked
From the log it appears your keyframes were ignored. Not sure why this happened, I can't reproduce it. (If you're having trouble with the keyframes, you can always just do it section by section).

Looking at your keyframes I see a major problem though, the last keyframe (which is the only one that was used besides the first one) is massively underexposed. I think this is throwing everything off. The ACR exposure setting has a max of +/-5 and once you hit that it just goes to black, which is completely screwing the script's analysis. So you need to try and keep your exposure to within 5ev. If you ETTR you should pretty much stay within about 1 ev. If you're hitting the exposure limits when it gets fully dark, you may need to use a longer interval so you can use a longer exposure time (say up to about 30-45s, which is normally what I use).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on March 03, 2014, 08:19:26 AM
I ran the script again on the same sequence and it worked.
It was shot manually and I deliberately let last part become dark. Now I know it's not a good idea with the script :)

Thank you for describing percentile thing. It is that correct thinking, that it's better to deflicker sequence in parts, if one is bright and other is dark?
And what are the dots the preview shows?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 03, 2014, 12:50:38 PM
Quote from: itsskin on March 03, 2014, 08:19:26 AM
I ran the script again on the same sequence and it worked.
It was shot manually and I deliberately let last part become dark. Now I know it's not a good idea with the script :)
Yeah, it's better to always just expose properly and then just make it darker in post if you're going for something like a fade out.

Quote from: itsskin on March 03, 2014, 08:19:26 AMIt is that correct thinking, that it's better to deflicker sequence in parts, if one is bright and other is dark?
Yes (you may also need to adjust the analysis area or the percentile when the scene changes drastically like this).

Quote from: itsskin on March 03, 2014, 08:19:26 AM
And what are the dots the preview shows?
The dots are highlighting where that percentile actually is on the image. Basically, the pixels that have the same (or very close) to the value of the selected percentile are changed to red dots.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on March 03, 2014, 09:04:51 PM
So do we target highlights when selecting percentile?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 04, 2014, 12:48:50 PM
you want to target the area that gives the best representation of the overall luminance of the scene (which is usually the sky ;))
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on March 04, 2014, 05:51:53 PM
Quote from: dmilligan on March 04, 2014, 12:48:50 PM
you want to target the area that gives the best representation of the overall luminance of the scene (which is usually the sky ;))
Makes sense. Thx again!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: NickZee on March 10, 2014, 04:45:30 AM
Great Script!

Everything works like a charm.  Except one thing...

From the deflicker prompt when I click Preview.  I get the Bridge Script pop out window, but it is a blank white Source tab.  I can see the script on the right and in the drop down Bridge CS6 is selected as well as Main Engine. 

When I click the Play button, I get a secondary pop up that is titled,

"ExtendScript Toolkit 3.8"

Then, a big red X, and bold text. "Cannot execute script in target engine 'MainEngine'!"

The details are;

Cannot execute script in target engine 'MainEngine'!
(#1) ENGINE BUSY


If I exit the Bridge script window the Percentile Level goes from "---" to a specific number. 

If I hit Ok, the deflicker script works with out an issues.

So I'm just not seeing the Image preview, but everything else works great!

Any suggestions?

Thank you

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 10, 2014, 12:00:31 PM
The preview is supposed to open in whatever your default image viewer on your system is. On my computer (Mac) it pops open in the 'Preview' app. It sounds to me like it's trying to open in ExtendScript toolkit for whatever reason (which doesn't know how to deal with an image file). It was a lot easier to just call the image to be opened in an external program than to try and actually draw it in ScriptUI. Maybe your OS is trying to open the file in ExtendScript b/c it thinks it was 'created' by ExtendScript. I'm not really sure about how to fix it (other than bite the bullet and try to display the image within the ScriptUI), but if you can find the temp file location where the preview was being saved, you can open it manually with whatever image viewer.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on March 10, 2014, 05:23:18 PM
Hello:

I'm just trying our your script, and I found something that I don't know if it's a bug: if I select a range of RAW images and try to ramp the "temperature" setting... it ignores me. It doesn't change anything.

(Not that I care that much about ramping color temperature; I was just trying to find out what After Effects does when some images of a sequence have XMP files and others don't, and I needed to change something that was easy to see in the timeline).

Using Adobe CS6 on Windows 7, with Camera Raw 7.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on March 10, 2014, 05:33:22 PM
Quote from: NickZee on March 10, 2014, 04:45:30 AM
Great Script!

Everything works like a charm.  Except one thing...

From the deflicker prompt when I click Preview.  I get the Bridge Script pop out window, but it is a blank white Source tab.  I can see the script on the right and in the drop down Bridge CS6 is selected as well as Main Engine. 


Oh, the same thing happens to me too. I get the ExtendScript toolkit window; in the Javascript Console to the side, I get: "temp file path: C:\Users\Paulo\AppData\Local\Temp\PercentilePreview.jpg"... but the file in question is not there.

I'm on Adobe CS6 (using Bridge 64 bit), on Windows 7.

Since I do have some experience with coding, I'll do some research and see if I can debug this.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 10, 2014, 05:41:05 PM
Quote from: PaulJBis on March 10, 2014, 05:23:18 PM
I'm just trying our your script, and I found something that I don't know if it's a bug: if I select a range of RAW images and try to ramp the "temperature" setting... it ignores me. It doesn't change anything.

You probably don't have it set on 'Custom' white balance for some of your images. Select all the images, Open with ACR, and set the WB for all of them to custom (use 'Synchronize' button).

(If it's not on 'Custom' temperature gets ignored)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 10, 2014, 05:43:48 PM
Quote from: PaulJBis on March 10, 2014, 05:33:22 PM
Since I do have some experience with coding, I'll do some research and see if I can debug this.
Thanks, there's not much I can do, b/c I don't have Windows and it works fine on Mac.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on March 10, 2014, 05:46:13 PM
Quote from: Joachim Buambeki on October 21, 2013, 01:26:10 AM
I am no experienced colorist, but changing white balance (hint: gamma correction), contrast and other things localy on an already highly graded image with a bad ratio of noise vs. signal (like a noisy milky way shot) is pretty hard to do for me within After Effects. If you would attempt to try/do it you would defeat the whole purpose of the scripting which is getting highest quality output from a RAW file IMHO. In that case you would be better off to output a flat interpretation of the actual RAW file and do ALL (=global and local) adjustments in AE or a designated colour grading suite like Speedgrade or Resolve.
By the way, all those features are implented in commercial software, some of them based on requests made by users.

I'm late to this, but...: if I understand you correctly, the underlying problem here is that Adobe Camera Raw can't pass to AE a true 32-bit image with all the dynamic range of the original RAW file. Hence your desire to do everything (even things like gradients) "before" AE, in the RAW processing phase.

Well, a possible solution might be here. In the last comment to this thread:

http://prolost.com/blog/2013/5/15/space-monkeys-raw-video-and-giving-us-all-youve-got.html

Stu mentions a tutorial about how to get the most dynamic range from Camera Raw:

http://prolost.com/blog/2006/3/16/linear-color-workflow-in-ae7-part-6.html

I wonder if you might find it useful.

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on March 11, 2014, 01:58:10 PM
Quote from: PaulJBis on March 10, 2014, 05:33:22 PM
Oh, the same thing happens to me too. I get the ExtendScript toolkit window; in the Javascript Console to the side, I get: "temp file path: C:\Users\Paulo\AppData\Local\Temp\PercentilePreview.jpg"... but the file in question is not there.

I'm on Adobe CS6 (using Bridge 64 bit), on Windows 7.

Since I do have some experience with coding, I'll do some research and see if I can debug this.

Okay, I found the bug. In line 690 of your script, where it says:

output.exportTo(tempFilename, 100);


It should be
output.exportTo(tempFile, 100);


Instead. According to the docs, the exportTo() function takes as its argument a "File" object, not a string.

I just tested it on Windows, and it does work. What I don't know is whether it will break on the Mac...  ;D

Edit: works on the Mac too.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 11, 2014, 08:57:14 PM
thanks :) I updated github
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: NeonHeatDisease on March 31, 2014, 07:27:32 AM
Finally something that works. Thank you so very much. Please PM the me the paypal link if its still not public, I'd love to contribute. Also:
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: NickZee on March 31, 2014, 08:59:30 AM
Nice Work @NeonHeatDisease
I found the PP links here, http://davidmilligan.github.io/BridgeRamp/ at the bottom.

Mr. Milligan,

I want to thank you for the effort you put into this script.  It is a true gem. 

What values need to be entered for Ramping Temp and Tint of TIFFS? 

Raw Temp is measured from 2000 to 50000 but with TIFFS -100 to +100.   And Tint from -150 to +150 in Raw and -100 to +100 with TIFFs.

Thank you

   

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 31, 2014, 01:00:06 PM
thanks!

Open a tiff and change WB/tint, and then look and see what gets written to the xmp sidecar, it might actually be a different tag name for non-raw data (in which case I'll have to update the script), otherwise you should just be able to set what you want in the first and last frame and do ramp multiple with WB and Tint check boxes checked and it will ramp from the first frame to the last.

I'll have a look in a bit.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on April 22, 2014, 05:00:09 PM
Hello again.

I'm starting to do some work to adapt the script to my workflow, which involves grading the RAW files to be as flat as possible and importing them into AE in order to do all the color correction there. This implies, among other things, using process 2010 for the RAW files... but also implies using a completely linear tone curve and zeroing out all the enhancements in Camera Raw (Brightness, Contrast, etc.).

I asked you a while ago whether the deflicker algorithm would work too in process 2010, and you mentioned that it wouldn't make much difference... but what about using PV2010 *and* the linear curve? (Note that, unlike in process 2012, the "linear curve" in PV2010 is really linear, at least AFAIK). Your current formula for calculating EV values is:

    (2 / log(2)) * log(value)

Would it serve equally for a linear curve?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on April 22, 2014, 05:26:56 PM
Quote from: PaulJBis on April 22, 2014, 05:00:09 PM
Would it serve equally for a linear curve?
Doesn't matter what kind of curve you are applying to the image, the exposure slider still operates in EVs (on a logarithmic scale).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: painya on May 01, 2014, 05:35:37 AM
I have a ton of footage for a movie I'm shooting and there is horrible flickering when we shoot indoors (we Didn't have kino flos or enough light to keep everything lit). If I export these as Tiff's and use this script will that work or at least help?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on May 01, 2014, 12:41:46 PM
it certainly should
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: painya on May 01, 2014, 04:52:59 PM
Thank you so much! You just saved me a couple hundred bucks!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on May 06, 2014, 01:53:55 PM
I've modified the script to add a few things that I needed:

-The ability to ramp parameters from process 2010, instead of process 2012.

-The ability, likewise, to deflicker using the exposure value for process 2010, and the ability to save the deflickering data (the EV values) to an external file.

-I've also implemented an Undo stack. It's a new menu command: when you select it, it gives you the chance to undo the last few ramp/deflickers you've done, without having to back up the XMP files. (I should note: this feature currently works, but it has a few inconsistencies that I'd like to iron out).

@dmilligan: are you interested in merging these changes? How should I send them to you?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on May 06, 2014, 04:50:23 PM
yes that would be great, the best way would be to submit pull request (https://help.github.com/articles/using-pull-requests) on github
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on May 06, 2014, 06:12:11 PM
Okay. I'll have to learn to use git and open a github account first then...  ;)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: smarjoram on May 08, 2014, 01:57:35 PM
Hello, should this script work with jpegs? I have a very long sequence - images were taken every 10 minutes over a couple of years - with daylight - as you can imagine, it's quite flickery! I've installed the script and it shows up ok but when I try to use it I always get the 'more iterations may be needed' dialogue. I tried a short section with 20 iterations but still got the message.

I'm using a mac and CS5.5. I tried converting the files to tiffs, adding Camera Raw Default Develop settings, with/without keyframes. Not sure what else to try. I'd be extremely grateful for any help.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on May 08, 2014, 02:13:05 PM
The script might tell you that it needs more iterations, but do the results look acceptable to you? I've had cases where the script said so, but I still liked the results.

As for your question, the script works using the metadata stored in the XMP sidecars. You might have to configure your system so that it stores the metadata there, instead of in the file itself (I don't remember right now what Bridge does with JPEG files).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on May 08, 2014, 02:38:34 PM
Yeah, the margin the script uses to determine if more iterations are needed is kind of tight. Basically the median of the histogram must match the expected value within 1. The idea being that this is as theoretically as good as the script can do, and if say you just left the script going over night and let it do as many iterations as it wanted, you wouldn't want it to stop until it knew it absolutely couldn't do better. What may actually be 'acceptable' to a human is an entire other matter, and probably somewhat looser. I usually just do a few and even if it says more are needed, I just watch it to see if its acceptable and if it is, I don't bother with more.

If you find, however, that the script isn't affecting the exposure value, and that's why it thinks it needs more iterations, then that is a problem.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: smarjoram on May 08, 2014, 03:59:41 PM
Thanks for getting back so quick. I can't see any difference in the images - or any sign of xmp files. Would I need to give the images some first? - so it can then alter them? I suppose that's what I thought I might be doing when I added the default develop settings.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on May 08, 2014, 04:37:45 PM
Quote from: smarjoram on May 08, 2014, 03:59:41 PM
Thanks for getting back so quick. I can't see any difference in the images - or any sign of xmp files.

Try entering Camera Raw's preferences and setting it to "save image settings" in sidecar XMP files.


Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on May 08, 2014, 04:39:45 PM
dmilligan: I just sent you a git pull request. If you have any doubts, feel free to ask.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: smarjoram on May 08, 2014, 07:30:30 PM
Quote from: PaulJBis on May 08, 2014, 04:37:45 PM
Try entering Camera Raw's preferences and setting it to "save image settings" in sidecar XMP files.

Spent the afternoon trying out this and everything else I could think of - just don't think it'll work with jpegs or dngs that have the xmp data embedded. Would like to be proved wrong though - will have a look at GBdeflicker and LRtimelapse but would like to have a cheaper option. Would love to hear from anyone who got a jpeg sequence to work.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on May 08, 2014, 11:23:19 PM
Ok, I think I fixed it, try the latest version. Before you run the deflicker you need to open all your jpegs in ACR (select them, right click and then 'Open in Camera Raw'), change the exposure setting for all of them (to some small amount like 0.05, change the first one and then just click synchronize) to 'initialize' the xmp metadata. Then it should work.

Maybe I can eventually figure out a way you won't need to open them in ACR first. But for now it doesn't work if you don't do that.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: smarjoram on May 09, 2014, 11:36:15 AM
Thanks again for looking into it for me - I just downloaded a new version and tried again - still no luck I'm afraid. I apply the slight tweak to the exposure in ACR, synchronise and click done. I can see the slight tweak has been applied and there's a small icon in the top corner showing that it has xmp data. I apply the deflicker and I always get the 'more iterations' message. If I check the images in ACR I can see that the exposure is unaffected from frame to frame - whereas I'd expect there to be small adjustments after deflickering.

Let me know if you have any other ideas. As the time-lapse is still going to be running for another year I might go and switch over to raws from now on.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on May 13, 2014, 11:19:25 PM
Update: just merged the pull request from PaulJBis. Some nice new features including undo and the ability to use Process 2010.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on May 13, 2014, 11:21:26 PM
sweet
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Brawl on May 20, 2014, 12:34:32 AM
edit
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Audionut on May 24, 2014, 03:59:53 PM
Finally got around to trying this out today.  Learnt some things I probably should have already known.
deflick doesn't work with silent pics, and silent pics doesn't work with dual_iso.  With LCD powersave OFF, I don't think it was turning back on quick enough for AETTR with silent pics, but I'm not 100% sure, as I gave up, and just wanted to get the timelapse running.

Boring timelapse, but serves the purpose of testing.

https://dl.dropboxusercontent.com/u/34113196/timelapse.mkv

With plenty of light, the deflickering worked extremely well.  As things got darker, the flicker increases.  Do you have any suggestions?

As it moves through twilight, the area in the center of the frame loses color resolution from allowing green channel overexposure.  2 questions. 

Can I apply some highlight recovery to these frames, before running through the deflicker?  This way, the deflicker compensates for the highlight adjustments.

Is it feasible to ramp the overexposure settings in AETTR?  This is mainly to compensate for question 1.  Nill overexposure during bright conditions, ramping to some overexposure during dark scenes, to intentionally blow specular highlights.

edit:  On the first question, I can process and export to tif.  Then run the tifs through the deflicker.  Still think it would be useful to ramp the overexposure settings.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on May 24, 2014, 05:12:31 PM
Quote from: Audionut on May 24, 2014, 03:59:53 PM
With plenty of light, the deflickering worked extremely well.  As things got darker, the flicker increases.  Do you have any suggestions?
Deflicker the dark sections separately maybe using a different percentile. Select a darker sequence and use the "percentile" preview to help.

QuoteCan I apply some highlight recovery to these frames, before running through the deflicker?  This way, the deflicker compensates for the highlight adjustments.
Yes I do this frequently. Just simply add some, it should be taken into account when the deflicker runs. You don't have to export to tiff and then deflicker those. I have found about -20 to -30 is the farthest I can go before it's too much for the deflicker to handle.

Quote from: Audionut on May 24, 2014, 03:59:53 PM
Is it feasible to ramp the overexposure settings in AETTR?
Yes, I was considering adding ramping AETTR parameters to adv_int. I'll look into that soon.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: garry23 on May 27, 2014, 05:31:57 PM
dmilligan/all

I have been trying to get silent picture timelapse working with A-ETTR, ie with a fixed exposure (no-ETTR) things are 'easy', ie I ingest dngs into LR, correct blank dng EXIF date with LensTagger and process in LRTimelapse.

The problems start when trying holy grail A-ETTR silent picture timelapse captures, ie no EXIF and no sidecars; and, of course, the exposure is 'jumping' all over the place at sunset or sunrise, say.

My question is: if I use the Bridge script with silent DNGs, do they require 'accurate' sidecar files, ie does the script access the EXIF exposure data, or does the deflicker script, say, 'just' access the embedded DNG histogram, ie no need to worry about EXIF exposure data in the sidecar files. In other words just put in dummy EXIF data or leave blank.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on May 27, 2014, 09:01:35 PM
it shouldn't need any metadata at all, it uses the actual histogram of the image data to do the deflicker
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: garry23 on May 27, 2014, 11:53:58 PM
Just tried it, ie without .xmps, and it appears to work well.

Many thanks I will send you a PM re your paypal address :-)

Cheers

Garry
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Audionut on May 29, 2014, 06:27:44 AM
Quote from: dmilligan on May 24, 2014, 05:12:31 PM
Deflicker the dark sections separately maybe using a different percentile. Select a darker sequence and use the "percentile" preview to help.

I tried some different options, and only doing sections of the timelapse, but if anything, I think I subjectively made it worse.  At this stage, I'll write the problem off as dumb user, and try some different shot settings for the next timelapse.

What sort of percentage of the sky is best for the deflicker?  Or is the idea, to only have selected an area of the scene that ramps consistently?


Quote from: dmilligan on May 24, 2014, 05:12:31 PM
Yes I do this frequently. Just simply add some, it should be taken into account when the deflicker runs. You don't have to export to tiff and then deflicker those. I have found about -20 to -30 is the farthest I can go before it's too much for the deflicker to handle.

I can accomplish this by simply processing the files through ACR, and then running deflicker when the previews in bridge have been updated?  Or do I need to update the default settings used by ACR?


Quote from: dmilligan on May 24, 2014, 05:12:31 PM
Yes, I was considering adding ramping AETTR parameters to adv_int. I'll look into that soon.

Thanks.
Off-topic:  Not interested in putting that module in the nightlies?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on May 29, 2014, 10:08:14 PM
Quote from: Audionut on May 29, 2014, 06:27:44 AM
What sort of percentage of the sky is best for the deflicker?  Or is the idea, to only have selected an area of the scene that ramps consistently?
Good question, I'm not totally sure. I don't really see much difference myself. Probably just experiment with different values and see what works best.

Quote from: Audionut on May 29, 2014, 06:27:44 AM
I can accomplish this by simply processing the files through ACR, and then running deflicker when the previews in bridge have been updated? 
Yep, in fact you don't even need to wait (or at least theoretically you shouldn't) for the previews, the script clears the preview cache and forces Bridge to regenerate the previews.

Quote from: Audionut on May 29, 2014, 06:27:44 AM
Off-topic:  Not interested in putting that module in the nightlies?
Well there was all that module stuff that got talked about a while back and I was just going to wait and see where things went.  There was also talk of letting modules exist in their own repos. Nothing has really changed though, so perhaps I should go ahead and submit it.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: a1ex on May 29, 2014, 10:30:33 PM
QuoteNothing has really changed though

Nanomad did some good progress with building modules outside the main tree, but it was kinda silent and not yet in a "just works" state. I still like this idea of regarding modules as user apps, so each module author can work on it without restrictions. For visibility, at least the good ones do deserve a place on the nightly builds page though.

Proposals are welcome (in the original thread (http://www.magiclantern.fm/forum/index.php?topic=10537), to keep things organazized), for example, about how they should appear on the download page.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on June 01, 2014, 07:06:05 PM
I just made a little "lazylapse" using only one picture created out of three exposures enfused to one. Then duplicated to 13 virtual copies that I used as keyframes later in adobe bridge when doing all kinds of ramping with the script :)

Of course it is outside my balcony again ;)

Original pic
(http://s28.postimg.org/kkh3pbsuh/O42_A8817.jpg) (http://postimg.org/image/kkh3pbsuh/)


Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: NickZee on June 01, 2014, 08:18:21 PM
I might have missed it, but in the Deflicker Menu can someone explain what the Analysis Crop (%) is, what it does or how it's used?  By default, X and Y are set to 0 and Height and Width is 100.   If it's already been spoken about, the link to that thread would suffice.

I love the info in the tool tips when hovering over the values.  Very helpful!  Thank you!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on June 01, 2014, 09:04:26 PM
You can select a portion of the picture in those settings. Sometimes it works, sometimes not. I mostly don,t use it but go straight with 3 iterations.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: NickZee on June 02, 2014, 01:06:11 AM
Quote from: dmilligan on March 31, 2014, 01:00:06 PM
thanks!

Open a tiff and change WB/tint, and then look and see what gets written to the xmp sidecar, it might actually be a different tag name for non-raw data (in which case I'll have to update the script), otherwise you should just be able to set what you want in the first and last frame and do ramp multiple with WB and Tint check boxes checked and it will ramp from the first frame to the last.

I'll have a look in a bit.

Thank you.


This is what I discovered.

First I copied a tiff.   Ie; IMG_00001 and IMG_0001_Copy
Synced all of the develop settings from 0001 to the copy.
Opened the Copy in ACR and only changed Temp and Tint.
CRTL+I in Bridge to reveal Raw Data Tab.
Copy and pasted XMP data into Notepadd++. One tab for 0001 and one tab for the Copy.
Used Compare plug in to find differences. 

Line 89 and 90

0001
         <crs:IncrementalTemperature>-8</crs:IncrementalTemperature>
         <crs:IncrementalTint>+2</crs:IncrementalTint>

0001_Copy
         <crs:IncrementalTemperature>+33</crs:IncrementalTemperature>
         <crs:IncrementalTint>+37</crs:IncrementalTint>


Performing a Temp or Tint Ramp from 0001 to 0500 (excluding the Copy) has NaN in both value boxes.

I Selected Ramp Temp and put in -8 and -13.  Then selected Ramp Tint and put +2 and +7.  When the Tiff is opened in ACR, the resulting Temp Ramp was -100 on all Tiff.  The Tint Ramp was -9 in the first Tiff of the sequence and -5 in the last tiff.   In the XMP I cannot see -100 anywhere in the XMP, especially in line 89 <crs:IncrementalTemperature>-8</crs:IncrementalTemperature>.

Going further, leaving 0001 with it's -100 value, I opened 0002 in ACR and put the Temp and tint back to -8 and +2.  Then coping the XMP data back into Notepad++ and comparing, I found this.

Line 89 and 90
0001
         <crs:IncrementalTemperature>-8</crs:IncrementalTemperature>
         <crs:IncrementalTint>+2</crs:IncrementalTint>

0002 (Corrected Temp and Tint in ACR)
         <crs:IncrementalTemperature>-8</crs:IncrementalTemperature>
         <crs:IncrementalTint>+2</crs:IncrementalTint>

Line 185 and 186 0001 ONLY (-100 Temp Value in ARC)
         <crs:Temperature>-8</crs:Temperature>
         <crs:Tint>2</crs:Tint>

0002 does not have Temp and Tint in lines 185 and  186.

I can only guess that because Ramp is adding another Temp and Tint line, ACR doesn't know what value to assign. 

Does it matter if I put the plus sign in for a positive value?  +2 compared to 2? 

Hope this helps.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on June 02, 2014, 03:12:56 AM
Thanks, apparently ACR calls it "IncrementalTemperature" instead of "Temperature" (and the same for tint) when dealing with non-raw data. I've added the tags to the script, so you should be able to ramp them now (they will default to unchecked so you need to check them).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: blainesuque on June 11, 2014, 04:11:33 AM
when i am deflickering or ramping, is there a chart i can look up for the percent of start and end. I have trouble figureing out how much the numbers i enter are going to affect the sequence. Maybe the minimum and maximum for starts and ends for the Deflicker and ramps? Anything you guys can refer me to, so i can learn the right numbers to enter. Thanks!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on June 11, 2014, 03:25:24 PM
I have no idea what you mean by "percent of start and end" or "minimum and maximum for starts and ends".

The settings of the first and last frames are not touched at all. All the frames in between are conformed to a line drawn from the first frame to the last (or keyframe to keyframe if there are keyframes). There are no numbers to calculate. Simply make the first frame look like you want, and the last frame look like you want, and then run the ramp or deflicker.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on June 13, 2014, 08:47:31 PM
The best way to get good results deflickering going day to night I lowered contrast and blacks to get a much flatter picture. I this expected? When deflickering contrasty series I get inconsistencies that wont deflicker. Thought I should share my little tip.
Thanks
/D
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: sletts02 on June 21, 2014, 02:52:33 AM
Is it possible to run more than one instance of Deflicker?

When I run it Bridge seems to become unresponsive until it's finished. Ideally I'd like to have 3 or 4 clips processing at once - is this possible?

So far the results on one clip have been nothing short of remarkable, cudos!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on June 21, 2014, 03:41:06 AM
Unfortunately, no it's not possible to do more than one at the same time, and there's no way to prevent it from locking up Bridge until the script is finished either. That's just how Adobe chose to implement their scripting engine.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: sletts02 on June 21, 2014, 04:58:29 AM
Bummer, no worries!

Would it work if I added two separate clips in to the same folder and ran it? Or would it produce some crazy results? I would test but I'm not in front of my production rig.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on June 21, 2014, 03:03:16 PM
Yeah, you could do it like that and use the keyframes (mark with 1 star rating to set a keyframe), put a keyframe on the last image of one sequence and the first image of the next, then select all of them and run, that should essentially cause them to be totally independent.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: NickZee on June 25, 2014, 10:09:32 PM
Quote from: dmilligan on June 02, 2014, 03:12:56 AM
Thanks, apparently ACR calls it "IncrementalTemperature" instead of "Temperature" (and the same for tint) when dealing with non-raw data. I've added the tags to the script, so you should be able to ramp them now (they will default to unchecked so you need to check them).

Great!  Thank you David, I appreciate it!  Just bought you a steak dinner or a nice bottle of wine.

If anyone else wants to chip in for this great script, go here and find the donate button at the bottom,
http://davidmilligan.github.io/BridgeRamp/
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on June 25, 2014, 11:56:26 PM
Thank you very much!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: NickZee on June 27, 2014, 09:14:08 AM
Welcome!

A little while back (http://www.magiclantern.fm/forum/index.php?topic=8850.msg105733#msg105733) I was getting the scripts preview menu and not Windows Photo Viewer for the Deflicker option. 

Since then, I have seen the Windows Photo Viewer image preview, but only a couple times.  It calculated the percentile, and off I went Deflickering.   But after that the one time, the preview button stopped working.   I was able to "rejuvenate" it buy removing the script from the folder, restarting Windows, adding the script back and opening bridge, but only once.

Now, with the newest script version, CS6, Windows 8.1 64 bit, ACR 8.5 the Preview button is unresponsive.  This time, I have tried several combos of removing the script and rebooting, to disabling the script first in Preferences, then removing and rebooting to disabling and removing, then double clicking the script from my desktop.  As well as, trying to change the default program for JPEG to PS and back to Windows Photo Viewer.  None of which will work.   The deflicker Preview button simple doesn't work for me.

Because I can't Preview it, the percentile doesn't calculate and if I click "OK" anyway I get this error "TyepError: unidentified is not an object."  When I close the Error, the Progress bar appears, but doesn't move.

Any ideas or suggestion I should try?

Thank you!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: NickZee on June 27, 2014, 09:33:57 AM
Of course!  After I post, I figure it out.  I was setting the Analysis Size to 1200.  It can only go to a max of 1000 (for me). Preview button works just fine at 1000. 

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on June 27, 2014, 12:47:55 PM
sounds like I need to add a check
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: pilgrimage on July 26, 2014, 11:33:52 PM
Hi,I bridgeramp latest version installed.How I Can this problem ? Where is the problem ? Pls Help me ?


Adobe Bridge Message ;

An error occurred while running a startup script named 'Bridge'.  It may not be compatible with this version of Bridge; you can check for available updates by selecting the Updates command from the Help menu.  The script has been disabled, but can be re-enabled in the 'Startup Scripts' section of Preferences.

Error in /Users/xxxsss/Library/Application Support/Adobe/Bridge CS6/Startup Scripts/Bridge.jsx
Line 1740: <td class="blob-line-code"><div class="code-body highlight">
<div class='line' id='LC1'><span class="err">#</span><span class="nx">target</span> <span class="nx">bridge</span></div><div class='line' id='LC2'>
</div><div class='line' id='LC3'><span class="cm">/* Copyright (C) 2013 David Milligan</span></div><div class='line' id='LC4'><span class="cm"> *</span></div><div class='line' id='LC5'><span class="cm"> * With additions (C) 2014 by Paulo Jan</span></div><div class='line' id='LC6'><span class="cm"> *</span></div><div class='line' id='LC7'><span class="cm"> * This program is free software; you can redistribute it and/or</span></div><div class='line' id='LC8'><span class="cm"> * modify it under the terms of the GNU General Public License</span></div><div class='line' id='LC9'><span class="cm"> * as published by the Free Software Foundation; either version 3</span></div><div class='line' id='LC10'><span class="cm"> * of the License, or (at your option) any later version.</span></div><div class='line' id='LC11'><span class="cm"> *</span></div><div class='line' id='LC12'><span class="cm"> * This program is distributed in the hope that it will be useful,</span></div><div class='line' id='LC13'><span class="cm"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class='line' id='LC14'><span class="cm"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div><div class='line' id='LC15'><span class="cm"> * GNU General Public License for more details.</span></div><div class='line' id='LC16'><span class="cm"> */</span></div><div class='line' id='LC17'>
</div><div class='line' id='LC18'><span class="kd">var</span> <span class="nx">percentile</span> <span class="o">=</span> <span class="mf">0.7</span><span class="p">;</span></div><div class='line' id='LC19'><span class="kd">var</span> <span class="nx">evCurveCoefficent</span> <span class="o">=</span> <span class="mi">2</span> <span class="o">/</span> <span class="nb">Math</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="mi">2</span><span class="p">);</span></div><div class='line' id='LC20'><span class="kd">var</span> <span class="nx">keyframeRating</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span></div><div class='line' id='LC21'><span class="kd">var</span> <span class="nx">iterations</span> <span class="o">=</span> <span class="mi">3<
/
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on July 27, 2014, 12:16:39 AM
Looks like you downloaded the HTML page containing the script rather than the script itself
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: pilgrimage on July 27, 2014, 12:18:19 PM
Hi, How Can I Solution ?

Your writed solution past !

Thankyou.


tsskin:
Great! Let me deflicker some other timelapse. Be back with the results.
Thank you!

itsskin:
An error occurred while running a startup script named 'BridgeRampingScript'.  It may not be compatible with this version of Bridge; you can check for available updates by selecting the Updates command from the Help menu.  The script has been disabled, but can be re-enabled in the 'Startup Scripts' section of Preferences.

Error in /Users/itsskin/Library/Application Support/Adobe/Bridge CC/Startup Scripts/BridgeRampingScript.jsx
Line 736: int timeout = 30;//30 seconds
Illegal use of reserved word 'int'

dmilligan:
Haha, I've been writing too much C recently...

dmilligan:
try it now

itsskin:
You are awesome :D Working now. int... var... who cares :D
Please give me some some time to run it with some test material.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: pilgrimage on July 27, 2014, 12:24:00 PM
I am try new upload script.

But New Error Message ;

An error occurred while running a startup script named 'BridgeRampingScript'.  It may not be compatible with this version of Bridge; you can check for available updates by selecting the Updates command from the Help menu.  The script has been disabled, but can be re-enabled in the 'Startup Scripts' section of Preferences.

Error in /Users/alperaykut/Library/Application Support/Adobe/Bridge CS6/Startup Scripts/BridgeRampingScript.jsx
Line 81: var rampCommand = MenuElement.create("command", "Ramp...", "at the end of Thumbnail", this.rampMenuID);
create redeclared
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on July 27, 2014, 09:21:50 PM
strange, I have no idea, works fine here with CC, and I'm pretty sure it has worked with CS6 in the past
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: pilgrimage on July 28, 2014, 11:41:45 PM
ı new installed mac os bridge CC.Solution Problem :)

thankyou.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: barepixels on August 02, 2014, 04:29:30 AM
What is the proper way to deflicker with key frames in Bridge

(http://199.167.201.88/screencaptures/EyXqR.png)

As you can see above, there is a huge jump in exposure between 151 and 152 (ETTR ISO jump)

What if I want a smooth transition from 146 to 157.  how do I set a keyframe for them?  do I put 1 star for frame 146 and 2 stars for frame 157?  Also what you would recommend for the percentage?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 02, 2014, 04:19:09 PM
Just put one star for any frame you want to be a key frame (it won't be touched). You can also just select only those frame and deflicker them (first and last frames automatically become keyframes). The default percentile is usually pretty good. You can look at the preview, it will show you where that percentile falls on the image.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: barepixels on August 02, 2014, 07:27:59 PM
I can not get it to work

First I had them as 16bit TIF and ran like 60 time
Then I convert all to JPG and tried 30 times
The I isolate just them 12 JPGs and try 30 times

Didn't see any changes

Thnx
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Danne on August 02, 2014, 07:36:59 PM
I actually tried this little trick and got some good results on my raw files a while ago(see below). Try flatten your images first before deflicker. After deflicker go back with contrast etc.

"The best way to get good results deflickering going day to night I lowered contrast and blacks to get a much flatter picture. I this expected? When deflickering contrasty series I get inconsistencies that wont deflicker. Thought I should share my little tip.
Thanks
/D"
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 02, 2014, 10:43:24 PM
I'm not sure why, but that's a good tip, thanks.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 02, 2014, 10:51:28 PM
Quote from: barepixels on August 02, 2014, 07:27:59 PM
I can not get it to work
Works fine here. Maybe try opening all the images in the ACR dialog and click synchronize. This should create/initialize the XMP metadata if it's missing.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: barepixels on August 03, 2014, 05:39:33 AM
@Danne   thnx for the tip

@dmilligan  that was it.  The problem I have is with Adobe Bridge 2014 and ACR, my bridge is not working with ACR nicely... need to find a fix.  Once I hear those files works for you I tried the synchronize via Bridge CS6 and ACR and it works beautifully.  Thank you so much.



LRTimelapse and dmilligan's amazing Adobe Bridge Script
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: isaacgolding on August 03, 2014, 06:03:40 AM
For what it's worth I just discovered this script and have gone back through my old time lapses and been throwing them at the script.   The stuff I shot in simple AV mode time lapse seems to be a lot better than the stuff I shot  via ETTR time lapse.

I'm still trying to wrap my head around the ETTR Time lapse.  But for me my problems seemed to be around time lapse day to night and ISO changes...  the pictures would keep getting brighter and brighter in ETTR mode and the ISO values would start climbing..

To be clear here... what I'm trying to suggest is that if you are doing ETTR timelapse and throw the results at the the deflicker /ramp script I would suggest the following:

Start with AV mode.  It's a tried and tested method of shooting timelapse with a SLR and for the most part your only problem is flicker.  Shoot a good 3 or 4 hours of 30 sec interval captures and shoot it with sunset right in the middle of the timeline.

Then bring those captures to ACR and the deflicker script. This is exactly what I'm doing right now.   I took 3 cameras out tonight.  A GoPro (just because I can)... a Canon 350D shooting raw in AV mode with intervolmeter and the 5dmark3 shooting ETTR with ML.  I can tell you my 5dMK3 stuff is just a hot mess and I'm pretty sure its my fault.   But the 350D stuff deflickers real nice in ACR with the script.    This might be a good starting place for you to figure out where the problems are.

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on August 15, 2014, 08:03:51 PM
Quote from: Joachim Buambeki on November 07, 2013, 03:32:58 AM
Will take a while, sorry.
I just realised my CPU fan isn't working anymore and probably didn't in the last days aswell....
So my general lagginess in Bridge and the random crashes I had were likely caused by that.
I'll get back to you ASAP.

Hi David,

took me abit longer than expected to get everything running again... I hope you excuse my slightly delayed update on my problem.  ::)
I see you kept working on the script in the meantime, really glad to see it still beeing maintained.
The good news are that I got a new machine that should serve me much better than the old one. Bad news is that I still have the same problem with the same sequence I tried last time I wrote in this forum. I did a three pass deflickering with a percentile of .7 and .25 (that is the value that targets the even foreground) but the flickering is still much worse after deflickering than with the original sequence (where there was *almost* none). Everything on a fresh installation of CC2014 on OSX.
If you need it I can send you a small encode of the sequence via dropbox if you need it.

Also:
Did you ever think about a feature to stabilize/deflicker white balance? When the sun is covered by clouds the colour temperature becomes cooler (right?!), could that be eliminated by looking at the histogram to adjust the WB?

Could you implement a feature to auto create a certain amount of keyframes automatically to the context menu? Like selecting it and then it evenly creates n amount of keyframes evenly over the whole sequence. For a sunset, editing the start and end point just isn't sufficient.

What about an option to initialise metadata? That would make it easier to deal with animating the gradient but you could also add the author of the image and other metadata (location for example) without Lightroom.

What about an option to create a backup of the XMP data within the sequence folder that is just called "XMP Snapshot - date and time" or something? That is the way I backup my xmp files and would save me quite a few clicks in the process. :-)

About the context menu:
IMHO it would easier to spot the script options if they weren't divided by the dividing lines. If you don't want to change that, can you tell me how to do it (I would also add an asterisc or something for myself), please? I guess different colours are out of the questions because Adobe doesn't allow that?!


Keep up the good work, David!

Cheers
JB
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on August 15, 2014, 08:58:50 PM
David, I would like to revisit the deflickering topic again. Please excuse me if I just don't understand it what you are saying:

Quote from: dmilligan on November 04, 2013, 05:14:03 PM

Technically it's not the average, but the median (or some other percentile of your choosing, median is simply the 50th percentile), which is much more statistically robust than the mean. Notice how the median is the same between the two different statistical distributions on this graph, while the mean and mode are different (a histogram is a type of statistical distribution)

(http://upload.wikimedia.org/wikipedia/commons/thumb/d/de/Comparison_mean_median_mode.svg/500px-Comparison_mean_median_mode.svg.png)Your two different parameters are exactly the same thing in terms of this algorithm. You can either correct the exposure completly to the target or not by some amount. Change this by adjusting the coefficient I mentioned. Make it smaller. 2 / log(2) is the best estimation of the ACR black box that I've found, it would represent 100% deflicker (or at least as close as we can get by guessing). 1 / log(2) would be like 50% deflicker. 0 / log(2) would be no deflicker at all.
Yes, that should be possible assuming Br always uses the sidecars and doesn't ever store the metadata directly in the files, which has always been the case in my experience.

There are basically two different scenarios for deflickering:
1. A sequence where you have exposure changes that are totally unwanted, for example if shot in AV mode. Here you want to totally eliminate the changes in brightness of the sequence.
2. A sequence that is technically perfect (shot in M, lens with no aperture flickr, etc) but there is natural light flicker caused by passing clouds that make the image too dark.

I understand you can ellimate flicker for 1. with the script but with 2. I don't want the changes in brightness to be totally eliminated but just weakened (not 1 or 2 EV as in the RAW sequence but .4 to .8 approx in the render) to recreate how the human eye/brain perceives it when beeing on location. How does that work with the current algorithm? This what I was talking about in this post and the illustration of the curve (http://www.magiclantern.fm/forum/index.php?topic=8850.msg86347#msg86347).

Cheers
JB
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on August 15, 2014, 09:16:46 PM
Hi Paul,

I just re-discovered this thread and found your reply to me burried a few pages ago, so please excuse my late reply to this!

Quote from: PaulJBis on March 10, 2014, 05:46:13 PM
I'm late to this, but...: if I understand you correctly, the underlying problem here is that Adobe Camera Raw can't pass to AE a true 32-bit image with all the dynamic range of the original RAW file. Hence your desire to do everything (even things like gradients) "before" AE, in the RAW processing phase.

Well, a possible solution might be here. In the last comment to this thread:

http://prolost.com/blog/2013/5/15/space-monkeys-raw-video-and-giving-us-all-youve-got.html

Stu mentions a tutorial about how to get the most dynamic range from Camera Raw:

http://prolost.com/blog/2006/3/16/linear-color-workflow-in-ae7-part-6.html

I wonder if you might find it useful.

First, let me say thank for those two links. I am not sure how exactly the info in the second link can be translated to the recent version of ACR. The problem is that when the sliders are at zero the image is far away from beeing linear. The problem was discussed by Christian Bloch (http://www.hdrlabs.com/news/index.php?id=1276328416487110799) here aswell. I assume the settings he recommends approximate a linear gamma pretty well tough. Writing this post I would think that one should be able to find out pretty close what settings create a linear gamma on PV2012 with Photoshop and the colour picker when comparing the same image processed with PV2010. Need to look into that when I find time...

Cheers
JB
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 15, 2014, 11:06:46 PM
Quote from: Joachim Buambeki on August 15, 2014, 08:03:51 PM
If you need it I can send you a small encode of the sequence via dropbox if you need it.
Yeah, that's probably the easiest.

Quote from: Joachim Buambeki on August 15, 2014, 08:03:51 PM
Also:
Did you ever think about a feature to stabilize/deflicker white balance? When the sun is covered by clouds the colour temperature becomes cooler (right?!), could that be eliminated by looking at the histogram to adjust the WB?
That sounds really complicated, and without much benefit. You'd also need to analyze the raw data, I only have access to a preview. However, if you have a proposal or description of how to do that mathematically, I'd certainly be willing to try and implement it.

Quote from: Joachim Buambeki on August 15, 2014, 08:03:51 PM
What about an option to create a backup of the XMP data within the sequence folder that is just called "XMP Snapshot - date and time" or something? That is the way I backup my xmp files and would save me quite a few clicks in the process. :-)
PaulJBis already implemented undo:
https://github.com/davidmilligan/BridgeRamp/pull/1

Quote from: Joachim Buambeki on August 15, 2014, 08:58:50 PM
I understand you can ellimate flicker for 1. with the script but with 2. I don't want the changes in brightness to be totally eliminated but just weakened (not 1 or 2 EV as in the RAW sequence but .4 to .8 approx in the render) to recreate how the human eye/brain perceives it when beeing on location. How does that work with the current algorithm?
There's no way to tell the difference analytically, so there's no way to do anything other than simply remove the flicker. Seems like it would look better without flicker anyway, even if the flicker being eliminated was 'natural'.

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on August 16, 2014, 10:59:33 AM
Quote from: dmilligan on August 15, 2014, 11:06:46 PM
Yeah, that's probably the easiest.
Will double check everything again and then send you samples of the unprocessed sequence and the processed as x264 encode, okay?

Quote from: dmilligan on August 15, 2014, 11:06:46 PM
That sounds really complicated, and without much benefit. You'd also need to analyze the raw data, I only have access to a preview. However, if you have a proposal or description of how to do that mathematically, I'd certainly be willing to try and implement it.
AFAIK white balancing is shifting the multiplier (<1, 1 or >1) of each channel in linear gamma, right? I just read this thread again and at the beginning you say that assume a gamma curve for the deflickering, is that correct? Why don't you use that curve to get somewhat close to linear and then compare the histograms of adjacent images with each other to find out if there is an offset? This is basically the same as deflickering, just separately for each color channel, right?
Please see the first 50secs of this video (https://www.youtube.com/watch?v=K7KKi0iZ9t0) to illustrate the issue I am talking about - I am aware that you need to much more funky processing to get the results they are getting but fixing the WB would be a good start for less severe sequences.

Quote from: dmilligan on August 15, 2014, 11:06:46 PM
PaulJBis already implemented undo:
https://github.com/davidmilligan/BridgeRamp/pull/1
I noticed that after I installed the latest version of the script, but I am not sure how to use that really. Maybe Paul can chime in to explain it to me?

Quote from: dmilligan on August 15, 2014, 11:06:46 PM
There's no way to tell the difference analytically, so there's no way to do anything other than simply remove the flicker. Seems like it would look better without flicker anyway, even if the flicker being eliminated was 'natural'.
I don't think flicker should be completely removed in those cases because then it looks too unnatural.
Just for my understanding: The amount of passes run by the script mostly targets the precision of the deflickering and not the averaging, right?
I see that an algorithm has a hard time distinguishing between the two cases, that is why I am asking for the option to adjust the deflicker strength. I will try to rephrase the post I linked to.

(http://imageshack.us/a/img35/1570/f0tz.png)

Red graph = average image brightness (per frame)
Green graph = brutally averaged brightness target
Blue graph = gentle brightness target for pleasing and natural results©
Black bars = keyframes 1., 2. and 3.
With the current algorithm, everything between the keyframes 1. and 2. would get averaged out (represented by the green graph), right?
The blue graph represents my idea of the deflickering strength, when the strength is 100% the blue graph will look like the green one, when the strength is 0% the blue graph will be no different to the red one. When adjusting the strength to 40% the graph has about the appearance like in my illustration.
Maybe it is possible to be able to adjust high frequenzy and low frequenzy smoothing (I hope this is the right terminology for this) separately:
High frequenzy (HF) flicker would be single frames that are just off (because the AV mode made a bad decision or whatever the reason is). These spikes need to be eliminated obviously.
Low frequenzy (LF) flicker would be the smoothing of the curve on a wider scale, when the sequence gets darker because of bypassing clouds for let's say 50 frames between keyframes 1 and 2, we want it to be a bit darker (.5EV) but not as dark as the RAW files (1.5EV), also there should be gentle roll-off into this.

Removing HF flicker would only take into account the brightness of adjacent images while LF deflickering also takes into account the original brightness of the RAW file.

If the amount of passes is doing what I assume above, running multiple passes would improve the precision in the high frequenzy (and to some extent also in the low frequenzy) deflicker but not average out everything untill it has the same brightness.

Hopefully my idea is clearer now.


JB
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 16, 2014, 05:06:44 PM
Quote from: Joachim Buambeki on August 16, 2014, 10:59:33 AM
Will double check everything again and then send you samples of the unprocessed sequence and the processed as x264 encode, okay?
sounds good

Quote from: Joachim Buambeki on August 16, 2014, 10:59:33 AM
I don't think flicker should be completely removed in those cases because then it looks too unnatural.
Just for my understanding: The amount of passes run by the script mostly targets the precision of the deflickering and not the averaging, right?
The script runs extra passes b/c the preview is not totally accurate, and the deflicker amount is basically a best guess. In a prefect world I would be able to know mathematically how much some exposure adjustment would affect the histogram, but ACR is a black box and the preview I have to work with is limited. Hence, my guess is not perfect. Let's say I measure the median (not average, the script doesn't do anything with averages!) of two images I want to have the same apparent exposure, 120 and 140. I know I need to move the median by 20 units, but when I convert that to EVs with my approximation and then give that to ACR, I don't always end up with 140 and 140 when I measure the median again, I might say end up with 146 and 140 (my guess was too big). Better, but not perfect. So it's sort of ends up being like Newton's method. Once all the histograms match the expected values that should yield flicker free results, the script stops.

Quote from: Joachim Buambeki on August 16, 2014, 10:59:33 AM
Maybe it is possible to be able to adjust high frequenzy and low frequenzy smoothing (I hope this is the right terminology for this) separately:
High frequenzy (HF) flicker would be single frames that are just off (because the AV mode made a bad decision or whatever the reason is). These spikes need to be eliminated obviously.
Low frequenzy (LF) flicker would be the smoothing of the curve on a wider scale, when the sequence gets darker because of bypassing clouds for let's say 50 frames between keyframes 1 and 2, we want it to be a bit darker (.5EV) but not as dark as the RAW files (1.5EV), also there should be gentle roll-off into this.
All of this you are proposing would add way too much complication to what is a very simple and effective algorithm that is based on simple and robust statistical methods. I would also argue that "low frequency" flicker is not actually flicker at all by definition.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on August 26, 2014, 02:09:31 AM
Hi David,

I just wanted to process the files to show that deflicker doesn't work but the problems with the script and me seem to never end no matter what OS or version of the software:

(http://i61.tinypic.com/ipwc5t.jpg)


Before applying deflicker, all I did was processing the downrezzed DNGs (that were created from CR2 files), the first and last frame were marked with 1 star and their exposure was lowered (small amount for the first keyframe and larger amount for the second one). After pressing OK, the script stays stuck at the process shown.
Also, Bridge is behaving very buggy (with DNG, CR2, NEF files) - but I don't think it did when installed but only since a few days. It almost always crashes at some point. Restarting the computer also doesn't help. It always asks me to purge the cache when started again.
I don't remember it doing that the first time I was writing in this thread again two weeks ago.

Any ideas, David? I would really get this working because it is basically all I need to process my TLs but it seems it is not meant to be. :-(

Cheers
JB

PS: Did you get my PM?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 26, 2014, 03:14:30 AM
Looks like you selected the undo data file to be deflickered (which is not an image).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: getho on August 26, 2014, 03:26:05 AM
Just starting out with this. After using panolapse and LRtimelapse I'm stoked, cant wait to get into it: seems to have a vastly less faffy workflow

Just a quickee: read this thread but couldn't see any info on the analysis crop.  are the x,y values percentage or pixel values?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 26, 2014, 04:22:30 AM
percent
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on August 26, 2014, 10:50:02 AM
Quote from: dmilligan on August 26, 2014, 03:14:30 AM
Looks like you selected the undo data file to be deflickered (which is not an image).
Of course, I just pressed Cmd+A to select all files...
Could you modify the script to only process image files and ignore everything else (like undoData, subfolders, etc.)?

I tried it again and now it gets interesting:
In Bridge you can see the adjustments made by the script in the thumbnails and when you open the files in ACR but After Effects ignores the adjustments - not all of them its really weird, the adjustments seem to be taken into account for about half of the sequence but then it stops. Do you have any explanation for that behaviour?
I then rendered the images from the ACR dialogue in Bridge and put the image sequence through compressor to see if the changes are applied - they are (though there still is some shimmering - not sure if I would call it flicker).


I can send you the DNGs for examination via Dropbox if you need them, they are only 200 MB.

JB
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 26, 2014, 03:13:21 PM
Quote from: Joachim Buambeki on August 26, 2014, 10:50:02 AM
In Bridge you can see the adjustments made by the script in the thumbnails and when you open the files in ACR but After Effects ignores the adjustments - not all of them its really weird, the adjustments seem to be taken into account for about half of the sequence but then it stops. Do you have any explanation for that behaviour?
Had you already loaded and viewed part of the sequence in AE? If so, it's because you are seeing AE's preview cache (notice the green areas above the timeline). When you make changes inside AE, it knowns to clear the preview cache. But you made changes outside of AE that it wasn't aware of. Simply clear the preview cache.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on August 26, 2014, 03:50:10 PM
Quote from: dmilligan on August 26, 2014, 03:13:21 PM
Had you already loaded and viewed part of the sequence in AE? If so, it's because you are seeing AE's preview cache (notice the green areas above the timeline). When you make changes inside AE, it knowns to clear the preview cache. But you made changes outside of AE that it wasn't aware of. Simply clear the preview cache.

I suspected something like that and made sure this isn't what is causing it. I quit AE and imported the sequence again (actually did that multiple times) but the sequence was still screwed up.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 26, 2014, 04:44:25 PM
quitting AE does not clear the preview cache!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on August 26, 2014, 04:51:56 PM
I am not sure if this is the RAM cache, but the problem is still there after cleaning the "Media & Disk Cache" in preferences. If there would be still something in the disk cache it should be visible by beeing blue lines instead of green, right? I don't see those blue lines after importing the sequence again in a new project.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 26, 2014, 05:06:16 PM
then I have no idea
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on August 26, 2014, 05:28:57 PM
I also get this error after the first pass now:

(http://i59.tinypic.com/e9wyll.png)

After pressing OK it stays stuck with purging the cache. (I have plenty of free HDD space if that is a possible cause).

I am also trying to break the script in other ways:
When picking three keyframes (start+middle+end) and choose ramp multiple it only ramps the exposure and clarity but not the temperature that was also changed in the middle keyframe. I tried that a few times and made sure everything is checked in the "Ramp Multiple" dialogue.


When you want to ramp and deflicker you have to ramp mutliple first and then deflicker, right? What about combining that into one process?


EDIT - More testing: 3 keyframes, start underexposed, middle overexposed and high colour temp, end underexposed and same colour temp as start.
When applying the script to CR2 files instead of DNGs the ramping is working as expected when inported into AE (except colour temperature like mentioned above). I assume AE needs the sidecar files for some reason, otherwise it applies the settings of the first frame to the entire sequence. I can't verify that because I don't know how to create .xmp files when processing DNG files.


In case you missed that in the last posts: CC2014, OSX
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: getho on August 27, 2014, 05:23:50 AM
Sorry for being dumb, if you had values of 50, 50, 50 ,50  would that be a rectangle that starts at 50% of the width of the image, and is 50% of the width of the image?  (in which case what does the 200 "analysis size" value above it refer to?

Another dumb question (I will get the hang of this)

Percentiles: are we talking histogram? in which case how does the amount relate to the preview? And how do you analyse your shot to know where these values should be?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: milank on August 27, 2014, 08:27:07 PM
Quote
When applying the script to CR2 files instead of DNGs the ramping is working as expected when inported into AE (except colour temperature like mentioned above). I assume AE needs the sidecar files for some reason, otherwise it applies the settings of the first frame to the entire sequence. I can't verify that because I don't know how to create .xmp files when processing DNG files.
Yes, this is well known issue. I am used to create xmp files using LightRoom rc_xEmP plugin. which works fine, and AE accepts them.
However, the workflow gets somehow complex and I am still looking for easier one.
Either having XMP files directly generated by dmilligan script or to figure out how to avoid ACR processing in AE.
Premiere would be better choice, but it does not seem to understand DNG produced by ML silent module.
DNG->TIFF conversion would be a choice, too.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 27, 2014, 10:53:02 PM
Ramping temperature isn't working because you need to set it to "Custom" for all photos (this doesn't happen automatically, yeah I know: "Can you make this automatic?")

I've never seen the purgeFolderCache error and I have no idea what it could be.

For DNGs Adobe stores the metadata in the DNG itself so there will be no sidecars. If it's not working here's what I would do: select all the DNGs in the ACR dialog. Make some type of change and synchronize it to all of them. This will sort of "initialize" the XMP metadata within the DNG, otherwise the script may not be able to write the metadata correctly (yeah I know: "Can you make this automatic?" Well I'm already calling the function to init the metadata in the xmp API, and it basically seems to not always work. I have no idea why and there's nothing I can do about it, but at least this workaround seems to work)




The preview should show you the analysis area and it will highlight the percentile you selected.

Analysis size refers to how big the image is scaled down to before computing the histogram. The smaller you make it the faster the script but the histogram will be less accurate. (the reason for this setting is that the rescale operation is native and very fast, however computing the histogram is done in JavaScript which is very very slow, so rescaling the image down makes the histogram calculation much faster)

Yes percentiles refers to the histogram, it shouldn't make much difference, the default should be fine.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: ansius on August 28, 2014, 10:05:35 AM
I recently encountered a glitch with the script behavior, it either did not adjust or deflickering was poor. It took me a while to run down the bug, but basically in adobe bridge you have to set "Options for thumbnail quality and preview generation" to "always high quality".

(http://ansius.lv/ml/bridge_setting.jpg)

Any other setting gave me either unpredictable results (like constant +1 stop in exposure for embedded thumbnails if I had shot -1EV) or left a lot of flickering. I have not done more research why, but just for someone who encountered the same problem. (Bridge CS6 5.0.2.4 + ACR 8.4).

As for ramping color temperature - that explains why the setting did not work until I did set in ACR to a certain value for all pictures. maybe this should be an option in script, set it to custom if not set?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on August 28, 2014, 12:14:45 PM
Quote from: milank on August 27, 2014, 08:27:07 PMYes, this is well known issue. I am used to create xmp files using LightRoom rc_xEmP plugin. which works fine, and AE accepts them.
...
Either having XMP files directly generated by dmilligan script or to figure out how to avoid ACR processing in AE.
...
Would it be possible to create those sidecar files with the script instead of another Plugin for another software?


Quote from: dmilligan on August 27, 2014, 10:53:02 PM
Ramping temperature isn't working because you need to set it to "Custom" for all photos (this doesn't happen automatically, yeah I know: "Can you make this automatic?")

For DNGs Adobe stores the metadata in the DNG itself so there will be no sidecars. If it's not working here's what I would do: select all the DNGs in the ACR dialog. Make some type of change and synchronize it to all of them. This will sort of "initialize" the XMP metadata within the DNG, otherwise the script may not be able to write the metadata correctly (yeah I know: "Can you make this automatic?" Well I'm already calling the function to init the metadata in the xmp API, and it basically seems to not always work. I have no idea why and there's nothing I can do about it, but at least this workaround seems to work)


Quote from: ansius on August 28, 2014, 10:05:35 AM
As for ramping color temperature - that explains why the setting did not work until I did set in ACR to a certain value for all pictures. maybe this should be an option in script, set it to custom if not set?

Commercial software seems to have found a way to correctly initialise metadata, so there might be a way.


Quote from: dmilligan on August 27, 2014, 10:53:02 PMI've never seen the purgeFolderCache error and I have no idea what it could be.

:-\


Quote from: dmilligan on August 27, 2014, 10:53:02 PMAnalysis size refers to how big the image is scaled down to before computing the histogram. The smaller you make it the faster the script but the histogram will be less accurate. (... rescaling the image down makes the histogram calculation much faster)
Did you try cascading the resolution when multiple passes are going to be used? Make the the first pass faster by running it with a lower resolution and the latter passes with higher resolution for histogramm calculation. Maybe this saves some time in the end (and increases precision in the last pass if run with an even higher resolution)?
Also: Is it possible to let the run as many passes as needed instead of giving out the warning that more passes are needed?


Quote from: ansius on August 28, 2014, 10:05:35 AM
I recently encountered a glitch with the script behavior, it either did not adjust or deflickering was poor. It took me a while to run down the bug, but basically in adobe bridge you have to set "Options for thumbnail quality and preview generation" to "always high quality".

IMAGE

Any other setting gave me either unpredictable results (like constant +1 stop in exposure for embedded thumbnails if I had shot -1EV) or left a lot of flickering. I have not done more research why, but just for someone who encountered the same problem. (Bridge CS6 5.0.2.4 + ACR 8.4).
Maybe it would be good to put things like that and the DNG and colour temp issue on the main page of the script under known bugs and limitations.

Also, why don't you explain the settings and options on the site? The documentation is bit lacking at the moment IMO.

Cheers
JB
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: milank on August 28, 2014, 07:26:46 PM
Quote
Would it be possible to create those sidecar files with the script instead of another Plugin for another software?
Exiftool is able to do that.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on August 28, 2014, 07:49:59 PM
Quote from: milank on August 28, 2014, 07:26:46 PM
Exiftool is able to do that.
Now that you say it, I remember that commercial software also relies on Exiftool. Would it be possible to call an external app like Exiftool from within the script?
Or maybe there is some documentation that says what Exiftools does and then this can be recreated in the script?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 28, 2014, 08:30:37 PM
There's no need to use exiftool. The script is already using Adobe's built in XMP library.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Joachim Buambeki on September 02, 2014, 12:38:30 PM
Quote from: dmilligan on August 28, 2014, 08:30:37 PM
There's no need to use exiftool. The script is already using Adobe's built in XMP library.
If Exiftool works reliably and Adobe's API doesn't I would consider using EXIFtool. Not saying that EXIFtool does but I have never managed to get this script working reliably over a course of more than a year on totally different systems.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on September 03, 2014, 01:04:34 AM
Hi, Joachim.

QuoteFirst, let me say thank for those two links. I am not sure how exactly the info in the second link can be translated to the recent version of ACR. The problem is that when the sliders are at zero the image is far away from beeing linear. The problem was discussed by Christian Bloch here aswell. I assume the settings he recommends approximate a linear gamma pretty well tough. Writing this post I would think that one should be able to find out pretty close what settings create a linear gamma on PV2012 with Photoshop and the colour picker when comparing the same image processed with PV2010.

Sorry for not replying sooner; I've been out of the loop lately, and yesterday I spent half an hour fighting with the forum software trying to quote automatically your message  >:( . Anyway, you are right: the problem is that the "linear" curve in PV2012 isn't really linear, due to the magic that Adobe added to extract more detail from the highlights (I found a thread in Adobe's forums discussing this months ago, but can't find it right now).

I don't know about trying to reverse-enginner whatever Adobe has done in PV2012, but it seems easier to me to just keep using PV2010 for the shots we take specifically for timelapses, which is why I added that option to dmilligan's script.

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on September 03, 2014, 01:21:29 AM
As for the "undo" feature I added:

QuoteI noticed that after I installed the latest version of the script, but I am not sure how to use that really. Maybe Paul can chime in to explain it to me?

Basically, before you perform any operation using the script (deflicker, ramp values...), it will automatically save the current state of all the XMP attributes in all your selected pictures into a "set", which is represented by the menu entry in the Undo dropdown. When you later select an option in that dropdown, the script takes all those XMP attributes and loads them again into your pictures, erasing whatever modification you just made (that is, "undoing" it). Basically, it's like the "Backup XMP sidecars" feature, except you don't have to manually admin several sets of XMP files.

There can also be several options in the dropdown, representing several undo levels. Basically, I wrote this to behave pretty much like the undo feature in After Effects, Photoshop, etc. (Of course, there can be bugs  ;D ).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Audionut on October 27, 2014, 01:10:50 PM
Much better results with this small timelapse, although I didn't get the chance to continue till dark since it started raining.



Does it render dark, or is it only my browser?  The source file:  https://dl.dropboxusercontent.com/u/34113196/test.mkv
Title: Ramp Exposure Additive w/ Keyframes
Post by: NickZee on October 29, 2014, 04:08:00 AM
Hello Guys.

I have a question.

After I deflickered my sequence, I decided that I needed to lower the exposure at a few places.  I added 1 star to 2 frames (around 1/3rd and around 1/2 way) and set the exposure(lowered).  I also set (lowered) the exposure to the first and last in the sequence.   

I ramped the exposure, (not ramp multiple) and checked Additive.  My results are not what they should be.  The exposure is being added to making the exposure brighter.

In this screen shot.  I ran ramp about 6 times, with different scenarios.  Like, adding 1 star to 1st and last frame, using PV2010 and changing exposure to the four frames.  Each time, the exposure was increased.  The difference between frame 1 and frame 2 wasn't that extreme on the first run.

https://www.dropbox.com/s/ywxoxnh1xjch0i9/ramp.JPG?dl=0


Can ramp exposure additive be used with 1 star keyframes?

Thank you!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on October 29, 2014, 11:48:13 AM
the "additive" exposure ramping does not work with keyframes, it simply adds the amount you put in the box to all the frames you have selected
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: NickZee on October 31, 2014, 01:42:02 AM
Thank you for clarifying @dmilligan
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 16, 2014, 05:43:31 PM
I'm using the script on different mac now and got the same problem with process being stuck at some point of time. Last time you fixed it with delay for file render, so this is not the case now I think. Tried to find //$.writeln in new versions to give some logs, but seems you got rid of this feature :) How do I provide more info?
Thank you!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 16, 2014, 07:00:39 PM
It's in a different branch in the repo "debug". You can just download that version and use it unmodified
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 17, 2014, 01:44:50 AM
ok! I also wonder if it is possible to code the following behaviour:
1. do 1 pass of deflicker
2. wait for bridge to finish rendering new previews
3. start 2nd pass
4. go to step 2

Or I guess adding dialog with "delay between iterations" will also work awesome :)

I have a feeling its going to work faster and more stable
thx!

EDIT:
Got debug version, replaced old script. Running Bridge CC 8.1 on mac 10.9. Nothing is displayed while script is running. Just usual progress bar.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 27, 2014, 10:38:50 AM
Hi again!
Any chance to look into the issue above?
Thx!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 27, 2014, 05:28:41 PM
Quote from: itsskin on November 17, 2014, 01:44:50 AM
1. do 1 pass of deflicker
2. wait for bridge to finish rendering new previews
3. start 2nd pass
4. go to step 2
For the most part, that is already what it does. When you ask for a preview, Bridge is supposed to keep you waiting until it is ready.

Quote from: itsskin on November 17, 2014, 01:44:50 AM
Or I guess adding dialog with "delay between iterations" will also work awesome :)

I have a feeling its going to work faster and more stable
I see no reason why that would be the case. Adding delays do not make computer programs more reliable (in general, they actually tend to make programs less reliable, because they now depend on arbitrary delays)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 28, 2014, 05:25:34 AM
I totally agree with theory, but script never fails with one pass. Probably Bridge problem? And why there is no window with log output when debug version is used?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on November 28, 2014, 01:55:11 PM
IDK, try running it directly from ExtendScript Toolkit.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: itsskin on November 30, 2014, 08:26:25 AM
Ok, got debug output. Extendscript Toolkit is required for this. Was not installed on my machine. So here is the screenshot - can't stop the process without killing it.

https://dl.dropboxusercontent.com/u/17452116/Screen%20Shot%202014-11-30%20at%202.19.30%20PM.jpg

After that I killed Extendscript Toolkit, process went on for several frames and halted again.

https://dl.dropboxusercontent.com/u/17452116/Screen%20Shot%202014-11-30%20at%202.20.42%20PM.jpg
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: NickZee on January 22, 2015, 05:07:34 PM
Hello @dmilligan,

Hope you are having a great new year.  Sorry to always be coming with problems.  I updated to Bridge CC, LR 5.7, and PS CC and now each time I run Ramp Multiple I get this error:


Adobe Bridge

Error: XMP Exception: Indexing applied to non-array.


I don't not get this error when running a single ramp or running a deflicker.

In Ramp Multiple, all options were selected except the Incrementals that you added for tifs.

In LR I edited 3 images and 1 stared them (beginning, middle and end) with gradients, circle gradients, the basic sliders (E. C. H. S. W. B. C. V. S.) temp and tint, HSL (only S & L).  No lens correction, Post Processing or Effect.

Here is a screen shot of the error.
https://www.dropbox.com/s/7s7aqt5kznybu38/xmp%20error.JPG?dl=0

I've searched this error and haven't found any reference to it.  The closest I could find was an issues with LR 5.7 xmp and it saying that every image needed to be Updated From File.  Although, this didn't happen to me.  https://forums.adobe.com/thread/1657300

I downloaded a fresh copy of the script from your website and github and tried both. 

Windows 8.1
CR2 from t3i

If you need me to upload the images and xmps just let me know.

Thank you David

EDIT/UPDATE:

I deleted all the XMP's created by LR and made the edits in ACR within Bridge and the Ramp Multiple worked. Something is wrong with LR 5.7's xmp writing.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PtboPete on January 27, 2015, 08:24:37 PM
Please excuse my ignorance. I am new to ml and have mastered  ;) AETTR and Intervalometer and now, also turned on the Flicker module. From what I gather, the Flicker module makes a (ramped) flicker free setting in each xmp file. Although I don't see any changes when loaded in LR after copying all the files, CR2 and xmp then importing. Now I read this and it seems I need to run all the photos through this script to achieve the flicker free result. If the latter is true then what does the ml flicker module do? Do I need both?

I do know that if the script is required I have to do that in Bridge with ACR as LR does not handle scripts and that is sad but fine.

Secondly, it has been stated that no changes to exposure settings be done or any setting in the basic develop module. Only changes to levels are acceptable. Can I not make static changes to all photos in the area of clarity, vibrance, saturation, highlights, shadows, whites and blacks? I do already give each photo a static wb setting usually around the 6500 mark.

Any help is greatly appreciated, thanks. :)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on January 27, 2015, 11:30:38 PM
You can use the in camera module to deflicker OR you can use this script to deflicker, you don't have to use both. This script is a little more flexible. Also you have to make sure to give the in camera deflicker module time to run in between each frame (~5 seconds). Using this script you don't have to worry about that and time between frames can be shorter.

You can also use this script to 'modify' an in camera deflicker, by applying some offset or ramp to existing "Exposure" values. In camera you can't do ramps and such like you can with this script.

Quote from: PtboPete on January 27, 2015, 08:24:37 PM
Secondly, it has been stated that no changes to exposure settings be done
No, I think you misunderstand. That's no changes to THE "Exposure" setting after running the script. That's the setting that the script sets to achieve deflickering. You can change any of the other settings you want (you can also change exposure *before* running the script if you like). Some of these other settings can cause additional flicker, so you need to be careful with them (they are 'image-adpative' meaning they will have different effects depending on the content of the frame, which causes the additional flicker). This script can help somewhat removing the additional flicker from those settings, but if you crank something like clarity to 100%, then you might find the flicker is too strong even for this script to remove.

You can also use this script to 'ramp' values of various settings. This is useful for WB because it changes drastically during a sunrise/sunset.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PtboPete on January 27, 2015, 11:54:59 PM
Thanks for the clarification. For now I'll go with in camera and progress from there. I'm not heavy handed with pp and for time lapse will be sure to make the changes identical for each. Now if the temperature outside would rise a little and the cloud cover dissipate then I could do some serious testing. Thanks again. 8)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PtboPete on January 28, 2015, 07:36:41 PM
Me again... last nights test I did with AETTR, DUAL ISO and Flicker. I ubnderstand that the dual ISO will only come into play when dr is quite large. The first few dual ISO shots by themselves I could plainly see the banding, however in last nights test I could see none of that so I figured dual ISO was not used. Once I completed my timelapse, the entire run shows blatant dual ISO banding.  >:(
1. How can I tell if dual ISO was used?
2. If dual ISO is only used on some shots do I need to process only those ones in cr2dng?
3. If I just grab the lot and run them all through cr2dng will that cause problems?

Thanks in advance. :)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on January 28, 2015, 07:41:34 PM
3. No
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: caballe on January 29, 2015, 06:37:17 PM
Hello Dmilligan,

Sorry my ignorance, but I'm trying to install this script and when I click on the link you provided, it opens a browser window with a text file (I assume it is the script code). I tried to save it thru text editor with a jsx extension but it doesnt't work. I probably doing something wrong, but I understand this text file should be compiled in some way to be used. Obviously I'm doing something wrong, but I don't have a clue... can you help me?

Thank you,
Albert.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Walter Schulz on January 29, 2015, 06:44:18 PM
Open context menu on that link (Windows: Right mouse button, OS X: Control-Click) and use "save as .." option
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: classicbs on February 06, 2015, 01:10:32 AM
Hi There, loving the script.  I've just been doing loads of testing with ETTR and now I'm testing the processing.  I have a few questions that will help me understand this better and also help other people understand it.  I will go and test it myself but I think it wold be valuable if anyone was prepared to walk me through how they would approach the post processing of a time-lapse I shot.  It was shot overnight on the Great Wall of china in early Nov as I froze my ass of off camera.  It looks amazing but due to the cloud cover and the full moon it looks like day time.  Also due to my settings in ETTR (percent of highlights to ignore) once the moon comes into frame the exposure changes dramatically.  Have a look and if some one could give me a rough outline of how they would approach this using the script and roughly where they would place the keyframes and for what values (WB, Exposure etc) that would be amazing.  I'll do my own tests and post the results but it'd be great to get your opinions.   

A few specific questions.  If i want to reduce the exposure of everything can I do this at anytime or only at the beginning?
Why would I want to keyframe the de-flickering process I'm not clear on why I'd want to do this or in what situation?

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on February 06, 2015, 01:41:50 AM
When you make a keyframe its like telling the script "don't touch this frame", it becomes the target for what frames around it to look like. By default the first frame and last frame are keyframes.

So, pick a couple a frames that represent important sections of your time lapse. Then simply adjust them (along with first and last frames) to look however you like. If you modified settings besides exposure, then first do a "ramp multiple" this will make all settings smoothly ramp from one keyframe to the next (if you change WB, make sure all frames are set to Custom WB). Then run the deflicker. It will adjust exposure, making all the frames smoothly transition from one keyframe to the next.

If you want to adjust exposure after the deflicker, you can use the "ramp" in additive mode. It should be easy to avoid that though. Simply make sure your keyframes look like what you want for you final output before running the deflicker.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: classicbs on February 09, 2015, 10:51:29 AM
Thanks David, that's great so I really get it now one can just edit a few photos and everything will RAMP.  My problem now is that the keyframes don't seem to work.  I'll try again but say I set a keyframe in the middle and one at each end it only rams to the middle keyframe and not all the way.  It's fine as I can do it in two batches but I wonder what I'm doing wrong to have it stop in the middle at the one I gave one start rating to, this has happened twice now.  Also separate issue I can't seem to flip between bridge (and camera raw) and light room.  They photos seem to have there own settings and the edits don't seem to be carried over even though (as far as I can tell) they are referencing the same cr.'s and XMP's?  Any Ideas?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: surami on February 09, 2015, 04:00:37 PM
@classicbs: Maybe this workflow will help for you. I could get the best results till now:
1. Delete your old XMP-s (or save them somewhere as backup).
2a. In LR read in the metadatas for your sequence. Select all files on the library tab (ctrl + a) -> right click metadata -> read metadata.
2b. In LR set custom whitebalance for your files + crop for 16:9. Select all files on develope tab -> switch on autosync -> basic settings: wb custom + crop overlay: aspect 16:9. -> save metadatas (ctrl + s)
2c. In LR set 1 star for your keyframes + adjust the settings for them. Rightclick on the selected images -> set rating: 1 star (switch off autosync!) + filter for 1 star -> adjust the settings for the keyframe as you wish (don't touch the shadows, highlights, blacks, whites) -> save metadatas again.
3a. In BR select all files and right click -> purge cache for selections. Now you will see the settings, what you did in LR.
3b. In BR select all files and run David's awesome ramp multiple script (check all), wait till the process ends.
4a. Before you deflicker the sequence I suggest you to download the visionlog raw camera profile (http://www.vision-color.com/visionlog/) (read the installation guide) and apply it. This will help the deflicker script to work more properly.
5. In LR setup the visionlog raw profile for you sequence. Read in the metadatas for your full sequence (filters off) on the develope tab -> switch on autosync -> camera calibration, profile: visionlog -> save metadatas.
6a. In BR select all files and right click -> purge cache for selections. Now you will see very flat images.
6b. Run deflicker.
7. In LR read metadatas for your sequence and swicth back your camera profile to adobe standard -> save metadatas.
8. In BR select all files and right click -> purge cache for selections. Now you will see everywhere the final multi ramped deflickered sequence.

Maybe it's too long to read and every settings could be done in BR + ACR, but I like the LR's layout.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: classicbs on February 09, 2015, 11:07:38 PM
Hi Surami,

That's great I think I've nailed it now everything seems to work as expected.  I have two questions.

2c, why do you say (don't touch the shadows, highlights, blacks, whites)?  At what point can I adjust these in your workflow and why.

Do you know about changing Lightroom's catalog settings in the preferences: Lightroom>Prefrences>Go To Catalog Settings>Metadata>Automatically write changes to XMP

Should I use this or not and if not why not.

Also more generally how do I get notified in this forum if someone replies to my post?

Mant thanks and I'll post the time-lapse and some others once they are done,

James

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: classicbs on February 10, 2015, 12:12:51 AM
Also just my tuppence worth, I do really appreciate the effort that has gone into this but a couple of comments.  I keep selecting the undo log thing when I deflicker and it hangs my computer and I have to force quit bridge.  It'd be better without that being there somehow (although it is useful).  Also is it possible to make it run until it doesn't need to anymore.  At the moment I'm just selecting it to run 10 times so it stops itself eventually .  Is there a reason why one might want to deflicker less than what the script thinks?

Clip imminent of several day to night lapses from China shot for National Geographic.  Once I've nailed this I'll donate something on the PayPal,  much appreciated!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: DeafEyeJedi on February 10, 2015, 12:20:37 AM
Thanks for sharing your workflow @surami -- will definitely test it out!

Solid questions @classicbs -- I wouldn't touch the S,H,B,W because it would then cause more flicker, I suppose?

Also you can get notifications through Tapatalk via app on your phones, or tablet. (I use them on iPhone, iPad)

works pretty well for me.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: classicbs on February 10, 2015, 10:07:46 AM
Okay great many thanks @deafeyejedi, @Surami, @dmilligan.  I'm really getting into this now.  I'm still a bit unsure as to when the best time to do batch post processing is?  For the nighttime star time lapses it really helps to adjust some settings on all the photos to make the stars really pop in the sky.  If one knows they will change all the photos  (i.e. no need to ramp) then are these edits best left to after the de-flicklering?  Can I ramp after de-flickering?  Do I need to run de-flickering again if I keep ramping.

Here's my first three efforts using this amazing script in 4k should you have a great monitor.  You can see the great wall of china time-lapse has progresses.  Would anyone care to criticise my exposure ramping and WB tramping, how does it look I'd be interested to know, the original un-ramped version is above.

Cheers

p.s. please don't share this YouTube link anywhere else as I'm not supposed to be making these images public yet

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on February 10, 2015, 02:26:35 PM
Quote from: classicbs on February 10, 2015, 10:07:46 AM
If one knows they will change all the photos  (i.e. no need to ramp) then are these edits best left to after the de-flicklering?  Can I ramp after de-flickering?
It's usually best to do these edits before deflickering in case they introduce any extra flicker themselves, the deflicker will help take care of it somewhat. (ACR has a lot of settings that are 'image adaptive' and they can have a different effect on different source material, causing flicker; the worst offenders are: clarity, highlights, shadows). Of course there are things that are not going to cause extra flicker (like WB, noise reduction, lens corrections), so it doesn't really matter when you do them.

Because of the image-adaptive nature of some of these settings, even the deflicker script won't be able to fully fix the flicker introduced because for example highlights, midtones, and shadows may be affected differently, and the deflicker can only match overall exposure. So you have to be careful when using these settings, there will be limits to the values you can "safely" use (without introducing too much additional flicker).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: classicbs on February 10, 2015, 02:41:36 PM
Okay great many thanks @dmilligan.

Do you have an opinion on the following statement?

Quote4a. Before you deflicker the sequence I suggest you to download the visionlog raw camera profile (read the installation guide) and apply it. This will help the deflicker script to work more properly.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: surami on February 11, 2015, 03:09:21 PM
@classicbs: The idea of using the visionlog raw camera profile came from the post #260 (http://www.magiclantern.fm/forum/index.php?topic=8850.msg124398#msg124398), they spoke about flat images... ;)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: classicbs on February 13, 2015, 12:04:41 AM
Okay so thanks all, 3 days getting my head around this bit the results are great here the full run down of my de-flickered time-lapses from my last shoot.


I thought I'd compile some of the advice that helped me get my head around this:

@classicbs: Maybe this workflow will help for you. I could get the best results till now:
1. Delete your old XMP-s (or save them somewhere as backup).
2a. In LR read in the metadatas for your sequence. Select all files on the library tab (ctrl + a) -> right click metadata -> read metadata.
2b. In LR set custom whitebalance for your files + crop for 16:9. Select all files on develope tab -> switch on autosync -> basic settings: wb custom + crop overlay: aspect 16:9. -> save metadatas (ctrl + s)
2c. In LR set 1 star for your keyframes + adjust the settings for them. Rightclick on the selected images -> set rating: 1 star (switch off autosync!) + filter for 1 star -> adjust the settings for the keyframe as you wish (don't touch the shadows, highlights, blacks, whites) -> save metadatas again.
3a. In BR select all files and right click -> purge cache for selections. Now you will see the settings, what you did in LR.
3b. In BR select all files and run David's awesome ramp multiple script (check all), wait till the process ends.
4a. Before you deflicker the sequence I suggest you to download the visionlog raw camera profile (read the installation guide) and apply it. This will help the deflicker script to work more properly.
5. In LR setup the visionlog raw profile for you sequence. Read in the metadatas for your full sequence (filters off) on the develope tab -> switch on autosync -> camera calibration, profile: visionlog -> save metadatas.
6a. In BR select all files and right click -> purge cache for selections. Now you will see very flat images.
6b. Run deflicker.
7. In LR read metadatas for your sequence and swicth back your camera profile to adobe standard -> save metadatas.
8. In BR select all files and right click -> purge cache for selections. Now you will see everywhere the final multi ramped deflickered sequence.

Maybe it's too long to read and every settings could be done in BR + ACR, but I like the LR's layout.

D-milligan's words of wisdom

------------------------------------

When you make a keyframe its like telling the script "don't touch this frame", it becomes the target for what frames around it to look like. By default the first frame and last frame are keyframes.

So, pick a couple a frames that represent important sections of your time lapse. Then simply adjust them (along with first and last frames) to look however you like. If you modified settings besides exposure, then first do a "ramp multiple" this will make all settings smoothly ramp from one keyframe to the next (if you change WB, make sure all frames are set to Custom WB). Then run the deflicker. It will adjust exposure, making all the frames smoothly transition from one keyframe to the next.

If you want to adjust exposure after the deflicker, you can use the "ramp" in additive mode. It should be easy to avoid that though. Simply make sure your keyframes look like what you want for you final output before running the deflicker.

---------------------------------

It's usually best to do these edits before deflickering in case they introduce any extra flicker themselves, the deflicker will help take care of it somewhat. (ACR has a lot of settings that are 'image adaptive' and they can have a different effect on different source material, causing flicker; the worst offenders are: clarity, highlights, shadows). Of course there are things that are not going to cause extra flicker (like WB, noise reduction, lens corrections), so it doesn't really matter when you do them.

Because of the image-adaptive nature of some of these settings, even the deflicker script won't be able to fully fix the flicker introduced because for example highlights, midtones, and shadows may be affected differently, and the deflicker can only match overall exposure. So you have to be careful when using these settings, there will be limits to the values you can "safely" use (without introducing too much additional flicker).

-----------------------------------

The preview should show you the analysis area and it will highlight the percentile you selected.

Analysis size refers to how big the image is scaled down to before computing the histogram. The smaller you make it the faster the script but the histogram will be less accurate. (the reason for this setting is that the rescale operation is native and very fast, however computing the histogram is done in JavaScript which is very very slow, so rescaling the image down makes the histogram calculation much faster)



My Hint's and tips.


If you're not happy with the de-flicker of a particular section then an easy workflow is to just re-keyframe that section and only select the photos in the section you want to re-de-flicker so you don't have to wait for the whole time-lapse to run again.  Just remember to uncheck any previous keyframes you may have set so as to not affect the behaviour of the new keyframes in the section you are modifying.  Otherwise you might experience some unwanted behaviour

If you want to ramp some other settings after the de-flicker then be sure to uncheck exposure in the Ramp Multiple check box otherwise it will mess up your de-flickering

When de-flickering, if you "select all" in Bridge be sure to uncheck the undoDatoa.jdon file otherwise it will hang the de-flickering and you'll have to force quit bridge (at least I had to) and run it again

I found that often more than 3 passes were necessary before the script was happy so I just set it to 10 passes every time then let it run so I wouldn't have to do it twice every time

Use the percentile measure to fine tune areas that aren't de-flickering well by changing where the de-flickering occurs (but be careful as of you change one area another may get worse best to stick with the sky
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: surami on March 04, 2015, 06:43:45 PM
@dmilligan: is your deflickering script works too with the older ACR process version (2010)? I would like to get back shadows and recover highlights detail in my timelapse (sunny, cloudy, sunny, cloudy) with the fill light and recovery sliders. I read somewhere that it doesn't produces so kind of flickering troubles as the touching of the shadows, highlights, blacks, whites, etc. sliders in the new ACR process version (2012).

... or somebody knows a workflow for getting back shadows and recover highlights without additional flickering?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: guisquil on March 23, 2015, 08:14:03 PM
Quote from: classicbs on February 13, 2015, 12:04:41 AM
I thought I'd compile some of the advice that helped me get my head around this:

Thanks for doing this!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: kbeecher on March 25, 2015, 08:16:48 PM
ok, so im sure somewhere in here people have mentioned this, or hopefully (fingers crossed!) found a solution to this.

So im using this ramp script for a timelapse, and have adjusted the start, end, and set keyframes by using the star method, but when i go to ramp all, it takes care of everything except ramping Clarity..... I noticed there was a setting for ramp clarity 2012 but nothing really else, is that it? or am i missing something here?

basically im trying to take a bunch of camera raw adjustments, set it, then adjust all on out point (and any changes inbetween) then click go. not getting certain values changing right...
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 25, 2015, 08:57:52 PM
Quote from: kbeecher on March 25, 2015, 08:16:48 PM
when i go to ramp all
There is no "ramp all" option in this script. There is a "Ramp Multiple..." which should pop up a window with a whole bunch of checkboxes that let you select which ACR settings to ramp.

Quote from: kbeecher on March 25, 2015, 08:16:48 PM
I noticed there was a setting for ramp clarity 2012 but nothing really else
huh?

It's not very clear to me what you are talking about, so could you be more precise/exact with your words and/or provide screenshots of what you are doing/seeing?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: kbeecher on March 26, 2015, 03:23:15 AM
ramp multiple is what i meant..

Quotehuh?

It's not very clear to me what you are talking about, so could you be more precise/exact with your words and/or provide screenshots of what you are doing/seeing?

I guess i dident explain that well... I see all the settings, and i check them all, it seems to only adjust some... attached are 3 screens, the first 2 with the first and second files, which you can see the clarity does not get ramped... as well as exposure.... and the last image is what im trying to ramp to (with a couple files marked as keyframs to account for lighting when sun drops) (https://lh5.googleusercontent.com/aZPFUfo4hEsyHIgwe7P_jm5KWp1W7wMYI7br6492cmmhTXIdNFg3rBn_c9RUHnrygDXVX7SU50vk56g=w1656-h734) (https://lh4.googleusercontent.com/OiqPrz_jbdpXBFy895uJMSbcBAzhVCDbNdCJQnwbO_M6iDRvu1-oHK46fXbMgMP3XmX6dQbCmI0PRXE=w1656-h734)
(https://lh3.googleusercontent.com/fmJL5TwvlrUEbBiiHf-x3QUq4KZGHhwgF0UP8vafqbqHVDzKY4nsUNzqQVu01PHPypPHcNRjjPnhIVM=w1656-h734)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: kbeecher on March 26, 2015, 03:31:53 AM
screen links (not sure if img tag worked above...)

https://drive.google.com/open?id=0B9YJ-KKTQzXVMG5VVUZkWUR4YzA&authuser=0

https://drive.google.com/open?id=0B9YJ-KKTQzXVTkVudVdsVVc3aWs&authuser=0

https://drive.google.com/open?id=0B9YJ-KKTQzXVM0ZkZGw5ZlRBdGc&authuser=0
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: kbeecher on March 26, 2015, 03:53:55 AM
also these are the options i have available with ramp multiple. any help would be awesome! Ive used it before for small adjustments and its worked but havent used in awhile, and nothing with these many changes... thanks much for the awesome script!

https://drive.google.com/open?id=0B9YJ-KKTQzXVMExkZDVfWlVzQUk&authuser=0
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 26, 2015, 08:59:42 PM
none of the links work, make sure you get a "public" link, and the img tag dosen't work with https (only http)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: kbeecher on March 26, 2015, 10:04:54 PM
I updated all the links above, instead of adding more posts... Really hope you can help me wrap my brain around this...
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: jasm on May 10, 2015, 08:30:11 AM
nice
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: ansius on June 18, 2015, 12:17:48 PM
So, I have been using this script, but recently I started to have problems with large time lapses, where I have more than 250 frames, I do usually.

first - even tough this script is supposed to wait till bridge regenerates preview - it does not, at least when there are a lot of frames. So having 3 iterations on row is pointless - first one works, rest of them results are unpredictable. at least in my case, I had to run 3-4 times, each time purging cash my self and waiting till bridge rebuilds it. to get decent result

second - script eats up memory, when i have my 900 something shots, and when an iteration is finished, my 6GB RAM is full with bridge, and it gets freed only when I restart bridge. And if I don't restart and run next iteration - it can lead to extensive swap file usage - read - it makes slow script even slower. I'm not a pro programmer (tough I have written scripts for AfterEffects, InDesign, PHP, AVR ASM, Arduino) but for me it seams that variables, get created and information stored in ram but they do not get cleaned and unset when not used - there for eventually you would run out of memory.

but thanks for the script - in all grate tool!
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: kross on July 24, 2015, 02:20:38 PM
I just wanted to give a thank you for this script, as well as for ML in general.  I just downloaded this a couple days ago, and made my first timelapse video. 

Star trails and Northern Lights (Aurora Borealis):

https://youtu.be/jsSZsvLbWA8

Thanks!
-- Kevin

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Brawl on August 10, 2015, 08:13:08 PM
does this script works with .tiff images? thanks
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on August 12, 2015, 01:32:22 AM
Yes
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on September 06, 2015, 09:10:47 PM
I'm working on porting this script to Lightroom. As of Lightroom 6, the SDK now has basically all the necessary functions needed. Here's the start: https://github.com/davidmilligan/LrDeflick
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: DeafEyeJedi on September 07, 2015, 12:59:32 AM
Thanks, David!

Just downloaded and will test it out on LR5 since that's all I have atm.

Question -- is this where I can get djpeg utility from libjpeg?

http://libjpeg.sourceforge.net
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on September 07, 2015, 04:13:37 AM
Yes, or here: https://github.com/LuaDist/libjpeg
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: DeafEyeJedi on September 07, 2015, 07:10:04 PM
Seems I'm having trouble to get it compiled and running.

Is this specifically for LR6 or can still be used on earlier versions?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on September 07, 2015, 07:27:33 PM
LR6 only. LR5 API does not have the requisite functions.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: NickZee on December 08, 2015, 08:47:13 PM
@classicbs

Nice work! 

What theory did you go with when selecting a "Percentile" for the day to night transition?

At the beginning, do you want the percentile to be in the highlights or shadows?  And how far in the HL or SH?  In my sunset time lapses, I'm not finding a common ground because the I think the the 'red dots' of the percentile shift to an unreadable section of the image as it gets darker.  I've run Bridge, over night, with 300 iterations and still don't get a deflickered TL.  I have tried a low percentile like 0.20 and a high one like 0.90.  Love to hear your wisdom about this. 

Also, did you find an Analysis Size, Crop, Width, Height that produced better results?

I need to try your VisionLog suggestion next. 

Here's the 'red dot' I am referring to for those who might wonder. 
These images show 0.20, 0.70 and 0.90.

(http://s18.postimg.org/6v3oo1jwl/020a.jpg) (http://postimg.org/image/6v3oo1jwl/) (http://s18.postimg.org/q1gvr80ed/020b.jpg) (http://postimg.org/image/q1gvr80ed/)

(http://s18.postimg.org/bjjoj8939/070a.jpg) (http://postimg.org/image/bjjoj8939/) (http://s18.postimg.org/oc7sj5kp1/070b.jpg) (http://postimg.org/image/oc7sj5kp1/)

(http://s18.postimg.org/5xx9f68ed/090a.jpg) (http://postimg.org/image/5xx9f68ed/) (http://s18.postimg.org/qw3fd9891/090b.jpg) (http://postimg.org/image/qw3fd9891/)

Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on December 08, 2015, 10:09:23 PM
Percentile shouldn't matter much, just stick with using the median (0.5), I've considered removing this option altogether, b/c it doesn't really make much difference. The red highlights are just showing you where in the image that percentile is, but the entire image effects the percentile level, so it's not like that's the only area where it's doing the deflickering.

Something that might actually help would be to consider breaking the deflicker into shorter segments using keyframes (one star rating marks a keyframes).
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: ansius on December 09, 2015, 07:38:31 AM
please do not remove it, it is useful. It could be optional. I'll try to explain why - I had shot time lapse with radio telescope and partly clouded sky, the thing is that telescope brightness flickered, but sky did not as much, with the percentile I was able to make one or the other without flicker. here is sample with first iteration of .5 median deflickering:
https://www.youtube.com/watch?v=2N-ZULQL6yE (https://www.youtube.com/watch?v=2N-ZULQL6yE)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: getho on December 11, 2015, 03:27:02 AM
finding deflicker creating wildly flickery results on a sequence shot in aperture priority auto.  Also is the preview supposed to show the percentile within bridge?  If so mine doesn't.  Could these things be related?  (i'm using a a value of .6 for the percentile). 
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: mindfull on March 29, 2016, 02:26:50 AM


hi.

anyway somebody can give a little tutorial on how to instal LrDeflick and the libjpeg for macosx? I don't understand how...

trying the deflicker in Bridge but is not working..hanging color ball all the time..is a 1027 files to deflick..it worked once but later i get frozen ball again and again..so i wanted to try the LR deflick..but dont know how to install.

thanks
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on March 29, 2016, 03:05:28 AM
https://github.com/davidmilligan/LrDeflick/releases/download/v0.1.0/deflick.lrplugin.zip
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: mindfull on March 31, 2016, 09:36:06 PM
thanks a lot Dmilligan.

I thought i had to install something else to make it work...maybe i do.

i tried it now and got this message...


(https://dl.dropboxusercontent.com/u/65174281/Screen%20Shot%202016-03-31%20at%2012.28.45.png)


sorry to bother..and do try to figure it out...but my head will explote soon...going out to shoot another timelapse just now..will do more testing soon.

I do have something to figure out..after all deflicker is done I am doing the export DNG --> after effect--> prores  but somehow i get flicker movie after all of this...if i do export to jpg from LR it looks good..so i am guessing something on the dng are wrong...if anyone has a clue it will save me 40 hours of trying...hehehe..thank you.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: barepixels on April 04, 2016, 06:08:34 AM
am getting same error too on Win 7.   Using latest LR CC 2015

mark first frame 1 star, last frame 1 star, select all, choose File > Plugin Extras > Run Deflicker

Canon 7d  Cr2
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on April 04, 2016, 12:55:36 PM
For Windows I can't help you. You'll have to compile libjpeg yourself and put djpeg.exe in the plugin folder.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: getho on April 06, 2016, 12:04:37 PM
this script is now the basis of my timelapse workflow.  I love it.  Is it possible to add dehaze to the script?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: rsmith02 on April 12, 2016, 12:28:35 PM
Can someone assist with compiling libjeg for Windows? I would like to try it as well but have no idea how to do this nor any programming-type software. I just shot a timelapse sunrise to donate to my town for marketing and would like it to look as good as possible.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Walter Schulz on April 12, 2016, 12:34:32 PM
Why not using Windows binaries?
http://gnuwin32.sourceforge.net/packages/jpeg.htm
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: rsmith02 on April 12, 2016, 01:03:27 PM
Thanks Walter. I just downloaded the Windows binary from there and put it in the deflick.plugin folder. I still get the "Unsupported PPM format - Expected a binary RGB (P6)" error when attempting to apply them to my DNG files.

Is this script expecting a different version of or not work with DNGs?

Looking at the file, this appears to be a 2005 version of djpeg, version 6.2.1961.25445 if it matters.
I'm on 64 bit Windows 7 with Lightroom 6.5.

[Edit: the setup program doesn't seem to work so I only copied over the .exe. There is also a dependencies folder with a dll. I copied that into system32 but it still doesn't work]
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: rsmith02 on April 14, 2016, 11:37:30 AM
If there is anything I can do to help troubleshoot this with LR 6, please let me know and I'll do my best.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Walter Schulz on April 14, 2016, 11:39:11 AM
I will try to reproduce your issue (Win7/8.1 and LR 2015 CC) but it will take some time.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Walter Schulz on April 19, 2016, 10:36:45 AM
Sorry, occupied with some other stuff. Will retry next weekend.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: rsmith02 on April 20, 2016, 08:16:04 AM
No problem at all. Let me know if there's anything I can do as a user to be helpful.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: PaulJBis on April 24, 2016, 12:21:36 AM
Hello!

I just saw that dmilligan ported the deflickering script to Lightroom. My question is: is there any advantage in running it instead of using the Bridge version? The main one I can think of would be speed: is the Lua engine in Lightroom multithreaded? (Watching the deflickering script using just one core in my CPU gets kinda old...)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: breaker on May 06, 2016, 10:58:01 PM
Quote from: Walter Schulz on April 14, 2016, 11:39:11 AM
I will try to reproduce your issue (Win7/8.1 and LR 2015 CC) but it will take some time.

Tried the Plugin for Lightroom. LR CC 2015.5.1 running on Windows 10. Same problem here (Unsupported PPM format). The picture stored in the plugin diectory (temp.jpg) is also corrupted in some way. Can't be opened in PS, but Microsoft Pictures opens it, but there is a lot of horisontal lines:

(http://s32.postimg.org/3u4obem11/temp.jpg) (http://postimage.org/)
img host (http://postimage.org/)

I appreciate all the work you all do for us!  :)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: getho on June 03, 2016, 08:47:50 AM
sooo....
I have a particularly tricky sequence, I pulled aperture during a sunset and removed an nd filter at one point.  The exposures are all over the place but the sequence never clips.  I have 3 keyframes set (one at each end one in the middle).  Running the deflicker on the 0.5 percentile i end up with wildly more uneven exposure than in the original files., some frames are nearly black others really overexposed. The frames jump from light to dark with no reason that i can see - not corresponding to aperture or iso shifts.  I've also run it at .7 percentile and get a similar thing. What am I doing wrong?

(https://dl.dropboxusercontent.com/u/30195567/2016-06-03_174456.jpg)
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: rsmith02 on June 24, 2016, 04:21:18 PM
I wanted to check back here and see if there's been any progress with the LR deflicker script. I just encountered a timelapse where ML's deflicker and LRTimelapse failed to do any meaningful deflickering on an ETTR sunset sequence and would love to see if this script does any better. I only have LR and not a modern copy of Bridge.

Happy to help test and troubleshoot if I can.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: rsmith02 on June 25, 2016, 06:06:14 AM
Forgive the multiple posts but today I tried to download a trial of Bridge CC to test out the script. Upon doing so I realized that Bridge CC is actually free, as in despite me not having a CC subscription I was allowed to download and use it without any apparent restrictions.  I do have an Adobe Account as I use Lightroom (non-subscription version).
Download it here: https://creative.adobe.com/products/download/bridge
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: bwinters123 on August 09, 2016, 12:58:10 AM
Can someone tell me how/if I can run the LrRamp and LrDeflick scripts in Lightroom 5.6?  I downloaded the .lua files, but I can't run them as a plugin and I don't know how to just run them as a script.  Is there someway to convert the .lua files into a proper plugin?  I also don't know how to "compile" djpeg?  Anyone got some tips for a sad total newb?

Thanks
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: classicbs on August 30, 2016, 05:40:16 PM
QuoteHello!

I just saw that dmilligan ported the deflickering script to Lightroom. My question is: is there any advantage in running it instead of using the Bridge version? The main one I can think of would be speed: is the Lua engine in Lightroom multithreaded? (Watching the deflickering script using just one core in my CPU gets kinda old...)

Me too, any news?

Cheers
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: classicbs on September 07, 2016, 01:14:55 PM
QuoteCan someone tell me how/if I can run the LrRamp and LrDeflick scripts in Lightroom 5.6?  I downloaded the .lua files, but I can't run them as a plugin and I don't know how to just run them as a script.  Is there someway to convert the .lua files into a proper plugin?  I also don't know how to "compile" djpeg?  Anyone got some tips for a sad total newb?

Thanks

according to dmulligan it doesn't work in light room 5

QuoteLR6 only. LR5 API does not have the requisite functions.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: rsmith02 on September 07, 2016, 04:04:11 PM
It actually doesn't work on LR 6 either.

Do what I did and download the latest version of Bridge CC. You actually don't need to be a paying Creative Cloud user (I'm not)- an Adobe account seems to be enough.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: classicbs on September 13, 2016, 06:50:56 PM
Hi David,

I'm having trouble with using your script in lightroom 6 (version - 2015.6.1).  I've used it before in Bridge but it takes forever and sometimes just doesn't work (too many images at once?).  My friend installed djpeg after compiling it with brew and we've put it in the plugins folder but I'm getting the same error message as a previous user when I try to run the script "Unsupported PPM format -> Expected a binary RGB (P6)".  Can you help? I'd love to use this plug in in Lightroom (mainly as I think it'd be quicker?)

Thanks in advance

James
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: dmilligan on September 14, 2016, 02:26:08 AM
Works fine here (2015.6.1). Try the download from the release page (https://github.com/davidmilligan/LrDeflick/releases): https://github.com/davidmilligan/LrDeflick/releases/download/v0.1.0/deflick.lrplugin.zip

It already includes djpeg and should work as is.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Jato on May 21, 2019, 02:22:21 PM
Sorry, because this thread is quite old, but: i still can't use LR deflicker plugin, and i just get that message:

Unsupported PPM format -> Expected a binary RGB (P6)

LR CC 2015
CR2 files from a 7Dmk2

Any help, please?
edit: i'm using the plugin version of the previous post, from the release page.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: Jato on May 23, 2019, 02:48:26 PM
:( Nobody had the same problem?
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: NitromanX on February 08, 2020, 12:26:22 PM
DMilligan - I love the ACR Bridge Ramp fantastic script - i used to use it for Canon 5D2 and ACR timelapses ...

The Ramp script still works in latest ACR Bridge 2020 ... but I just tried using Ramp Multiple and i can't get it to work in latest Bridge CC 2020.

I know it's an old script but should it be compatible? It's still incredibly helpful to all of us shooting timelapses.

I'm trying to install old version of Photoshop CS3 on Mojave ... to see if old script works but i guess it's a bit of a long shot.

Any update would be of great interest !

Big thanks !
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: sunspot on April 05, 2020, 07:27:57 PM
Many thanks also from me 8) - after fiddling around with other software giving not so nice results, this Bridge script led to success in Deflickering!
Here is my workflow for this video

Hope this helps for anyone with similar preconditions.
Title: Re: Script for deflickering and ramping ACR (.xmp) settings in Bridge
Post by: elenhil on November 01, 2021, 08:51:32 AM
Quote from: Jato on May 21, 2019, 02:22:21 PM
Sorry, because this thread is quite old, but: i still can't use LR deflicker plugin, and i just get that message:

Unsupported PPM format -> Expected a binary RGB (P6)

LR CC 2015
CR2 files from a 7Dmk2

Any help, please?
edit: i'm using the plugin version of the previous post, from the release page.
I'm having the exact same problem, though in my case it's FRSP DNGs.