detecting/triggering video record on 50D

Started by trsaunders, July 03, 2012, 01:26:32 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

trsaunders

This is a continuation of my post on vimeo as this would seem the more appropriate place for discussion. I tried to join the mailing list but there does not seem to be an option to do so; is that because we should be using this forum?

Anyway, I'm currently working on a PhD research project, and I wish to either detect the start/finish of video recording (preferably), or be able to trigger video recording via an external signal.

a1ex suggested I use a half shutter press to start recording via the remote port, but I couldn't find this option on my 50D. digging through the ML source code I found:
    #ifndef CONFIG_50D
    {
        .name = "Movie REC key",
        .priv = &movie_rec_key,
        .display = movie_rec_key_print,
        #ifdef CONFIG_5D2
        .select = menu_binary_toggle,
        #else
        .select = menu_ternary_toggle,
        #endif
        .help = "Change the button used for recording. Hint: wired remote."
    },
    #endif


so it looks like 50D does not support this feature.

An ideal case would be to somehow trigger the flash signal in the hotshoe when recording starts/finishes, has anyone managed to get ML to control the hot shoe signals? I guess this would involve some digging into the firmware..

I would appreciate any help that can be offered on this matter!

thanks!
50D, 5D3

trsaunders

I've just seen a1ex's reply on the vimeo thread, for some reason the vimeo forum shows me as being the last poster?!

I'm going to follow up his suggestion to re-enable the option and see what happens. But my request for ideas still remains :)
50D, 5D3

a1ex

If it works, let me know so I can enable it again. Make sure you use the latest source code (hg pull).

trsaunders

I re-enabled that option, compiled and it appeared in the menu  ;D

It seems that on the 50D you can use half shutter to start recording, but it doesn't seem to work to stop it. So I guess that is why it was disabled? anyway, that is useful for me, the starting is the most important thing (I can work out the end by taking the frame rate and the number of frames).

I've just noticed that the latest ML has an option to turn on the blue LED during recording. I could make use of this by attaching a light sensor directly to the LED. It seems like there is a bit of a delay between starting recording and turning on this LED, am I right in my interpretation of the following code block that this is because the LED is turned on as a result of polling the record status rather than as recording is started?

    if (rec_notify == 3) // this is non-graphical notification, should also run when display is off
    {
        static int k = 0;
        k++;
        if (k % 10 == 0) // edled may take a while to process, don't try it often
        {
            if (recording) info_led_on();
        }
    }
50D, 5D3

a1ex

There is also rec_notify_trigger - called when Canon firmware announces "recording" - shoot.c, PROP_HANDLER(PROP_SHOOTING_TYPE).

Or you may want to enable it when you send the button press.

Polling is used to keep the LED on, if some other events happen to turn it off.

trsaunders

That is useful to know, thanks. I'm still trying learn how the various parts of ML work!

I want to dump the firmware to see if I can work out how the camera triggers the flash when it takes a picture, but I'm having a hard time working out how. Do I need to use magiclantern.fir & autoexect.bin from this post? or is the firmware dump method only relevant for a particular firmware version?

sorry for all the questions, there is much I don't know  :-[
50D, 5D3

a1ex

Simply installing ML for the first time should save a ROM0.BIN - that's what you need.

trsaunders

I wasn't sure how to trigger the installer for the self-compiled ML, but your mention of ROM0.BIN gave me something to search for, and found the FAQ mention of 'Dump ROM' and now I have a ROM0.bin   8)

thanks!
50D, 5D3

trsaunders

I've found that triggering the video via the shutter has approximately 360ms delay +- one frame duration. I measured this by triggering the focus signal, pausing for 1 second and then turning on an LED. After studying the 30fps video I found that the LED turned on approximately 0.64 seconds into the video.

I ran the test 4 times and each time the delay was one frame either side of the average, so it seems deterministic. That will do for now!

I would eventually like to ditch the remote cable and use the flash signal instead, so I do plan to look through the firmware dump. I ran it through ARM Console and have lots of nice html to look through. The guide mentions loading in .idc files; what are these and how can I generate them?

thanks!
50D, 5D3

ilguercio

While you're here, do you use an external mic along with the 50D?
Since very few of us do and you seem to understand a bit about the code, can i ask you how much exactly the delay is?
It would help in case of syncing with a mic.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

trsaunders

I don't use a mic, I am only interested in the video. hacking the flash signal could be one way of keeping a mic in sync.
50D, 5D3