Danne's crop_rec_4k experiments for EOS M

Started by Danne, December 03, 2018, 06:10:17 PM

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.

berechiah

Quote from: Jip-Hop on July 01, 2019, 08:46:16 AM
Is anybody using the SanDisk Extreme PRO - 256 GB - SDXC UHS-I - 95 MB/'s card? And is it any good for continuous recording?

Thata the exact one I have
I get continuous record no problem

Handles video very well

Jip-Hop

Good to know! My 64gb card fills up way to quickly obviously.

Danne

New version:
https://www.magiclantern.fm/forum/index.php?topic=9741.msg208959#msg208959

Commit:
https://bitbucket.org/Dannephoto/magic-lantern/commits/97b85292c2584f3060535c190a67c2be4c26b773?at=crop_rec_4k_mlv_snd_isogain_1x3_presets

- x3crop toggle switch in Crop mode sub menu. Works for all mv1080p modes(including mcm rewired mode that is)

3xcrop toggle




What´s it all about:
Often thought about a way to toggle between regular and x3crop mode sort of not missing the opportunity to record zoomed and non zoomed without having to dig deep in menus. Jip-Hop recently also asked about this and built a lua script here so I´d thought I´d take a look at it but c-code wise:
https://www.magiclantern.fm/forum/index.php?topic=9741.msg218100#msg218100

Borrowed some code from mlv_lite.c and mixed it into a few places in crop_rec.c and it works fairly well.
1 - Enable x3crop toggle
2 - Press halfshutter for around a second and it will will switch mode
3 - Press record

Wouldn´t use autofocus on this one ;) If so you need to put in a msleep after this part:
if (get_ms_clock() - last_hs_unpress > 500 && (crop_patch && get_halfshutter_pressed() && x3toggle == 0x1))


garry23

@Danne and @Jip-Hop

You may wish to look at and adapt by Cycler script.

https://www.magiclantern.fm/forum/index.php?topic=23679.0

This allows me to use keys as normal and extend them.

Jip-Hop

Thanks for looking into it Danne! I was out today shooting with my script and found it super convenient to quickly toggle the 3x crop mode.
Just tried out your new build and it toggles the 3x crop mode nicely :)

Some feedback:
Toggling with longpress of half shutter button feels a bit less responsive than what I experienced with my script today.
Before toggling it goes into the slow black and white live view first, and sometimes stays there a second or two.
Also I have Magic Zoom assigned to half shutter press, so for me this conflicts at the moment.
I find the info button a good choice because I don't really use that one.

I guess I could stick with your neatly integrated solution, and instead make a script which toggles Magic Zoom always on/off with the info button instead.
For this I'd definitely look at the Cycler script made by garry23!

Danne

Let me know what you come up with.
Response with a delay since it's the halfshutter button. Maybe not the best button. If you get a script working with info button I could include it.
He, your script already does that. Well, gonna check into that later...

Jip-Hop

Nice thing about your solution, which doesn't seem to rely on Lua api, is that there's no need to enter and exit the Canon menu to get the x3cropmode to come into effect.

If there'd be a way to refresh the regs from Lua, like you do without enter and exit Canon menu, then it would become a lot easier to switch between different modes from Lua scripts.

garry23

@Jip-Hop

All ML menu items cam be controlled from Lua  ;)

Jip-Hop

I know and that's awesome! But for toggling the 3x crop mode, or switching between modes like mv1080 and anamorphic mode, you need to enter the Canon menu (not ML menu) and exit it. It's a workaround so the settings will actually take effect.

But this workaround doesn't work so nicely in Lua. Nice thing about Danne's method now is that he doesn't seem to rely on the workaround (enter/exit Canon menu). If we'd be able to call Danne's method of applying these settings from Lua, then we could make custom scripts to quickly change between different raw recording modes.

Or perhaps I'm misunderstanding how all this works :P

garry23

Ok, I get it now.

Remember, I don't do 'that video' stuff  ;) :)

Just a simple photographer.

berechiah

WHAT A GREAT IDEA

The x3 toggle
I never knew I needed it until now
It's so handy
And the shutter botton is fine its handy to have there

Well done danne

ZEEK

EOS M

Jip-Hop

I improved my previous script with inspiration from Danne's latest build.
Now you can choose three buttons (INFO, SET or HALFSHUTTER) to toggle between normal and 3x crop in mv1080.
Or you can disable this functionality.

It's a LUA script which should be set to autorun.
It adds a menu entry in the ML video section.





No need to enter and exit the Canon menu anymore.
I'm pausing and resuming Live View, which I spotted Danne doing in his latest commit.
But I find my way of switching is a more responsive.
This solution switches instantly whereas with the latest build I need to keep the halfshutter pressed for a bit before it toggles.
Plus you get the choice to use other keys.

The script is on GitHub: https://gist.github.com/Jip-Hop/688253710f25d3a0ff008f908241d1b0.

I found it quite tricky to get the menu working like I wanted.
Tried to mimic how "RAW video" menu item works (SET button to toggle on and off and Play Button for submenu).
But couldn't figure out how to do that (for me it would always enter the submenu and never toggle with SET...)
So the menu isn't perfect, oh well...

By the way Danne, in the cine.lua script you forgot to replace the last occurrence of cinema 2:35.1 with cinema 2.39:1.
Now the code in first if statement would not work I think.

Danne

Quote from: Jip-Hop on July 03, 2019, 10:05:39 PM
By the way Danne, in the cine.lua script you forgot to replace the last occurrence of cinema 2:35.1 with cinema 2.39:1.
Now the code in first if statement would not work I think.
Nice. Thanks. Updated my script.

Nice to see your lua implementation in progress. Lua is very powerful and has come a long way since dmilligan and a1ex refined api etc immensely.

I keep a few early scripts here by the way. Very basic stuff:
https://bitbucket.org/Dannephoto/lua_magic/src/default/

Danne

@Jip-Hop
Lovely script man. Very responsive and super useful. What a nice way to be able to choose button to. Most likely I´ll inlcude this script into my coming builds. Good and inspiring work!

ZEEK

@Danne, the EOS M2 arrived today, so when you're ready just upload a link to the EOS M2 build you want me to test out. Cheers :)
EOS M

Danne

@ZEEK
If you want to test here´s a version:
https://www.magiclantern.fm/forum/index.php?topic=15895.msg218233#msg218233

Don´t expect much here. I do not own the camera and there´s groundwork issues that I cannot fix that needs attention. I also no longer have the camera myself to play with.

ZEEK

Quote from: Danne on July 04, 2019, 09:10:33 AM
Don´t expect much here. I do not own the camera and there´s groundwork issues that I cannot fix that needs attention. I also no longer have the camera myself to play with.

Thanks for that. No problem, I'll give it a go see how it plays out! Cheers :)
EOS M

Jip-Hop

I updated my script. It should now restart movie recording more or less as quick as it can when you toggle x3crop while recording.
https://gist.github.com/Jip-Hop/688253710f25d3a0ff008f908241d1b0

Haven't addressed Danne's comments yet about also allowing normal use of the chosen button.
Right now the button you choose loses it's normal function for as long as my toggle menu is activated.

garry23

@jip-hop

I've scripted dual functionality via a long press feature, ie short press activates the augmented functionality and a long press gives you normal functionality.

Just a idea.

Cheers

Garry

Jip-Hop

Thanks Garry, sounds like a good way to do it.
Is it in your Cycler B script?
Would like to include that functionality in the next version of the script.

Also I made this Automator workflow for developing scripts on MacOS.
https://www.dropbox.com/s/kv13hoajbnjerej/ML%20script%20development%20without%20any%20script%20specified.workflow.zip?dl=0
- You need to open it in Automator first (not Automator Installer).
- Choose the .LUA script(s) your working on in the first "Get Specified Finder Items" block.
- Save the workflow.
- Double click the workflow file in Finder to open with Automator Installer.
- Click Install.

Now every time you insert the SD card from your camera it will copy the scripts you're working on to the SD and unmount the SD.
So it's as easy as pop it in the SD card reader, wait 1 second (until you see in Finder that it mounted and unmounted instantly) and take it out of the reader and insert back into the camera to test the script :)

I hope it speeds up script development :D

Danne

Quote from: garry23 on July 04, 2019, 05:05:29 PM
@jip-hop

I've scripted dual functionality via a long press feature, ie short press activates the augmented functionality and a long press gives you normal functionality.
Exactly what´s needed.

Danne

Quote from: Jip-Hop on July 04, 2019, 04:57:27 PM
I updated my script. It should now restart movie recording more or less as quick as it can when you toggle x3crop while recording.
https://gist.github.com/Jip-Hop/688253710f25d3a0ff008f908241d1b0

Haven't addressed Danne's comments yet about also allowing normal use of the chosen button.
Right now the button you choose loses it's normal function for as long as my toggle menu is activated.
Great. On my side I removed the delay when x3crop toggle is enabled in Crop mode sub menu. Response right away. Better...
https://bitbucket.org/Dannephoto/magic-lantern/downloads/crop_rec_4k_mlv_snd_isogain_1x3_presets_2019Jul04.EOSM202.zip

Edit: One nice addition is that if RAW video is disabled but you leave Crop_rec on it will record h264 mov both x3crop or non cropped...

garry23

@Jip-Hop

The long press approach is in my hand held helper script.

Another approach I have tried is multiple presses within given time window.

Yet another approach is to use one key to modify another.

Bottom line: loads of options, but, some become camera specific. Which is why I caveat my scripts, ie they are written for me on my cameras  ;)

Jip-Hop

Quote from: Danne on July 04, 2019, 05:15:45 PM
Great. On my side I removed the delay when x3crop toggle is enabled in Crop mode sub menu. Response right away. Better...
https://bitbucket.org/Dannephoto/magic-lantern/downloads/crop_rec_4k_mlv_snd_isogain_1x3_presets_2019Jul04.EOSM202.zip

Cool!

Quote from: garry23 on July 04, 2019, 05:28:24 PM
@Jip-Hop

The long press approach is in my hand held helper script.


Do you mean this one https://gist.github.com/pigeonhill/3c351242740c84f0581fa57ac27e0656?

There you distinguish between long and short press of half shutter button.
But INFO button only has one state right? Not a separate one for pressed and unpressed.

So can it also be done with INFO button?
Say, short press INFO for the enhanced functionality and longpress for the normal functionality?
Seems unlikely at first thought.

The SET button does have an unpressed state, so maybe that one is better. Also these keys have unpressed state: UNPRESS_UDLR and UNPRESS_FLASH_MOVIE. But don't know if EOS M has them xD