Silent Pictures with the EOS M

Started by Meloware, February 22, 2017, 03:14:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Meloware

I transfer and restore 16mm movies using my 650D/T4i with Magic Lantern's silent.mo and mlv_rec.mo. I just bought an EOS M (cheaper and mirror-less) and discovered too late that Canon didn't bother to include a remote shutter connection. The camera STILL has mechanical parts operating with each exposure, so I must find a way to use Silent pictures with this camera.

If I load silent and mlv_rec in the EOS M, it still functions well with the "half shutter" button pressed. I can still use all recording modes by physically pressing this button. Please suggest a way I might do this with a switch closure from my own film controller(as I did with my 650D/T4i).

ML's audio trigger looks promising, and even works with the lower resolution modes of Silent pictures. When I try and use the audio trigger with full resolution video and DNGs, the first exposure is taken and the screen then goes black. No further trigger events are possible until I physically press a "half shutter". I may then audio trigger one more complete exposure and then everything stops as before. I am a poor coder and have no idea how to write and compile my own version of ML, but it seems like it might be an easy change for someone more experienced.

Is there any other possible solution? Do Lua scripts offer a solution? Any guidance or help in getting my EOS M working with event triggered Silent pictures (full-resolution) would be greatly appreciated.

Thank you for past help and I hope this one is interesting and doable.
(Sorry – had to post here because I can't seem to post in Camera-Specific discussion)

dfort

[EDIT: Oops--just found out that LiveView blacking out is an issue with full resolution silent pictures.]

Meloware

Thanks. I know nothing of writing/running Lua but if the functionality is there, I'll may need to learn it. I don't normally code, but sometimes it is necessary for reaching goals.

Does the T4i remote shutter jack produce a different event than the physical shutter button? Why wouldn't they just be made electrically in parallel? If I use the physical button (on the EOS M), everything works great. I just can't do that for 30,000 pressings – I need to use my controller. If worse came to worse, I might have to consider opening up the camera and trying to wire in my own jack.  Aside from the needed trigger, ML has everything else I need to do the job.

dfort

I deleted my prior post because it seems that the problem is with full resolution silent pictures. It doesn't matter if it is triggered by Audio Remote Shot or by a shutter half-press, the LV blacks out after a FRSP. I tried it on a 700D with the same results so there is something going on that should be fixed.

Meloware

Just to say once more: With my EOS M, I can enable mlv_rec.mo and silent.mo, set the resolution to full raw, and then press on the shutter button halfway, and make multiple exposures to an mlv video file. I just tried it again. I can then extract all my frames as 31,877KB DNGs. There may be more to this issue, but if you are investigating my problem, please keep in mind that I can create full res MLV video files by using the button. I hope this leads to an answer. Thanks!

mothaibaphoto

So you want liveview between the shots?
As far as I remember, the very first version of silent.mo has it.
Then it was removed to keep the battery.
Actually, it would be nice to have an option.

Meloware

As I understand, Silent Pictures only runs in LiveView. What defines that in a mirrorless camera less clear to me. Any preview has to be live, because the EOS M has no optical view in the first place. The "Half Shutter" event is how a Silent exposure is triggered. Button pressing to "Half Shutter" does work as expected on the EOS M camera, but I need to trigger an exposure from a method which can be generated from an electronic controller (a switch closure). I am able to do this with my T4i.

Between exposures, I am still interested for the back display to show the current picture, but I still need to see the data like frame number and total card usage (which is normally displayed). In any case, displayed data isn't as important as being able to record the video using an external trigger.

a1ex

To return to LiveView from full-res silent pictures, simply press half-shutter again after the exposure.

To trigger exposures without returning to LiveView, thus saving the battery, use long half-shutter presses.

Both cases should work with external signals. However, the EOS M is unable to accept external half-shutter signals, to my knowledge.

The rationale behind this behavior is around here (basically, allow remote triggers to work without LiveView draining the battery).

The alternative would be audio trigger. However, it doesn't work with FRSP, but it's easy to fix.

Also, the intervalometer is synced from the real-time clock, so you may be able to use it without any sync signals (open loop).

Quote from: Meloware on February 22, 2017, 06:15:47 AM
As I understand, Silent Pictures only runs in LiveView. What defines that in a mirrorless camera less clear to me.

On EOS M, exiting LiveView means entering either Canon menu or the PLAY dialog. In these modes, the image sensor is inactive. The full-res silent pictures will switch to a "paused LiveView" mode (an artificial mode similar to PLAY dialog, where the image sensor is also inactive).

Meloware

QuoteTo return to LiveView from full-res silent pictures, simply press half-shutter again after the exposure.
To trigger exposures without returning to LiveView, thus saving the battery, use long half-shutter presses.
Both cases should work with external signals. However, the EOS M is unable to accept external half-shutter signals, to my knowledge.
This describes how my EOS M works, when the shutter button is physically pressed, and how the T4i operates with a remote cable plugged in. Of course, this cable feature is unavailable on the EOS M.
Quote
The rationale behind this behavior is around herehttps://www.magiclantern.fm/forum/index.php?topic=18787.0 (basically, allow remote triggers to work without LiveView draining the battery).
The alternative would be audio trigger. However, it doesn't work with FRSP, but it's easy to fix.

It seems the post you  mentioned above does seem to describe the same problem. For myself, battery life is not an issue. This is a home designed, frame by frame movie-to-digital transfer station, and everything is powered by line adapters and power supplies. The audio trigger module is where I would go, if I had the knowledge and resources to build my own version. I would think it would be a simple matter to substitute the "shutter" variable for the "Half-shutter" variable, and my troubles might be behind me.

QuoteAlso, the intervalometer is synced from the real-time clock, so you may be able to use it without any sync signals (open loop).

The intervalometer isn't an option because this is an asynchronous system. The camera needs to take an exposure when the larger system is ready. My station currently copies at about 10 frames a minute, although I hope to get it faster. It is my system ready signal (a switch closure) which needs to trigger the camera.

Yes, it needs to run for days to render out a 15 minute film. Even a short film is over 30,000 exposures, on the camera, and any mechanical operation would quickly wear it out. The Silent Picture feature is essential in making this home design possible.

I really hope this solution is fairly easy and interesting for one of you coding experts to help me with. The results of my work benefit a non-profit industrial history museum. All of the films at http://industrialhistory.org/education/videos/ were made without compensation and Magic Lantern is essential in my design. This may seem to be a novel use of ML, but I hope you get to look at some of the results and agree that this is a valuable tool in preserving historic films.

dfort

That's a cool application. The videos look nice and steady. Could you post some photos of your rig?

Years ago I experimented putting small video cameras on old Moviolas to convert 35mm film to 24fps QuickTime files. That was a big deal back then because we were using 3/4 inch Umatic videotapes. It worked ok and I called it the Digiola but I never followed up on it--too busy working and technology was moving fast. I still have that domain name and use it for my email.

Quote from: a1ex on February 22, 2017, 08:59:52 AM
The alternative would be audio trigger. However, it doesn't work with FRSP, but it's easy to fix.

Easy for you! Ok--I brought back the Audio Remote Shot on the EOSM and that was really easy so I'll look into this.

Seems to me that if we can detect when the silent module is active it might be possible to fake a long shutter half-press in shoot.c for the EOSM?

// take one shot, a sequence of HDR shots, or start a movie
// to be called by remote triggers
void remote_shot(int wait)
{
    // save zoom value (x1, x5 or x10)
    int zoom = lv_dispsize;
   
    #ifdef FEATURE_FOCUS_STACKING
    if (is_focus_stack_enabled())
    {
        focus_stack_run(0);
    }
    else
    #endif
    if (is_movie_mode())
    {
        movie_start();
    }
    else if (is_hdr_bracketing_enabled())
    {
        hdr_shot(0, wait);
    }
    else
    {
        take_fast_pictures(pics_to_take_at_once+1);
    }
    if (!wait) return;
   
    lens_wait_readytotakepic(64);
    msleep(500);
    while (gui_state != GUISTATE_IDLE) msleep(100);
    msleep(500);
    // restore zoom
    if (lv && NOT_RECORDING && zoom > 1) set_lv_zoom(zoom);

    picture_was_taken_flag = 0;
}

a1ex

The audio trigger already triggers simple silent pictures, and it doesn't do so by pressing half-shutter. So... the problem is elsewhere.

Clicking my last link will give you the place to look for:

Quote from: a1ex on January 21, 2017, 09:43:42 PM
The audio trigger only works when the camera is "idle" (either in photo mode or in LiveView, with no Canon menu active).

FRSP leaves the camera in either the QuickReview + paused LV state, or in plain paused LV state (depending on preview settings), so those modes should probably be allowed for listening as well.

Looking at the remote shoot code, the trigger only runs when display_idle() returns 1 (actually a short while after that, to avoid some false triggers from e.g. button or shutter noises).

So, one way is to modify display_idle() to consider the paused LiveView state as "idle". Other code that use this function must be checked for possible side effects (this would be the most time-consuming step if we pick this solution). A very simple example:

if (!lv && display_idle())

which refers to photo mode outside LiveView, without any Canon menus open (therefore "idle" or ready to take pictures). Entering the paused LiveView will make lv = 0 (PauseLiveView -> PROP_LV_ACTION set to 1 -> lv = !buf[0]). Therefore, the above condition will be true after taking a full-res silent picture.

Is it desirable to change this behavior? You can't answer without reviewing each piece of code that calls this function.

A refactor might help, but it's pretty complex code not covered by a test suite (other than manually trying the affected features).

Or, allow the extra mode just in the audio trigger (easy, will not break other functionality, but the resulting code may look a bit ugly). Probably not much worse than it already is.

dfort

Another suggestion:

Quote from: a1ex on October 20, 2016, 04:48:10 PMRight - playing with the functions called by mlv_snd might help. The audio side shouldn't depend on the display operation, but most likely, Canon's powersaving turns off both of them.

Another workaround would be to let audio remote shot work on top of Canon menu. That would reduce the power consumption a lot.

The problem is that full resolution silent picture leaves the camera in a paused LV state and it seems that the EOSM also turns off the audio when the LV is paused so the camera cannot listen for an audio event. I tried faking a half-shutter press after saving the FRSP but was unsuccessful getting that to work. Maybe once the EOSM goes into the paused LV state only a button press can wake it from a coma. As a1ex noted this only happens with FRSP.

DeafEyeJedi

Quote from: dfort on February 23, 2017, 11:19:28 PM
...I tried faking a half-shutter press after saving the FRSP but was unsuccessful getting that to work.

How exactly was this attempted? Some sort of a script?
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109

Meloware

For my film transfer application, I would prefer the display to remain active. I need to monitor the frame count, so I can harvest my chip before it fills. Keeping the last captured frame in view allows me to see what is happening on the film. My station currently uses a 650D/T4i, and I have a web cam viewing the LCD display and am pumping the webcam video downstairs to my living room. Would the goal be easier if the display didn't get powered down? I don't want power save features. Everything is powered off the line and needs to be monitored continuously.

miket

I am very interested in using ML to transfer a collection of family films.  I have been following the 12/10 video bit thread closely and wanted to ask if the video mode frame rate can be externally clocked (not advanced by an internal timer) to accomplish the film capture.

For example - use externally clocked video mode and connect a remote release cable from the camera to a reed switch (magnetically operated).  Then a magnet is attached to a gear on the projector that rotates once per frame triggering the video frame capture then waiting for the next frame allowing precise synchronization between camera and projector.

The big advantage of external clocking combined with 10 /12 bit video mode is that film capture involves about 1k frames per minute of film for amateur gauges and about 1.5k frames per minute for professional systems.  So by combining storage savings of lower bit rates and taking video output directly into color grading apps, without intermediate processing, would be a big time savings.  Also if using video mode can allow higher frame rate 15- 24 FPS capture then the old projectors can be used for film transport without needing to modify the drive speed using some kind of mechanical reducer.

If it's possible to not require ML scripting and only a simple external switching system to capture film into high-quality ML files it will enable a larger group of users to preserve the past.  I am working with my cousin on our family film project and he built Pi powered project which works really well, you can read about it here http://spectrum.ieee.org/geek-life/hands-on/how-to-convert-old-film-reels-with-a-raspberry-pi  Joe and I exhibited the project at the 2016 NYC maker faire and there was a lot of interest.  Being able to use ML and the higher quality Canon sensors would be great.

If it helps - this video is a refresher on how a projector works https://www.youtube.com/watch?v=En__V0oEJsU

Mike

dfort

Quote from: DeafEyeJedi on February 24, 2017, 01:37:08 AM
How exactly was this attempted? Some sort of a script?

No, just tweaking the code.

Quote from: Meloware on February 24, 2017, 04:35:49 AM
...I would prefer the display to remain active...My station currently uses a 650D/T4i...Would the goal be easier if the display didn't get powered down?

I just tested full resolution silent picture on a 700D/T5i and it exhibits the same behavior as the EOSM and I suppose the same as the 650D which is to go into LV pause mode after the FRSP is saved. The 650D and 700D can use wired remotes and the EOSM has to rely on Audio Remote Shot and some way of feeding a signal to the mic to make up for the lack of a real audio remote but you can't wake the camera via Audio Remote Shot. Triggering via USB not possible on the EOSM so that's not an option.

What I discovered works, though it is exactly what you don't want, is to turn off image review. The first audio event will take a shot, the next audio event will reset, next will take a shot, etc. just like it does with your 650D setup. Live view remains dark though. Now if you set image review for any amount of time, even 2 sec., the EOSM goes into that LV paused comatose state indefinitely and only doing a physical shutter half-press will release it from that coma. Oh it would be so nice if it can just go back to regular LiveView like it does with simple silent picture.

Quote from: a1ex on February 22, 2017, 09:24:28 PM
So, one way is to modify display_idle() to consider the paused LiveView state as "idle".

Looked at display_idle():

int display_idle()
{
    extern thunk ShootOlcApp_handler;
    if (lv) return liveview_display_idle();
    else return gui_state == GUISTATE_IDLE && !gui_menu_shown() &&
        ((!DISPLAY_IS_ON && CURRENT_GUI_MODE == 0) || (intptr_t)get_current_dialog_handler() == (intptr_t)&ShootOlcApp_handler);
}


???

Meloware

I can confirm that with the EOS M. When the image review is turned off, the entire LCD display is off. The HDMI output also becomes inactive. This means the frame count and SD memory capacity and performance is not displayed. Using the audio trigger twice for each exposure would require more electronics to be built in my controller. The full res video does get recorded this way, but at the expense of important operational information. The image review is very nice but not as essential as the status data. Thanks for pointing this out. This same technology in an industrial camera might cost $5000, so if this is as good as it gets, I could build more electronics and use other computers to track frame count. The goal of getting the image sensor to record would still be possible. By the way, the audio trigger also appears to work by simply shorting the wires of the microphone jack. My remote trigger for the 650D uses an open collector switch closure. I don't know if this alone could be a reliable audio trigger, but I could gate some of my stepping motor clock as an audio source.

Meloware

QuoteWhat I discovered works, though it is exactly what you don't want, is to turn off image review. The first audio event will take a shot, the next audio event will reset, next will take a shot, etc. just like it does with your 650D setup.
Instead of "Live View" we might call this "Blind View". This Blind View RAW recording does work, but only to a point. Even though the Image Review feature is disabled, the LCD powersave timer is still active, and cannot be disabled from the main menu. Eventually the timer value expires and the camera goes into standby. Camera Auto Off can be completely disabled, but the continued camera operation is still at the mercy of the LCD Auto Off timer.

The shore powered movie transfer station needs to run for hours at a time. The limitation is the capacity of the SD memory card. Might we put a "Disable" option in the LCD Powersave list? Another possibility is to disable the timer altogether when Image Review is turned off.

dfort

@Meloware

I think I came up with something that will work for you. I put a special build on my bitbucket download page: https://bitbucket.org/daniel_fort/magic-lantern/downloads/

The name of the build is: magiclantern-Meloware-hack.2017Feb25.EOSM202.zip

Yeah, it is a hack. I'm forcing it into LiveView after saving each shot:

     else
     {
         bmp_printf(FONT_MED, 0, 106, "Long half-shutter will take another picture.");
         int preview_delay = MAX(1000, image_review_time * 1000 - save_time);
         delayed_call(100, display_off_if_qr_mode, (void*)preview_delay);
+        force_liveview();
     }


If you use this with the shutter button you have to do a quick half-press to take a picture. A longer half-press will focus the lens. I actually like this much better. Guess I could remove that "Long half-shutter will take another picture" message because it is no longer relevant.

@a1ex -- Did I do a bad thing here? What are the consequences?

Licaon_Kter


Meloware

Dfort, this is great! Hack or not, we now have Silent Pictures MLV video recording, on the EOS M and triggered by the audio. Here is a summary of what I found so far:

Camera: EOS M
ML build: magiclantern-Meloware-hack.2017Feb25.EOSM202

Canon Menu setup:
Image Quality – RAW
Image Review – Hold
Power Saving: (LCD auto off: 1 min), (Camera auto off: Disable)

ML modules enabled: mlv_rec, silent
ML features setup: Silent Picture (Full-res, MLV), Audio Remote Shot: ON (level 10)

External trigger is a audio loop, connected into the camera's microphone jack. There is a 200 ms 1000Hz burst followed by 7.8 sec of silence.

About 1 second after the tone burst, the display announces the first messages produced by the exposure. This message only appears for an instant and is therefore unreadable. The captured imaged then draws (which is probably what eliminates the initial message). At about 3.8 seconds, the summary data flashes on screen, which contains the over all frame count and total SD memory use. This is also where the message about using a long "half shutter" appears.

Of the two message events, the last one is most important. I monitor the LCD with a webcam along with a second webcam which continuously views the equipment (in case something unexpected happens). I watch these two displays from another room, while watching television or doing other work. The last status message tells me when the chip is getting full and needs to be exchanged. If the system runs beyond the memory capacity, I lose part of the film and need to waste time recovering.

The system exposure interval is hand adjusted on my own controller and it is set (by eye) to occur just after the appearance of the "long half shutter" message. This interval is generally around 6 seconds, depending on the write speed of the SD memory. The "long half shutter" message is my visual clue that the camera is ready for another exposure (too bad there is no "camera ready" signal to tap into).

With this build, the camera is unable to cycle again until the appearance of the "Audio Release On" message, which occurs about 7.8 seconds after the start of the tone burst.

Summary:

Show Stopper! The LCD powersaver remains active and stops the recording after it times out. It cannot be disabled in the main menu and effectively needs to be. A 64 GB SD card takes over three hours to fill and 128 GB obviously more. In order to be practical, the system needs to run unattended for these kinds of times.

The exposure cycle time for this build is 8 seconds. This is two seconds slower than I currently have with the 650D and a remote shutter. Every second counts when you need to copy 30,000 frames for a 12 minute film. With this build, the "long half shutter" message occurs 4 seconds before the "Audio Release On" message. I am presuming the current frame is saved once the "long half shutter" message appears, so waiting another 4 seconds before you can take another exposure may be a big waste of precious time. Please investigate how fast the camera may be made to recover. I am hoping this can be twice as fast without too much trouble.

The final message, containing the "long half shutter", frame count, and used memory are important to see in order to know when the system needs servicing. Can this be made to linger long enough to clearly read? The captured image and initial message are of little importance as compared to this last message.

This build runs reliably, otherwise! I am grateful for ML's support and interest. I hope to publicize the value of your project. Your work makes possible professional quality digital archiving of museum collections, on a budget affordable to most of us. Aside from movie transfer, high volume copying of fragile books, ledgers, and other documents (too fragile for the flatbed scanner), will now be possible.

I hope this application is an unexpected and welcome surprise to your group!

Chris Clawson
Museum of Our Industrial Heritage
http://industrialhistory.org


DeafEyeJedi

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

dfort

@Meloware

Hi Chris -- what would really help is a video showing your system running and comparing the 650D with the hacked EOSM build. Nothing elaborate, a cell phone video would be fine. I'll try to run tests here with my 700D and EOSM to see if there is anything that I can do to help get your system up to speed on the EOSM.

I'm curious how you trigger the 650D because it should need two shutter half-presses per exposure. Once to put the camera into LiveView and then a second half-press to take the picture.

I'm surprised that the Power Save timer doesn't reset every time a picture is taken but since silent pictures don't trigger the shutter it makes sense in this case. A while back I wrote a very simple lua script to keep the LV alive by "faking" a shutter half-press. Maybe this will work as long as it doesn't shoot a frame when it goes off. This will probably require making another build using the lua_fix branch. I'll give it a try and get back to you.

Note that @garry23 is also working on a similar issue. He wrote several useful lua scripts so maybe he'll come up with something that will work for you too.

Meloware

My only camera is the 650D. The EOS M has no lens, and I have no smart phone. I want to support you in any way possible, but am not sure how watching my system run might help.

The 650D remote shutter jack has two contacts. One is the shutter, the other is the Half-Shutter.

I start a job by button pressing into live view (with Silent and MLV_Rec enabled). I then start my external controller. The controller forces the stepping motor (on the projector) to begin running to advance the next film frame. An optical switch stops the stepper when the beam is broken, by the shutter wheel, signaling my system that another frame is ready to capture. The controller then asserts a long "half shutter" switch closure, which begins the camera cycle, and takes the picture.

At this time, I also start  a "wait for the camera to be ready, again" timer. This is the timer I set by hand by watching for the appearance of the "long half shutter for next exposure" message. Once the "long half-shutter message" appears, the camera leaves the display on long enough to clearly read the message, and then the LCD goes black. My manually set "wait for the camera to be ready, again" timer expires and trips the controller's "kick timer", starting the stepper again and the next cycle begins.

I only button press into Live View once, at the beginning when I install a blank memory chip. From that point on, the only action on the camera will be the "long half-shutter" remote trigger from the controller.

I am pretty sure it is the LCD Powersave timer which is shutting down the EOS M. The camera is dropping into standby and I can control when this happens by changing options for the LCD in the powersave menu. If this is coming from the Powersave, the option is to provide an extremely long timeout (two days?), provide an option to disable it from the menu, or have it automatically disabled when the camera is operated in this mode.

As far as speeding up the cycle goes, I guess it depends entirely on what the camera is doing, and when. My experience with the 650D/T4i is that the camera is ready for another exposure as soon as the "long half-shutter" message appears. As I mentioned, the EOS M won't audio trigger until Live View is again active and the "Audio Release On" message appears. I certainly hope the overall exposure cycle can be shortened. Right now (with dfort's hack) it is about 8 seconds. Is 4 seconds possible?

This is incredibly frustrating! Canon puts a large, professional quality APS-C image sensor, in the camera, and then doesn't let you use it. I got the EOS M because my application doesn't require an SLR or even a shutter. Oh Boy, a mirrorless camera! I can shoot forever, right? Wrong... the thing still has mechanical components that wear out. One hundred thousand cycles may sound like a lot, but that is only around three 12 minute films, for me. Magic Lantern works great with my 650D, but I wish I could free it up and use my new EOS M. ML is my best hope for a solution.

dfort

Looks like this project is pointing out areas in ML that could use some TLC.

It might be possible to do what you need with a lua script but -- there doesn't seem to be a way to hook into the code that triggers AUDIO_REMOTE_SHOT. That could be handy for several applications especially on the EOSM because it doesn't have a wired remote.

Your application could benefit from lossless DNG compression which will give you smaller files and thus more frames per card.

You'll probably experience a speed boost if you save to MLV instead of DNG. In addition, MLV on the EOSM and several other cameras now has the ability to save as 12bit or 10bit. This will give you smaller files with virtually no loss in quality so it might be an even better choice than saving to DNG. However, this hasn't been applied to the silent module yet.

Oops--looks like this project just opened up a can of worms.

@Licaon_Kter -- I know you're watching but have you tried that test build I posted? It seems to me that FRSP and simple silent should have the same user interface. Isn't it strange that you need to wake up LiveView to see what you are shooting with FRSP after the first shot? A long shutter half-press is needed to get back into LV and a long half-press is also used to focus and Meloware is using an even longer half-press on the 650D to get into LV and shoot the next shot. I like the long half-press to focus and short half-press to shoot and keep LiveView active until the power savings setting turns it off.