Author Topic: Canon EOS M  (Read 867753 times)

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6038
Re: Canon EOS M
« Reply #3775 on: December 01, 2019, 05:56:45 AM »
It is named bitdepth and should be under your nose in your Movie menu.

ctfire

  • New to the forum
  • *
  • Posts: 38
Re: Canon EOS M
« Reply #3776 on: December 01, 2019, 01:13:25 PM »
hi everyone, there is a question , is it possible to make  a 60 fps  raw preset even if it will be 720p , but without  framedrops?

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6038
Re: Canon EOS M
« Reply #3777 on: December 01, 2019, 01:18:00 PM »
I commented out the mv720p preset from the list in crop_rec.c You can start with enabling that and then start reducing height and increase fps from where its at now. Think it's 50fps.

Stousen

  • New to the forum
  • *
  • Posts: 26
Re: Canon EOS M
« Reply #3778 on: December 01, 2019, 09:40:55 PM »
I found this works great for cctv lens and mcm rewire crop without any vignetting from sides
Code: [Select]
                 
                             case CROP_PRESET_mcm_mv1080_EOSM:
                cmos_new[5] = 0x20;
                cmos_new[7] = 0x800;
                if (x3crop == 0x1 || crop_patch)
                {
                    cmos_new[5] = 0x380;
                    cmos_new[7] = 0xaaa;
                }
                if (ratios == 0x0 && (x3crop == 0x1 || crop_patch))
                {
                    cmos_new[5] = 0x380;
                    cmos_new[7] = 0xaaa;
                }
                break;
               

I also have this that works fine for 16:9 1920x1080p resolution(dialed down from 2520x1418) in 2.5k mode 
But... I would like to also center image in 2520x1418 but i only see this for 2.5k mode and cmos settings that i centered while being in dialed down 1920x1080 resolution, its still not centered in 2520x1418:
Code: [Select]
            case CROP_PRESET_2K_EOSM:
      cmos_new[5] = 0x2c0;             /* vertical (first|last) */
              cmos_new[7] = 0x6a9;    /* pink highlights without this */
                break;
               
What should i add if i want to have different centering after i dial down resolution to 16:9 -1920x1080 and different when i use 16:9 2520x1418 ?
I also noticed that after recording mlv it goes back to liveview after slight pause and then framing is wrong , i have to enter playback mode, then press exit in corner, when it comes back to liveview then framing is correct, so after recording there is something thats changing CMOS value again messing up framing.
I also discovered that in 2.5k mode you can actually press small triangle arrows to move your framing around like during zoom, but i tried to get it centered when white zoom box is at the center.

Did you manage to center the view?:)
I would like to do the same in the mkiii since its sometimes hard to know what i am focusing on.

Cheers
S

2blackbar

  • Senior
  • ****
  • Posts: 268
Re: Canon EOS M
« Reply #3779 on: December 02, 2019, 11:22:15 PM »
Yes i did, works with my cctv lenses thare are for 1/2'' sensors, they fit precisely 1920x1080 framing in 2.5k mode so im happy, i dont get continuous but im glad it works.
You have to modify CMOS 5 and CMOS7 , sometimes only 7.

Anaconda_

  • New to the forum
  • *
  • Posts: 9
Re: Canon EOS M
« Reply #3780 on: December 03, 2019, 10:54:15 AM »
When shooting in the 5k modes, is it possible to change which part of the frame the real-time preview shows? For example, if I know I want someone framed on the left, I'd like to see the left side of my frame to keep focus etc. But then the next shot might need them on the right so I'd like to change that.

Of course, I can check my shot in the framing view, but if they're moving around or it's a walking shot, the framing will change during the actual recording. If I can see the edge of my frame, then at least I know I'm keeping them in the shot the whole time haha.

2blackbar

  • Senior
  • ****
  • Posts: 268
Re: Canon EOS M
« Reply #3781 on: December 03, 2019, 05:04:54 PM »
Its what framing preview is for.
If You want  digital panning to keep subject in frame , its not currently possible to do pixel precise digital panning, CMOS values lets us only use the ones that work for magnifier/ loupe.It would stutter, its like moving every 5 pixels  not every 1 pixel.Changing crop area on frame by frame basis is possible but that would not look good actually because difference between frames would be too big.
Unless someone will discover a logical map of addresses to modify CMOS values so we could pan with pixel precision on 5184x3456 sensor.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6038
Re: Canon EOS M
« Reply #3782 on: December 03, 2019, 06:21:51 PM »
New version:
https://www.magiclantern.fm/forum/index.php?topic=9741.msg208959#msg208959

- movie preset intervalometer

As the name suggests this lua script is done with timelapse, frame burst or iso average in mind. Making good use of the powerful lua api together with rec trigger mode from a1ex it´s possible to use any crop_rec movie preset to record timelapse sequenses.
Workflow:
1 - set your interval in seconds
2 - select halfshutter trigger
This will enable all that is needed for recording single frames into a mlv wrapper. Push REC to stop the intervalometer

The other function called rec key trigger is nice to use together with frame burst or the iso average function. Instead of one big MLV file you´ll get single MLV files that are suitable for averaging in Mlv App.









Full lua script code:
Code: [Select]
-- movie preset intervalometer

--[[
Dedicated movie preset intervalometer
--]]

  console.hide()
  menu.close()

if camera.model_short ~= "EOSM" then
   display.notify_box("Only eosm for now")
   return
end

  a = 1

function main()
  console.hide()
  menu.close()
-- warning
if camera.mode ~= MODE.MOVIE then
  display.notify_box("enable MOVIE mode")
  return 
end
  menu.set("raw video", "Pre-record", "1 frame")
  menu.set("raw video", "Rec trigger", "Half-shutter: pre only")
  menu.set("presets", "frame burst", "OFF")
  menu.set("presets", "iso average", "OFF")
  display.notify_box("push rec to disable")
  display.notify_box("push rec to disable")
  msleep(2000)
  key.press(KEY.REC)
  msleep(1000)
  while a == 1 do
      key.press(KEY.HALFSHUTTER)
      key.press(KEY.UNPRESS_HALFSHUTTER)
    while a ~= mymenu.submenu["interval in seconds"].value do
      msleep(1000)
      if movie.recording == false then
      a = 1
      menu.set("raw video", "Rec trigger", "OFF")
      return
      end
      a = a + 1
    end
  a = 1
  end
end

function main2()
  console.hide()
  menu.close()
-- warning
if camera.mode ~= MODE.MOVIE then
  display.notify_box("enable MOVIE mode")
  return 
end
  display.notify_box("push display to disable")
  display.notify_box("push display to disable")
  msleep(2000)
  while a == 1 do
      key.press(KEY.REC)
    while a ~= mymenu.submenu["interval in seconds"].value do
      msleep(1000)
      if menu.visible then
      a = 1
      return
      end
      a = a + 1
    end
  a = 1
  end
end

mymenu = menu.new
{
    parent = "Movie",
    name = "intervalometer",
    help = "Movie preset intervalometer",
    submenu =
    {
        {
            name = "interval in seconds",
            min = 0,
            max = 999,
    value = 10,
            unit = UNIT.DEC,
            update = function(this) mymenu.value = this.value end,
    help = "default is 10 seconds",
        },
        {
            name = "halfshutter trigger",
    select = function(this) task.create(main) end,
    help = "records single frames in a MLV chunk. Also enables REC trigger mode",
        },
        {
            name = "rec key trigger",
    select = function(this) task.create(main2) end,
    help = "use with frame burst or iso average",
        },

    },

}

Thanks to dmilligan, a1ex, and others contributing with good lua examples. Very powerful as always.

yokashin

  • New to the forum
  • *
  • Posts: 43
Re: Canon EOS M
« Reply #3783 on: December 03, 2019, 08:49:30 PM »
I was waiting for this option :)
Thank you all very much!

Would there be a chance to create a timelapse setting for 1 fps or 2 fps?

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6038
Re: Canon EOS M
« Reply #3784 on: December 03, 2019, 09:39:58 PM »
Cool. How are you going to use it? Curious.

bakersdozen

  • Freshman
  • **
  • Posts: 81
Re: Canon EOS M
« Reply #3785 on: December 04, 2019, 11:50:25 AM »
Wow, Danne awesome additions here. Had a very quick play and seems to all be working here. This is going to eliminate having to use fps override for timelapses and having to deal with the overexposure it causes. Winner.

And wow, just wow, to now having the opportunity to record averaged tiff sequences timelapse style.

Oh yeah and in 5k full res to boot.

I can't wait to get some time and daylight to play with this.
EOS M + 5D3

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6038
Re: Canon EOS M
« Reply #3786 on: December 04, 2019, 12:38:26 PM »
Yup. Agree @bakersdozen. Pretty much sums up my thoughts and uses around this addition :).




IDA_ML

  • Hero Member
  • *****
  • Posts: 661
Re: Canon EOS M
« Reply #3787 on: December 04, 2019, 01:24:44 PM »
This is going to eliminate having to use fps override for timelapses and having to deal with the overexposure it causes. Winner.

I am not sure if using the intervalometer is the best option for timelapses.  In the silent module of the 100D, intervalometer causes quite a sustantial dead time from frame to frame which results in a choppy timelapse video.  On the other hand, if you shoot timelapses in the movie mode using fps override, dead time is close to 0 and this produces very smooth and cinematic timelapses.  The only downside of this mode is the very slow refresh rate of the screen at low fps (0,4 to 4 fps) which makes focusing a pain.  Please compare both modes and if you succeed, I would be curious to see the results. 

anykill

  • New to the forum
  • *
  • Posts: 4
Re: Canon EOS M
« Reply #3788 on: December 04, 2019, 07:41:55 PM »
Do we have any version for M50?

masc

  • Contributor
  • Hero Member
  • *****
  • Posts: 1412
Re: Canon EOS M
« Reply #3789 on: December 04, 2019, 08:18:59 PM »
Do we have any version for M50?
No. And here is EOS M, not EOS M50!
5D2.212 | EOSM.202

kuchka94

  • New to the forum
  • *
  • Posts: 12
Re: Canon EOS M
« Reply #3790 on: December 04, 2019, 09:09:08 PM »
have few questions.
1. crop mode 14 bit 1736x976 30 fps - on the top some transparent/pink bar + on highlights color flicker. is it real to fix or why this happens?

2. where is 5k(3.5k) anamorphic mode 24/25 fps? can't find=( only 12-18 fps

3. i bought sandisk extreme pro 95mb 256gb card, as a lot of people said that this is the best solution. yep, card is pretty good, works better in a lot of real time fps modes, then my samsung evo microsd+adapter.
BUT main reason was slow mo modes. all slow mo modes work the same and show me only max card speed 45-46 mb. while real time fps show 50-57mb.
1736x976 slow mo 46fps = 5 seconds only + some dropped frames.
can't understand why slow mo modes decrease card speed more than 10mb/s

thanks for any thoughts

anykill

  • New to the forum
  • *
  • Posts: 4
Re: Canon EOS M
« Reply #3791 on: December 04, 2019, 09:17:23 PM »
Ah, ok! Sorry

2blackbar

  • Senior
  • ****
  • Posts: 268
Re: Canon EOS M
« Reply #3792 on: December 05, 2019, 03:49:45 AM »
Danne i have a question about finding place in ML code to adjust crop being shfted after video recording ends in 2.5k mode...
I have my addresses set so it doesnt vignette in 1920x1080 in 2.5k mode and theyre :
Code: [Select]
            case CROP_PRESET_2K_EOSM:
  cmos_new[5] = 0x300;             /* vertical (first|last) */
              cmos_new[7] = 0x2a9;    /* pink highlights without this */
                break;

And skipping for 2K mode :
Code: [Select]
        case CROP_PRESET_2K_EOSM:
            /* set ratio preset */
            if (ratios == 0x1)
            {
                skip_left       = 36;
                skip_right      = 36;
                skip_top        = 23;
                skip_bottom     = 23;
            }
            if (ratios == 0x2)
            {
                skip_left       = 36;
                skip_right      = 36;
                skip_top        = 14;
                skip_bottom     = 14;
            }
            if (ratios == 0x3)
            {
                skip_left       = 197;
                skip_right      = 197;
                skip_top        = 106;
                skip_bottom     = 106;
            }
            break;
           

Is this the only place that CMOS framing addresses for 2.5k mode are set ?
Im asking because when i set everything in ML menu to be in 1920x1080 and 16:9 aspect ratio (from raw video menu) then eveyrthing is fine and framing is correct for CCTV lens, looks like this :

When recording stops then liveview refreshes as alaways but it gets shifted and next recording is like this :

Its shifted slightly and vignetting is visible on left side cause its small CCTV lens that fits perfectly into 1920x1080 mode in 2.5k preset, so now to fix this what i have to do is go to ML menu, then turn off raw video and turn it on right away( just press SET twice) and leave ML menu, then liveveiew refreshes itself and now is correct again without vignette, i have to do it everytime i record new MLV clip but i would prefere to find a cause for this.
Do you know where liveview gets refreshed and shifted after recording ? I cant figure out how to make it refresh with correct values that i set myself so there is no vignetting and i dont have to refresh liveview with disabling/enabling raw video in ML menu.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6038
Re: Canon EOS M
« Reply #3793 on: December 05, 2019, 06:23:52 AM »
I can´t reproduce here. But there could be some setting you use that I don´t. Are you setting resolution to 1920x1080 in raw menu. Maybe that is causing it, idk.
I tested your changes. Just shortly. Cannot say much atm but note that black level readings will take a hit with 16:9 mode because you alter skip offsets. What happens is raw.c(back end) will miss autodetection of black level reading. Look for this part in raw.c:
Code: [Select]
/* returns 1 on success, 0 on failure */
static int autodetect_black_level(int* black_mean, int* black_stdev_x100)
{
    //~ static int k = 0;
    //~ bmp_printf(FONT_MED, 250, 50, "black refresh: %d ", k++);
   
    /* also handle black level for dual ISO */
    int mean1 = 0;
    int stdev1 = 0;
    int mean2 = 0;
    int stdev2 = 0;
     
    if ((raw_info.active_area.x1 > 50) && (shamem_read(0xC0f0b13c) != 0xd) && (shamem_read(0xC0f0b13c) != 0x11) &&
(shamem_read(0xC0f0b13c) != 0xe) && (shamem_read(0xC0f0b13c) != 0xd) && (shamem_read(0xC0f06804) != 0x5a70298) &&
(shamem_read(0xC0f0b13c) != 0xb) && (shamem_read(0xc0f0713c) != 0x456) && (shamem_read(0xC0f06804) != 0x4550298) &&
(shamem_read(0xC0f06804) != 0x93a011b) && (shamem_read(0xC0f06804) != 0x8d6011b)) /* use the left black bar for black calibration, shamem exception anamorphic and high speed frame rates crop rec.c */
    {
        autodetect_black_level_calc(
            16, raw_info.active_area.x1 - 16,
            raw_info.active_area.y1 + 20, raw_info.active_area.y2 - 20,
            3, 16,
            &mean1, &stdev1
        );
        autodetect_black_level_calc(
            16, raw_info.active_area.x1 - 16,
            raw_info.active_area.y1 + 22, raw_info.active_area.y2 - 20,
            3, 16,
            &mean2, &stdev2
        );
       
        /* for dual iso: increase tolerance of the cleaner exposure (there is interference from the noisier one) */
        int ref_stdev = MAX(stdev1, stdev2);
       
        if (!black_level_check_left(mean1, ref_stdev, raw_info.active_area.y1 + 20, raw_info.active_area.y2 - 20))
        {
            return 0;
        }

        if (!black_level_check_left(mean2, ref_stdev, raw_info.active_area.y1 + 22, raw_info.active_area.y2 - 20))
        {
            return 0;
        }
    }
    else /* use the top black bar for black calibration */
    {
        autodetect_black_level_calc(
            raw_info.active_area.x1 + 20, raw_info.active_area.x2 - 20,
            4, raw_info.active_area.y1 - 4,
            16, 4,
            &mean1, &stdev1
        );
        autodetect_black_level_calc(
            raw_info.active_area.x1 + 20, raw_info.active_area.x2 - 20,
            6, raw_info.active_area.y1 - 4,
            16, 4,
            &mean2, &stdev2
        );
       
        /* todo: consistency check */
    }
I do a lot of shamem_read exceptions. It´s not good lokking but it gets the job done for a few presets I tweaked.

By the way. Did you test 2.5k 1:1 centered preset?

Oh, and one more thing. I encountered a few pink frames in 2.5k mode so changed a bit in regs. Hopefully fixed. New build uploaded.

EDIT: Issue reproduced. It´s related to resolution changed to 1980x1080 in raw video menu. Must be a conflict with crop_rec changes. I can take a look. I never really built my presets to be modified in raw video. Always set to max. Resolution set in crop_rec statically instead but not working for you in this case.
Seems we need to refresh hooks after each recording has stopped.

EDIT:
Uploaded a new version again. Seems to fix 2k stay in center when reducing to 1920x1080. Not working for 3k but also not high priority. Stay with static crop rec resolutions otherwise and we´re fine.

EDIT:
If you want to dig into cmos update routines here´s a snippet from crop_rec.c:
Code: [Select]
static int patch_active = 0;

static void update_patch()
{
   
    if (CROP_PRESET_MENU)
    {
        /* update preset */
        crop_preset = CROP_PRESET_MENU;
       
        /* install our hooks, if we haven't already do so */
        if (!patch_active)
        {
            patch_hook_function(CMOS_WRITE, MEM_CMOS_WRITE, &cmos_hook, "crop_rec: CMOS[1,2,6] parameters hook");
            patch_hook_function(ADTG_WRITE, MEM_ADTG_WRITE, &adtg_hook, "crop_rec: ADTG[8000,8806] parameters hook");
            if (ENGIO_WRITE)
            {
                patch_hook_function(ENGIO_WRITE, MEM_ENGIO_WRITE, engio_write_hook, "crop_rec: video timers hook");
            }
           
            patch_active = 1;
        }
    }
    else
    {
        /* undo active patches, if any */
        if (patch_active)
        {
            unpatch_memory(CMOS_WRITE);
            unpatch_memory(ADTG_WRITE);
            if (ENGIO_WRITE)
            {
                unpatch_memory(ENGIO_WRITE);
            }
            patch_active = 0;
            crop_preset = 0;
        }
    }
}

/* enable patch when switching LiveView (not in the middle of LiveView) */
/* otherwise you will end up with a halfway configured video mode that looks weird */
PROP_HANDLER(PROP_LV_ACTION)
{
    update_patch();
}

/* also try when switching zoom modes */
PROP_HANDLER(PROP_LV_DISPSIZE)
{
    update_patch();
}

2blackbar

  • Senior
  • ****
  • Posts: 268
Re: Canon EOS M
« Reply #3794 on: December 05, 2019, 09:11:55 AM »
Works Great now, perfectly fits and stays , thanks a lot , it was really bugging me and thank You for explaining changes, its valuable info for me.
I skipped from all sides to avoid offcenter issues in future, so i tried to make everything even from opposite sides, is it better for example to skip 16 from left side only instead of 8 from left and right ? cAuse from what i see now, its used for black area and not for centering view.
I do notivce levels being screwed up major time when i use ratios from that other menu above bitdepth.
So should i set skipping to what youre using ?
I find it amazing that this small camera works so well for different kinds of lenses and you can get some cheap fast CCTV lenses for 1/2'' sensors that work perfect in crop mode.

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6038
Re: Canon EOS M
« Reply #3795 on: December 05, 2019, 09:59:49 AM »
Well, if you need and want to you can modify and test to do exceptions in raw.c code that will detect correctly. You seem to be good with experimenting so you will probably solve it eventually.

keel

  • New to the forum
  • *
  • Posts: 27
Re: Canon EOS M
« Reply #3796 on: December 06, 2019, 01:49:28 AM »
Try using MLVApp, available for Windows and MacOS as well, and very well supported, plus latest just came out. Never tried MLVProducer, but last update is from 5/2019.

Gave it shot, on both programs videos are importing very dark.

My live view is fine, but the imports are pitch black until i boost gamma or exposure.

bakersdozen

  • Freshman
  • **
  • Posts: 81
Re: Canon EOS M
« Reply #3797 on: December 06, 2019, 03:16:08 AM »
I am not sure if using the intervalometer is the best option for timelapses.  In the silent module of the 100D, intervalometer causes quite a sustantial dead time from frame to frame which results in a choppy timelapse video.  On the other hand, if you shoot timelapses in the movie mode using fps override, dead time is close to 0 and this produces very smooth and cinematic timelapses.  The only downside of this mode is the very slow refresh rate of the screen at low fps (0,4 to 4 fps) which makes focusing a pain.  Please compare both modes and if you succeed, I would be curious to see the results.

I agree and love the cinematic smoothness of fps override for timelapses - my favourite method of shooting them for a long time. I've only had the chance of shooting one quick timelapse with Danne's new functionality and it worked pretty well. I think it will be playing with the intervals depending on the subjects/scene you are shooting to reach a happy place. I'm confident this could be the way forward (rather than using silent modes or overexposed fps override). Will report back more once I've had a good chance to play around.

Yup. Agree @bakersdozen. Pretty much sums up my thoughts and uses around this addition :).

@Danne , any chance of adding 0.25 and 0.5 options for the movie mode intervalometer ? Or maybe 0.20 0.40 0.60 0.80 would be better if achievable. My favourite for fps override is 2.5 fps for certain subjects. So the 0.40 should achieve that.
EOS M + 5D3

ZEEK

  • Member
  • ***
  • Posts: 178
Re: Canon EOS M
« Reply #3798 on: December 06, 2019, 05:55:05 AM »
Gave it shot, on both programs videos are importing very dark.
My live view is fine, but the imports are pitch black until I boost gamma or exposure.
Check your "White Level" in MLV App. Double-tap on it to reset White Level or play around with that instead of Gamma or Exposure. If not, just do a fresh install with Danne's latest ML Build.
EOS M - EOS M2

Danne

  • Contributor
  • Hero Member
  • *****
  • Posts: 6038
Re: Canon EOS M
« Reply #3799 on: December 06, 2019, 06:13:26 AM »
@Danne , any chance of adding 0.25 and 0.5 options for the movie mode intervalometer ? Or maybe 0.20 0.40 0.60 0.80 would be better if achievable. My favourite for fps override is 2.5 fps for certain subjects. So the 0.40 should achieve that.
How do you mean? If you want 0.5 you enable fps override and then add intervalometer? Or what do you mean?
Besides that. If you you run frameburst mode and then average let's say 49 images you'll get the long exposure look but without the laggy screen.