Magic Lantern Forum

Using Magic Lantern => Tutorials and Creative Uses => Topic started by: garry23 on November 24, 2019, 06:07:20 PM

Title: Shutterless ND simulation using FLV
Post by: garry23 on November 24, 2019, 06:07:20 PM
I thought some may be interested in my latest experiments: http://photography.grayheron.net/2019/11/no-more-nd-filters.html

Many thanks to those who have helped me understand the 'video stuff'.

Cheers

Garry
Title: Re: Shutterless ND simulation using FLV
Post by: c_joerg on November 25, 2019, 09:56:18 AM
I have been using this technique for a long time with my time lapse recordings to get more motion blur. LRTimelapse also has this feature. That's called 'Motion Blure'.
I usually use the combination of median and mean.

However, this method only works very well in very few cases. Simple waves can be smoothed out quite well.
But if the waves break with a white spray, then it will not look so nice anymore. The problem is the gaps between the individual shots that you cannot prevent.
Even objects that move slowly and are always overlapped a bit, look very choppy.
If in your example the branches would move through the wind, then that would not look so nice. I always separate through a mask the water surfaces of the rest of the scene.

https://www.youtube.com/watch?v=fyYJ3PRhlc0
Title: Re: Shutterless ND simulation using FLV
Post by: a1ex on November 25, 2019, 10:28:42 AM
Quote from: c_joerg on November 25, 2019, 09:56:18 AM
The problem is the gaps between the individual shots that you cannot prevent.

To my knowledge, when using FPS override, the gaps between shots can be very very small. I've hardcoded a limit of 10 units (FPS timer B units) without thinking too much about it; on 5D3's full-res LV, one unit is exactly 33 microseconds (timer A = 792, main clock = 24 MHz), and it's actually the time required to read out one line. At 5 FPS, a gap of 10 units will give an exposure time of 0.19967 seconds (0.165% gap), and this gap can probably be made even smaller. This is pure theory; I did not run any tests to confirm the actual shutter speed or gap size.

TLDR: you can prevent these gaps, at the expense of rolling shutter :)
Title: Re: Shutterless ND simulation using FLV
Post by: c_joerg on November 25, 2019, 10:45:07 AM
Quote from: a1ex on November 25, 2019, 10:28:42 AM
To my knowledge, when using FPS override, the gaps between shots can be very very small. I've hardcoded a limit of 10 units (FPS timer B units) without thinking too much about it; on 5D3's full-res LV, one unit is exactly 33 microseconds (timer A = 792, main clock = 24 MHz), and it's actually the time required to read out one line. At 5 FPS, a gap of 10 units will give an exposure time of 0.19967 seconds (0.165% gap), and this gap can probably be made even smaller. This is pure theory; I did not run any tests to confirm the actual shutter speed or gap size.

TLDR: you can prevent these gaps, at the expense of rolling shutter :)

Then it's time to try it out...
So far I have only done this with Canon RAW.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on November 25, 2019, 01:27:33 PM
@c_joerg

Fully understand what you are saying.

Of course the technique is not new and it has limitations.

One 'advantage' of the technique, over 'just' using an ND filter, is that you have the ability to merging in data from one of the images.

Having said this, LE photography has its look.

I could see this working well for urban/building LE work as well as LE seascapes, eg against rock, etc, ie where there aren't many trees/things moving about ;-)

@a1ex

One thing I'm still ignorant of is how the fps override works. For instance if I have an ML shutter set at 0.5s and an fps override at 1, does this mean I will end up with a frame to frame 'gap, eg simplistically 0.5s in this example. Or does ML keep grabbing images with 'no/little' gap between frames?

Sorry for being thick.
Title: Re: Shutterless ND simulation using FLV
Post by: a1ex on November 25, 2019, 01:53:25 PM
I don't get the question. FPS override 1 means 1 frame per second. Shutter set to 0.5s means an exposure time of 0.5s.

If you want to capture 0.5s exposures at 1 frame per second with no gap between frames, how would you do that?!
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on November 25, 2019, 02:04:16 PM
@a1ex

I understand the fps and the frame to frame gap limitation.

I guess I was thinking was there a way, with the current set up, to 'force' ML to capture near continuous images, up to the fps limit.

So that as long at the exposure was less than the 1/fps 'limit', with a buffer time of some kind, the system would keep taking and recording images in a frame-to-frame near-continuous fashion.

Thus, if I set fps override to, say, 1 FPS, and as long at my exposure was more than 1, ML would capture an MLV file with as many frames as could be taken.

I appreciate that for videographers that would not be that interesting, but as a photographer tool I see real advantages.

Cheers

Garry


I'll do some more thinking  ;)
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on November 25, 2019, 06:33:21 PM
@a1ex

Forgive the confusing post earlier. I get it now apart for one thing I didn't get.

QuoteTLDR: you can prevent these gaps, at the expense of rolling shutter :)

In my use case I guess I'm not worried about rolling shutter, thus should I use a particular  setting.

BTW after I set up for FLV recording, I mostly see that ML has adjusted the shutter. For example I set a shutter of 0.9s and an override FPS of 1. Once things settle down, I see ML has adjusted the shutter to 0.7s, but I can go into the ML exposure menu and adjust it back to, say, 0.9s, and based on your 10 units info, I guess I could go further, ie to minimise the frame to frame 'gap'.

Title: Re: Shutterless ND simulation using FLV
Post by: a1ex on November 25, 2019, 07:29:04 PM
Asked and answered.

Quote from: a1ex on November 18, 2019, 10:11:17 AM
- the full-range shutter doesn't seem to work with FPS override, but can be tricked if you also enable expo override (set exposure time to 1/25 via expo override, and afterwards enable FPS override and crop_rec)

Quote from: a1ex on November 18, 2019, 12:17:43 PM
In 1080p25 with FPS override to 1 second, I've got 0.5" mapped to 1/50. ML tries to remap the available shutter range in movie mode (1/33 ... 1/4000) to 1/FPS ... fastest_shutter (source (https://bitbucket.org/hudson/magic-lantern/src/91593cabf6c9a97541b7f7de5f633b21ff75ad83/modules/crop_rec/crop_rec.c#lines-692)), but - for some reason - it remapped 1/33 to 0.7" or 0.8" instead of 1" in my tests; likely caused by conflicts between crop_rec and FPS override. With FPS override turned off, shutter speed mapping appears to work as expected.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on November 25, 2019, 07:48:00 PM
@a1ex

Thanks.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on November 26, 2019, 08:48:47 AM
@a1ex

If you have a few minutes, could you help me understand the following.

If I switch on fps and raw video etc in my script, and even if I wait, ie sleep, in the script for 20s: if I then check resolution, it is not on FLV.

If, however, in the script, I switch the ml menu on, select movie, and switch ml menu off, three times, the resolution shows FLV is set.

I know you said things needed care in setting up.

BTW I'm of using lua to switch the menu a few (3) times: I'm just trying to understand what's going on.

Cheers

Garry
Title: Re: Shutterless ND simulation using FLV
Post by: Danne on November 26, 2019, 11:09:43 AM
It is common practice when changing crop_rec presets to also include a canon menu push in between for registry to settle.
I guess best way to get in deep you need to ready through a couple of pages here https://www.magiclantern.fm/forum/index.php?topic=19300.0

I think this works rather fast in lua(Jip-Hop added this to my cine.lua script added in my eosm branch):
lv.pause()
lv.resume()

Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on November 26, 2019, 02:01:12 PM
@Danne

Great info.

I'll try it all out tonight, ie in my script that I'm developing.

Cheers

Garry
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on November 26, 2019, 10:55:49 PM
@a1ex

Sorry to bother you, but I need a little insight.

I'm trying to set the Desired FPS based on the shutter (t), ie fps = 1/(t + a bit).

If FPS is set to 1, when I use menu.get("FPS override","Desired FPS",1) I don't get 1 I get  7 or 8.

When I use menu.set("FPS override","Desired FPS",1) I get an FPS of 7 coming up.

Could you throw some light on this. As I say, I wish to explicitly set FPS from Lua.
Title: Re: Shutterless ND simulation using FLV
Post by: a1ex on November 27, 2019, 08:57:50 AM
Here: https://bitbucket.org/hudson/magic-lantern/src/b3ced2ced2d5500ded0ef40866e96f298b897b75/scripts/api_test.lua#lines-399

Problem: the crop_rec_4k builds contain an older version of Lua, that IIRC doesn't really work when changing FPS or other "tricky" menus. I should fix that.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on November 27, 2019, 09:52:36 AM
@a1ex

I feared you were going to say that.

I removed all my other scripts when developing my latest LE script.

I fear my focus scripts will now fail (but haven't tested yet) as they use the latest Lua fix.

Cheers

Garry
Title: Re: Shutterless ND simulation using FLV
Post by: Danne on November 27, 2019, 10:03:27 AM
Could you test also this build? Not sure if I updated lua changes or not but a quick test would reveal if done:
https://www.magiclantern.fm/forum/index.php?topic=23041.msg216899#msg216899
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on November 27, 2019, 10:05:22 AM
@Danne

Will do tonight (UK).

Cheers

Garry
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on November 27, 2019, 08:51:14 PM
@Danne

Quote
Could you test also this build? Not sure if I updated lua changes or not but a quick test would reveal if done:
https://www.magiclantern.fm/forum/index.php?topic=23041.msg216899#msg216899

Just tested.

My other scripts and sleep vs msleep work, so I guess this is the latest Lua fix.

First problem, no ETTR module  :(

Second problem, my script doesn't seem to run, ie it won't set max res in the raw video module. Don't understand why.

As I'm off on a trip tomorrow, I'll revert to the experimental build, that I know I can use. Plus it has ETTR  ;)

Many thanks for trying to help.

Cheers

Garry
Title: Re: Shutterless ND simulation using FLV
Post by: Danne on November 27, 2019, 09:05:19 PM
You can add any missing modules from the crop_rec_4k branch.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on November 27, 2019, 09:37:16 PM
Of course!!!!!! ::) :-[
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on November 28, 2019, 08:18:12 AM
@Danne

Quote
Could you test also this build? Not sure if I updated lua changes or not but a quick test would reveal if done:
https://www.magiclantern.fm/forum/index.php?topic=23041.msg216899#msg216899

I've convinced myself this is not the latest Lua fix as I can't change the Desired FPS in Lua, ie see here from @a1ex

QuoteHere: https://bitbucket.org/hudson/magic-lantern/src/b3ced2ced2d5500ded0ef40866e96f298b897b75/scripts/api_test.lua#lines-399

Problem: the crop_rec_4k builds contain an older version of Lua, that IIRC doesn't really work when changing FPS or other "tricky" menus. I should fix that.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 01, 2019, 10:10:36 PM
I thought some may be interested in my latest post: http://photography.grayheron.net/2019/12/field-testing-le-simulator-script.html

I've updated the script and believe it is now a useful tool, ie if you forget your NDs and wish to capture a Long Exposure image.

As usual I welcome any comments, especially ones that improve my workflow and/or script.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 04, 2019, 11:35:14 PM
Updated script at: https://gist.github.com/pigeonhill/4efb0fdde3f4cc710dd1f7097ec0f821

The script now provides the option of taking an Advanced Bracket set after it has taken the MLV FLV Long Exposure simulation.

Just make sure that the Advanced Bracketing is set up as needed.

I've also added in several LV prompts.

Fully tested on a 5D3, so far.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 14, 2019, 05:19:18 PM
Another update: this time to align the script with my workflow.

The script may be downloaded from here as usual: https://gist.github.com/pigeonhill/4efb0fdde3f4cc710dd1f7097ec0f821

The workflow goes like this:
1. Set up ML menus for the script, ie Advanced Bracketing to +/- and Auto and exposure simulated time in the ML bulb menu (but leave set off)
2. Compose
3. Select the LE Sim script from the ML Script menu and run it
4. From now onwards just follow the LV instructions
5. Once you have captured your MLV FLV LE the script will give you the option of taking an auto bracket set - which I advise you do it

'Develop' the MLV in MLV App, using the average TIFF preset (but note there is a 128 frame limit).

Post process in, say, Photoshop, and blend the LE sim with the other brackets you took.

As usual, I welcome others trying the script and providing feedback.

I've only tested the script on a 5D3 running the 4K experimental build.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 17, 2019, 08:50:35 PM
As MLV App's processing limit when averaging is currently 128 frames, I've added in some feedback to tell you what the estimated number of frames in your LE MLV clip will be.

If it is, say, greater than 120, you can decide to go ahead anyway, and handle the clip in post, ie split it, or decide to adjust the FPS.

As usual, the latest version is here: https://gist.github.com/pigeonhill/4efb0fdde3f4cc710dd1f7097ec0f821

At the moment the feedback does clash a little with other text on the screen, however, a half shutter usually brings some clarity.

Cheers

Garry
Title: Re: Shutterless ND simulation using FLV
Post by: ilia3101 on December 17, 2019, 11:50:32 PM
QuoteAs MLV App's processing limit when averaging is currently 128 frames, I've added in some feedback to tell you what the estimated number of frames in your LE MLV clip will be.

Isn't there a way to average a whole MLV in to a new single frame MLV? Then process that...
Title: Re: Shutterless ND simulation using FLV
Post by: Danne on December 18, 2019, 07:04:43 AM
Yup. If it's not shifting iso mlv_dump averaging is working fine.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 18, 2019, 07:25:18 AM
QuoteIsn't there a way to average a whole MLV in to a new single frame MLV? Then process that...

The problem is the only Win version of MLV App I have is the one I can download from the first page on the MLV App post.

I need to wait until someone compiles at tmix tweak, i.e. from a 128 limit to, say, 1000.
Title: Re: Shutterless ND simulation using FLV
Post by: Danne on December 18, 2019, 07:39:03 AM
Mlv averaging work for all os versions I think. @masc?
If you want ffmpeg compiled tmix filter don't hold your breath. Only official change is if compiling is as reliable as the official build. Takes a while to work out the environment and I think it's of low priority.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 18, 2019, 08:01:26 AM
QuoteMlv averaging work for all os versions I think. @masc?

Maybe I'm misreading understanding things.

I thought TIFF averaging of an MLV in MLV App had a 128 limit?
Title: Re: Shutterless ND simulation using FLV
Post by: Danne on December 18, 2019, 08:06:43 AM
Mlv averaging into an averaged mlv is working. That mlv can be exported to tiff.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 18, 2019, 08:21:55 AM
Got it.

So If I carry on doing the two step process, I'm good to go  :)

Thanks for clarifying/reminding me.

I'll leave in the warning feedback, as it only tells you how many frames you will capture.

Cheers

Garry
Title: Re: Shutterless ND simulation using FLV
Post by: masc on December 18, 2019, 08:27:13 AM
Quote from: Danne on December 18, 2019, 07:39:03 AM
Mlv averaging work for all os versions I think. @masc?
Yes, works on all supported OS.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 18, 2019, 05:24:27 PM
Just an update of the UI, but the script remains a little clunky, as my workflow interacts with LV, movie and ML menu modes.

Latest version is here: https://gist.github.com/pigeonhill/4efb0fdde3f4cc710dd1f7097ec0f821

This version gives you an estimate of the number of frames that will be captured, but as was pointed out by @Danne, if over 128 you will need to 'double process' the averaged output in MLV App. If the number of frames is 128 or less, then you can single process the average as a TIFF.
Title: Re: Shutterless ND simulation using FLV
Post by: masc on December 18, 2019, 06:23:35 PM
Quote from: garry23 on December 18, 2019, 05:24:27 PM
... if over 128 you will need to 'double process' the averaged output in MLV App.
That is just right for TIFF export. MLV averaging has no limit. As written above.
Title: Re: Shutterless ND simulation using FLV
Post by: Danne on December 18, 2019, 06:30:15 PM
Quote from: masc on December 18, 2019, 06:23:35 PM
That is just right for TIFF export. MLV averaging has no limit. As written above.
8) repeat,repeat,repeat...
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 18, 2019, 06:37:28 PM
@Danne

Not sure what you are moaning at me about now.

All I said was you can directly average, via the TIF preset, if you have an MLV with 128 or less frames. If your MLV has more than 128 frames then you first create an averaged MLV, step 1, then export that single frame MLV as. TIF, step 2.
Title: Re: Shutterless ND simulation using FLV
Post by: Danne on December 18, 2019, 06:47:42 PM
Well that's good. Not very clear in the first description.
Merry christmas!
/moaner ;)
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 18, 2019, 06:50:16 PM
...and a Happy New Year  :)
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 18, 2019, 10:29:33 PM
I thought I would put up an image taken with the help of this script.

The base exposure was 0.3s and I captured a 75 image MLV, ie a shutterless simulated LE of about 23s.

I've reduced it in size for posting here.

BTW the location is Port Quin in Cornwall.

(https://pictshare.net/g18ngx.jpg)
Title: Re: Shutterless ND simulation using FLV
Post by: DeafEyeJedi on December 19, 2019, 08:23:42 AM
Beautiful shot and thanks for sharing the updated script for Shutterless ND simulation using FLV @garry23!  8)
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 19, 2019, 06:33:48 PM
@DeafEyeJedi

Not that beautiful and I didn't remove sensor spots from the smoothed out sea, a downside of LE photography, ie tidying up water as well as sky  ;)

Despite this, I'm content with the script and now I can travel lighter, ie without loads of NDs.

My Christmas break job is to test the script on my EOSMs, and report back here.

Cheers

Garry

Update. Just realised, unless I'm wrong, that the EOSM won't capture FLV.
Title: Re: Shutterless ND simulation using FLV
Post by: Danne on December 19, 2019, 11:46:24 PM
This might be of interest:
https://www.magiclantern.fm/forum/index.php?topic=9741.msg223648#msg223648

Specify amount of frames you want recorded then stop automatically. Connected to my tlapse script it will give full control over average functionality.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 20, 2019, 11:01:46 AM
@Danne

BTW where is your tlapse script?
Title: Re: Shutterless ND simulation using FLV
Post by: Danne on December 20, 2019, 11:33:43 AM
In lua section. Called tlapse rec delay script or similar. Not my cam here.
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 20, 2019, 11:49:14 AM
OK: I'll download tonight  :)
Title: Re: Shutterless ND simulation using FLV
Post by: garry23 on December 29, 2019, 12:42:07 PM
First of all a big thank you to @Danne for his 5D3 updates, and second a continuing thank you to @a1ex for putting up with my questions.

This post announces the release of the Shutterless ND script that only works on a 5D3 and with @Danne's 29th Dec 2019 release from here https://www.magiclantern.fm/forum/index.php?topic=23041.msg216899#msg216899

The script may be downloaded from here: https://gist.github.com/pigeonhill/63868de59db453491dba0065eec62ee7

The script's purpose is to create a single MLV full res video to allow you, in post, to simulate a long exposure.

The script appears stable enough for me to release it, although I seem to get the odd ML 'back end' error thrown up now and then. When this occurs I simply switch the camera off and on and all seems OK.

As usual the script was written for me and my workflow  ;)

To use it simply run the script LESM (D) under the script menu.

You need to start in photo mode, but you can be in LV or not.

The shutter range is limited to 0.15 to 5 seconds.

The script is designed to take you through the following workflow, via on screen prompts:

Step 1: check everything out and set up a few things

Step 2: allow the user to tweak the shutter, desired FPS and bulb time; then press TRASH to continue (note ignore RAW video feedback, as we are not in video mode yet)

Step 3: now get into movie mode. Pressing MENU or a halfshutter will refresh things if ML doesn't display things correctly. The script provide feedback on ND time and the number of frames it will capture

Step 4: now capture the MLV ND simulation

Step 5: now adjust exposure, if required, and take an advanced exposure bracket set, or more if required. Remember to set up the bracketing to suit your needs, eg auto works well, and switch it off.

As I say, follow the on screen prompts.

Finally, process in MLV App and Photoshop as required.