Author Topic: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)  (Read 184400 times)

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3401
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #150 on: October 10, 2016, 05:47:57 PM »
@Lars Steenhoff -- I've thought about that but then I decided to not activate the MLV Playback module in order to bypass this when double pressing play button for crop-mode. Depth of field preview or * buttons would be ideal.

@mothaibaphoto -- excellent mod to use the Menu button instead but then how can one enter the Canon menu when desired?

Just have to be at least out of the ML menu first in prior, correct?
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

hyalinejim

  • Member
  • ***
  • Posts: 131
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #151 on: October 10, 2016, 08:28:54 PM »
An absolute dream come true would be to have a one click on/off button for crop mode. I don't know if this is possible but it would save valuable seconds going in and out of ML menu.

budafilms

  • Hero Member
  • *****
  • Posts: 711
  • 5D Mark a1ex
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #152 on: October 10, 2016, 11:39:04 PM »
@a1ex if this module modifies Canon's video modes by altering the sensor area , it's possible modify the area  to get more than 1920x1080 in h264?
THanks   ;)

mothaibaphoto

  • Senior
  • ****
  • Posts: 393
  • pesky kid
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #153 on: October 11, 2016, 08:02:20 AM »
@DeafEyeJedi It's not my mod that MENU works. It works on its own the same way as PLAY, just without unessesary playback activation. My mod is to press RATE instead entering menu.
You can download it here - https://bitbucket.org/mothaibaphoto/magic_lantern_vold_fork/downloads

Be careful with that and check commit messages as it contains some more modifications.

Lars Steenhoff

  • Senior
  • ****
  • Posts: 473
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #154 on: October 11, 2016, 03:26:27 PM »
@mothaibaphoto
Thanks for the tip about using the Menu button to activate!
It already saves a bit of time

Now I already use the rate button to get my white balance reading, would it be possible to change your code to make the switch the the depth of preview button?

 

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7188
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #155 on: October 11, 2016, 03:46:52 PM »
Can you set ml white balance reading to the rate button? How? (Not my camera with me)

mothaibaphoto

  • Senior
  • ****
  • Posts: 393
  • pesky kid
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #156 on: October 11, 2016, 04:47:18 PM »
@Lars Steenhoff: I don't know, if it possible. I'm newbie in ML and it could takes a lot of time for me to find that button in code and how it works. For now I just don't have time for this. And why do you care about WB? You don't shoot RAW?

Lars Steenhoff

  • Senior
  • ****
  • Posts: 473
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #157 on: October 11, 2016, 06:19:35 PM »
@Danne

In the menu you can set the short cut to the push the set button after pressing rate to measure a white balance reading. ( in live view mode )




@mothaibaphoto

Yes I shoot RAW, this does not mean that i don't want an accurate white balance reading as a starting point for my color correction.

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7188
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #158 on: October 11, 2016, 06:35:37 PM »
Gotta check that shortcut button. Thanks for tip.
I agree on seeking correct wb already in cam. Mlv files even sets the different matrix(magenta,green etc). Caveat. Noone knows how to calculate those in post  :P

vstrglv

  • Member
  • ***
  • Posts: 246
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #159 on: October 11, 2016, 06:44:29 PM »
@mothaibaphoto
Thank you very much! Very convenient.
What Nightly Builds do you use? Would you please compile for  magiclantern-crop3x.2016Sep05.5D3113.zip?
Canon 5D3,1.1.3; Canon EOS M,202,  CF-SanDisk Extreme PRO,160MB/s, 256GB, SD-SanDisk Extreme Pro, 170MB/s, 128GB.

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3401
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #160 on: October 11, 2016, 07:43:49 PM »
@DeafEyeJedi It's not my mod that MENU works. It works on its own the same way as PLAY, just without unessesary playback activation. My mod is to press RATE instead entering menu.
You can download it here - https://bitbucket.org/mothaibaphoto/magic_lantern_vold_fork/downloads

Be careful with that and check commit messages as it contains some more modifications.

Thanks for this @mothaibaphoto -- I'll take a look at it and test when I can then will share my results. We wouldn't want to sacrifice the RATE button because I find it useful to have the options to choose color profiles for certain situations, right?

Gotta check that shortcut button. Thanks for tip.
I agree on seeking correct wb already in cam. Mlv files even sets the different matrix(magenta,green etc). Caveat. Noone knows how to calculate those in post  :P

Tried that shortcut SET button for Auto WB adjustments which at first seemed like an awesome feature when I first heard about it years ago. It actually does the WB for you under any scenarios as long as you can manage to find a white object. Can be useful for some. But not always. I would say it gets the job done accurately 80-90% of the time more or less.

However, I've learned the hard way that by doing this it will also adjust the WB Shift/Bkt (0,0/+-0) to anything like A5,M4/+-0 or B1, M5/+-0, etc depending on scene which then often times I would forget to go back and set it to default (0,0/+-0) after I prefer to set my own Kelvin's otherwise I end up with a bunch of a strange WB inconsistencies which was a nightmare to fix in the long run.

It's always a good practice to nail down WB at first regardless of which format we shoot in -- even for me.

Unless I'm shooting the whole thing in MLV RAW then none of this matters, right?  :)

 
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

budafilms

  • Hero Member
  • *****
  • Posts: 711
  • 5D Mark a1ex
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #161 on: October 12, 2016, 07:33:35 AM »
I tried this version. Works very nice.
I get a diference in the bit rate:

- At full HD, with out activate crop 3x, I get 26 Mb/s
- With crop activated, I get 31,19 Mb/s

is the bit rate modified?

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 8081
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #162 on: October 12, 2016, 07:54:56 AM »
Check frame rate ...
29.97/25 = 31.19/26

budafilms

  • Hero Member
  • *****
  • Posts: 711
  • 5D Mark a1ex
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #163 on: October 12, 2016, 08:18:52 AM »
25 Fps in both.
Same setting.

Lars Steenhoff

  • Senior
  • ****
  • Posts: 473
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #164 on: October 12, 2016, 01:46:24 PM »
Perhaps because crop mode has slightly more noise and it is therfore harder to compress?
thus resulting in a higher bitrate in h264.

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3751
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #165 on: October 28, 2016, 04:36:58 PM »
@rbrune added EOSM to the crop_rec module. Here's the announcement and pull request. It would be great if a build can be posted on the first post of this thread for EOSM users wanting to try it out and developers interested in tinkering with it.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #166 on: October 29, 2016, 11:26:55 AM »
Very nice.

Also committed a small usability tweak: you no longer need to exit and re-enter LiveView manually; the video mode is now refreshed shortly after closing ML menu.

Lars Steenhoff

  • Senior
  • ****
  • Posts: 473
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #167 on: October 29, 2016, 12:15:29 PM »
Nice addition Alex!

now I have to learn how to make builds on my mac :)

You mentioned before about a pre record buffer, did you find out any more about this?

I'm really curious how this would work.  like pressing record and having two seconds before I pressed record would be a great feature to use.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #168 on: October 29, 2016, 12:18:44 PM »
Up until now, in post tools we were identifying the video mode based on the raw buffer size in raw_info. This is important information for things like automatic focus pixel removal and automatic "de-squeezing", and it's probably also just nice metadata to have for users (should I worry about aliasing in this shot? computing effective focal length, etc.). With this module, that is no longer possible, different cropping modes can have the same raw buffer size.

So I propose that part of the change for this new feature should be to add new metadata to the MLV format for horizontal and vertical pixel skipping/binning amount.

Proposal for making crop info available to other modules (please review):

Code: [Select]
struct raw_crop_info {
    /* subsampling factor: (binning_x+skipping_x) x (binning_y+skipping_y) */
    uint8_t binning_x;      /* 3 (1080p and 720p); 1 (crop, zoom) */
    uint8_t skipping_x;     /* so far, 0 everywhere */
    uint8_t binning_y;      /* 1 (most cameras in 1080/720p; also all crop modes); 3 (5D3 1080p); 5 (5D3 720p) */
    uint8_t skipping_y;     /* 2 (most cameras in 1080p); 4 (most cameras in 720p); 0 (5D3) */
    uint16_t offset_x;      /* crop offset (top-left corner) */
    uint16_t offset_y;      /* relative to a full-res silent picture (usually slightly larger than a CR2) */
   
    /* The captured area (described by raw_info) will be:
     *   left  : offset_x
     *   top   : offset_y
     *   right : offset_x + raw_info.width  * (binning_x+skipping_x)
     *   bottom: offset_y + raw_info.height * (binning_y+skipping_y)
     */
};

This would be visible to all ML modules (just like raw_info). For MLV files, we could add a new block (CROP) with exactly the same structure.

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3401
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #169 on: October 29, 2016, 12:30:24 PM »
...This would be visible to all ML modules (just like raw_info). For MLV files, we could add a new block (CROP) with exactly the same structure.
Indeed this would be a really nice proposal @a1ex!  8)
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

dfort

  • Developer
  • Hero Member
  • *****
  • Posts: 3751
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #170 on: October 29, 2016, 12:42:41 PM »
now I have to learn how to make builds on my mac :)

http://www.magiclantern.fm/forum/index.php?topic=16012.0

Comment on that topic or PM me with any issues and I'll try to walk you through it.
5D3.* 7D.206 700D.115 EOSM.203 EOSM2.103 M50.102

DeafEyeJedi

  • Hero Member
  • *****
  • Posts: 3401
  • 5D3 | M1 | 7D | 70D | SL1 | M2 | 50D
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #171 on: October 29, 2016, 07:13:03 PM »
Some quick and dirty test with crop_rec.mo from the EOSM (Thanks @rbrune) at ISO 3200 in 29.97p (1600x692p) with a 50L in MLV last night.


Where'd the Focus Pixels go? I think I can still seem them but they are literally minimal to the extreme.
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

Danne

  • Developer
  • Hero Member
  • *****
  • Posts: 7188
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #172 on: October 29, 2016, 07:20:29 PM »
That is great footage. And no focus pixels!? Can,t say I miss them :P.
Thanks for sharing. Glad to own an eos m. Looks bad ass.

daniel@danielchamorro.com

  • New to the forum
  • *
  • Posts: 26
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #173 on: October 30, 2016, 02:31:21 AM »
Sorry because my english is not very good and I really cant find anything about that. too many forums and topics.

1 - Can anybody tell me please if in the last nighlty build for 5d MARK 2 can we shoot RAW in FULL HD? or at least in 1920x any panoramic 2,35 or 2,39 panoramic? Or maybe for that we still need crop mode?

2 - In this case we need crop mode in 5d M2, can now do a proper live view framing without this horrible black and white with 3 frames per second that we had before?

3 - in this last nigtly view can we proper test in play any clip in RAW or is also jumping and difficult to check?

Thanks and congratulations for the hard work!

DANI

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Crop mode recording (crop_rec.mo) (1:1, RAW/H.264, 25/30/50/60 fps)
« Reply #174 on: November 14, 2016, 12:05:07 AM »
Found a way to center the raw buffer and Canon's preview window in the "classic" crop mode - the one triggered by x5 zoom. Advantage: higher resolution.

5D3 registers:

For centering the raw buffer:
Code: [Select]
    cmos_new[1] = PACK12(9+2, 42+2);    /* vertical (first|last) */
    cmos_new[2] = 0x09E;                /* horizontal offset (mask 0xFF0) */

For centering Canon preview:
Code: [Select]
    {0xc0f3,   0x83d4, 0, "Preview area (y1 | x1/4)"},  /* similar to raw_info.active_area */
    {0xc0f3,   0x83dc, 0, "Preview area (y2 | x2/4)"},

Resizing Canon preview doesn't seem to work, so for the 5x zoom mode, the preview will be centered, but the coverage will not be exact. At least until somebody figures out how to resize the YUV buffer.

There are hints that raw buffer size might be adjustable in the 5x zoom mode.

(side note: actual crop factor in 5x zoom mode is not 5x - it depends on the raw recording resolution)