Magic Lantern for 550D with GUI menus & lots of extras

767 views
Skip to first unread message

Alex

unread,
Dec 11, 2010, 4:28:30 PM12/11/10
to Magic Lantern firmware development
Here's the new release for 550D/1.0.8:

https://bitbucket.org/a1ex/magic-lantern/

New features:
* GUI menus (of course): press the ERASE button to display them.
* Zebra also for underexposed areas
* Simple intervalometer
* Wireless shutter trigger using the LCD sensor and your own hand
(i.e. put your hand near the LCD to take a pic)
* AE bracketing (like on 5D2 ML)
* Stack focus works (you have to go to Live View, then Play, then back
to LiveView, then start it from menu)
* Debug features, like GUI and property logging => you can help the
development without writing a single line of code!
* Piers' audio options accessible from menu
* No more need for disabling powersave (but you can, if you like)

Known bugs:
* Sometimes the menu gets overwritten by Canon's drawing routines.
* After closing ML menu, screen may not redraw automatically (half-
press the shutter to trigger a redraw)
* Playing with debug options may lead to strange behaviors of the
camera (if it happens, restart it).
* I did not try the Boot menu entries => be careful with them!

Please test it and report the results here.

Enjoy!

Petr Sedlacek

unread,
Dec 11, 2010, 5:27:40 PM12/11/10
to ml-d...@googlegroups.com
Amazing work, Alex! Admire your persistence. Wish I could chip in
somehow, I really want my 550D back now... It might be time to replace
the 400D :)

Pete

Pedro Barbosa

unread,
Dec 11, 2010, 5:33:19 PM12/11/10
to Magic Lantern firmware development
hi alex...inside the Zip file there is no congif file...should we use
the old ones or it's not necessary anymore?

Alex

unread,
Dec 11, 2010, 5:37:08 PM12/11/10
to ml-d...@googlegroups.com
It's not necessary, it will create one from Debug->Save if you don't
like the default settings.

You can use the old one, too, but my advice is to start with a fresh
one, as I've changed some defaults.

> --
> http://magiclantern.wikia.com/
>
> To post to this group, send email to ml-d...@googlegroups.com
> To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/ml-devel?hl=en

Pedro Barbosa

unread,
Dec 11, 2010, 5:54:27 PM12/11/10
to Magic Lantern firmware development
i did want to say that there is no .fir file....sorry my mistake...it
´s not necessary too? thanks for the help

Alex

unread,
Dec 11, 2010, 6:01:35 PM12/11/10
to ml-d...@googlegroups.com
The fir file is the same as in the RC1 release. I believe it's
necessary (I don't know whether it's need only for first time install
or not... I didn't try to start ML without it).

JeremyOne

unread,
Dec 12, 2010, 1:03:16 AM12/12/10
to Magic Lantern firmware development
Alex,

Again, this is a great release (11 dec 2010), good work.

It seems like all the bugs I noticed in the last release went away,
but there is one new one:

If the camera goes to sleep with power save, you can't turn it back on
without removing the battery. For now I just turned power-save off.

Thanks again, I love all the new stuff.

Jeremy

Alex

unread,
Dec 12, 2010, 3:05:25 AM12/12/10
to ml-d...@googlegroups.com
> If the camera goes to sleep with power save, you can't turn it back on
> without removing the battery. For now I just turned power-save off.

My camera turns on by half-pressing the shutter... and reloads Magic
Lantern. It may depend in which mode it was before going to sleep.
I've tested in AV mode, with and without LiveView, and it worked.

Patrick Burns

unread,
Dec 12, 2010, 4:03:08 AM12/12/10
to ml-d...@googlegroups.com
AWESOME WORK Alex!  (and I'm VERY happy to see the intervalometer feature! =)  )

I've not installed ML yet on any camera, as I'm waiting for... well I guess a more "final" and mature release since I use both of my T2i's in a production environment.  But I'm reading these boards and happy to contribute with ideas (like the intervalometer).

What a shame Canon cant release a SDK to actually ENCOURAGE users to develop their own features and extensions to push the boundaries of their cameras.  Not open source... but perhaps open API?  I mean if you're Canon, why NOT take advantage of "free" labor from the user community of your product to make it that much better?   I understand them not wanting to release source code, but will never understand whats to lose for them NOT encouraging the user base to develop the features that THEY the users want to see!

(are you listening Canon???  Probably not *sigh*)

To everyone in the ML development community - keep up the great work!  Your efforts are greatly appreciated!


Alex

unread,
Dec 12, 2010, 4:48:46 AM12/12/10
to Magic Lantern firmware development
Next feature request comes from cinema5d forum: spotmeter. Code is
similar to "histozebra", so it should be easy to enable.

On Dec 12, 11:03 am, Patrick Burns <patricklynnbu...@gmail.com> wrote:
> AWESOME WORK Alex!  (and I'm VERY happy to see the intervalometer feature!
> =)  )
>
> I've not installed ML yet on any camera, as I'm waiting for... well I guess
> a more "final" and mature release since I use both of my T2i's in a
> production environment.  But I'm reading these boards and happy to
> contribute with ideas (like the intervalometer).
>
> What a shame Canon cant release a SDK to actually ENCOURAGE users to develop
> their own features and extensions to push the boundaries of their cameras.
>  Not open source... but perhaps open API?  I mean if you're Canon, why NOT
> take advantage of "free" labor from the user community of your product to
> make it that much better?   I understand them not wanting to release source
> code, but will never understand whats to lose for them NOT encouraging the
> user base to develop the features that THEY the users want to see!
>
> (are you listening Canon???  Probably not *sigh*)
>
> To everyone in the ML development community - keep up the great work!  Your
> efforts are greatly appreciated!
>
> > ml-devel+u...@googlegroups.com<ml-devel%2Bunsu...@googlegroups.com>

Pedro Barbosa

unread,
Dec 12, 2010, 6:43:44 AM12/12/10
to Magic Lantern firmware development
does anybody owns the original fw1.0.8? i found one on the internet
but i'm not sure it's the right FW... i think i'm gone disable the
DISKBOOT flag and downgrade from 1.0.9 to 1.0.8...does anybody tried
this way?

Alex

unread,
Dec 12, 2010, 7:09:19 AM12/12/10
to Magic Lantern firmware development
Pedro: if you succeed, please post all the details :)

Just enabled QScale (bit rate control) and spotmeter. Lots of thanks
to Trammell for the bitrate experiments and 5D2 code!

QScale is also saved to config file (read: pull request for the 5D2
branch). Changeset is here: https://bitbucket.org/a1ex/magic-lantern/changeset/ad23388b1f0e

Now you can do speed/quality tests like on 5D2. You can also record 30
minutes of FullHD in 4 GB at lower quality, or even use slower SD
cards (less than class 6)!

Download address is the same: https://bitbucket.org/a1ex/magic-lantern

Pedro Barbosa

unread,
Dec 12, 2010, 7:30:39 AM12/12/10
to Magic Lantern firmware development
new features are punpin out of the trees :D evry day is a new sunny
day

i´ll try to do the downgrade and if i'm successfull i i'll post all
the details...

alex...do you have the canon original fw1.0.8...i have one found on
the internet but i just want to confirm if it is the same

thanks a lot

Alex

unread,
Dec 12, 2010, 7:32:15 AM12/12/10
to Magic Lantern firmware development
No, sorry... I've got my camera with 1.0.8 preinstalled.

Alex

unread,
Dec 12, 2010, 7:40:52 AM12/12/10
to Magic Lantern firmware development
Most features are already there, waiting to be enabled. They were not
active because the video RAM address was not known, and the GUI
handling code was a bit different from the 5D2. Once those were found,
the extra features were relatively easy to enable.

The new ones are the intervalometer and the remote trigger with LCD
sensor :)

Behind the scenes, there was a lot of work for understanding how the
camera works, to develop analysis scripts (the firmware is huge)...
Also, many thanks to AJ and Arm.Indy; I've used lots of bits from
their findings.

Pedro Barbosa

unread,
Dec 12, 2010, 8:54:09 AM12/12/10
to Magic Lantern firmware development
good news

i downgrade to 1.0.8 and run your last fw...everything works ok :D

i disable bootdisk flag in config file of your 1.0.9 fw and them i've
done the downgrade...finally i run your last 1.0.8 fw and
now...everything still ok

downgrade is possible

Alex

unread,
Dec 12, 2010, 9:27:20 AM12/12/10
to ml-d...@googlegroups.com
Good! I'll add that to the wiki.

> --
> http://magiclantern.wikia.com/
>
> To post to this group, send email to ml-d...@googlegroups.com
> To unsubscribe from this group, send email to ml-devel+u...@googlegroups.com

Pedro Barbosa

unread,
Dec 12, 2010, 9:44:07 AM12/12/10
to Magic Lantern firmware development
i'm playing with the qscale and even at -16 the camera never stops...i
made 15sec clips with +8,-8,-16 and the buffer bar never show...my
cards are all silicone power class 6

qscale +8 = 8.3 mb 15sec

qscale -8 = 22.2 mb 15sec

qscale +8 = 73.3 mb 15sec

Alex

unread,
Dec 12, 2010, 9:53:17 AM12/12/10
to Magic Lantern firmware development
Nice to know this :) On my debugging card (an old 512 Lexar without
class info) it stops after a few seconds at -12 or so.

* Last entry is qscale -16.

Does bitrate vary with frame rate / resolution?

Pedro Barbosa

unread,
Dec 12, 2010, 9:58:19 AM12/12/10
to Magic Lantern firmware development
i didn't try other framerates..i only tested 24p but as soon as i can
i'll test with other...both 720p and 1080p and maybe 480p just to try
figure the diference between diferent qscale

Pedro Barbosa

unread,
Dec 12, 2010, 11:06:09 AM12/12/10
to Magic Lantern firmware development

arm.indy

unread,
Dec 12, 2010, 11:30:44 AM12/12/10
to Magic Lantern firmware development
So there might be a check added by Canon to prevent downgrade if
bootflag is enabled...

Indy

Alex

unread,
Dec 12, 2010, 12:05:54 PM12/12/10
to Magic Lantern firmware development
With Arm.Indy's help, I'm upgrading to Magic Lantern 1.0.9 and porting
the new features there. Therefore, downgrade will not be necessary any
more (if everything goes well).

arm.indy

unread,
Dec 12, 2010, 1:10:03 PM12/12/10
to Magic Lantern firmware development
you are upgrading to -Canon firmware- 1.0.9 !

ML does not yet remplace official firmware, just improving it ;-)

Renny Hayes

unread,
Dec 12, 2010, 2:17:48 PM12/12/10
to Magic Lantern firmware development
Frikkin' awexome. This camera now beats practically anything else I've
ever used. The only thing I was missing was on-the-fly gain control,
and now that's solved.
I'd say "keep up the good work," but it would appear that just about
all the good work has already been kept up. :D

JeremyOne

unread,
Dec 12, 2010, 2:38:59 PM12/12/10
to Magic Lantern firmware development
I just tried waking up with the shutter and it worked, I must have
missed that part of the instruction. I guess I was confused that all
the other buttons (including the power switch) seemed dead.

If you are hooking to the shutter event specifically, it might be nice
to also listen for a couple other buttons, like menu and/and the power
switch. However that is not a big issue once you figure out what
button to press.

Great work as always,
Jeremy

On Dec 12, 12:05 am, Alex <broscutama...@gmail.com> wrote:
> > If the camera goes to sleep with power save, you can't turn it back on
> > without removing the battery. For now I just turned power-save off.
>
> My camera turns on by half-pressing the shutter... and reloads Magic
> Lantern. It may depend in which mode it was before going to sleep.
> I've tested in AV mode, with and without LiveView, and it worked.
>

Alex

unread,
Dec 12, 2010, 2:42:26 PM12/12/10
to ml-d...@googlegroups.com
... I did not try the power switch (since that was already on). When
the camera slept, I've always powered it on by half-pressing the
shutter.

I did not handle any new buttons do this (just passed the events
unhandled by the menu back to the original firmware). In fact, I don't
know (yet) how to detect shutter button press and power switch (i.e. I
see events coming from them, but don't know how to decode).

P.S. The 1.0.9 port for the new features started to work!

Pedro Barbosa

unread,
Dec 12, 2010, 3:32:15 PM12/12/10
to Magic Lantern firmware development
i've been testing the diferent bitrates and the best we can get is
qscale -16 with the iso at 800...iso 1600 stops recording...

at qscale -14 and -15 we can go to 1600 iso...

lower bitrates work with all iso at all resolution and frame
rates...at least with me and my class 6 silicone power ds cards

Matt Dennie

unread,
Dec 12, 2010, 6:16:26 PM12/12/10
to ml-d...@googlegroups.com
I have compiled a video of all the qscale settings as well as their bitrates. Here is the link:

http://vimeo.com/17742479

Alex

unread,
Dec 12, 2010, 6:25:07 PM12/12/10
to ml-d...@googlegroups.com
... it seems we'll be able to see the video tomorrow...

Only 40 mbit/s at -16?

I don't know whether values outside this range make sense, since I'm
clueless about how h264 is configured (I've just copied the code from
Trammell's 5D2 branch and it worked from the first try...)

Matt Dennie

unread,
Dec 12, 2010, 7:02:20 PM12/12/10
to ml-d...@googlegroups.com
I just recorded a scene at -12 at iso 100 and got 30.56 mbit/s. However, after only changing the iso to 200, the bitrate increased to 43.32.

Also, at -16 and iso 100 I get 36.8 mbit/s, at iso 200 i get 40 mbit/s, and at 1600 I get 85 mbit/s (the buffer filled after 2 sec.), all at -16.

I have also noticed that the inverse is true. If I am recording at 1600 I need to turn down the qscale to about -10 of -11 to avoid buffer overflows, but if I switch to iso 100, and do not change the qscale back up to something like -15, then the video will drop to like 30 mbit/s.

Does anyone know what would cause any of this?

Alex

unread,
Dec 12, 2010, 7:04:29 PM12/12/10
to ml-d...@googlegroups.com
The encoder "thinks" that ISO noise is useful detail, and is
increasing the bitrate :)

Matt Dennie

unread,
Dec 12, 2010, 7:10:14 PM12/12/10
to ml-d...@googlegroups.com
Is there a way to turn off the manual qscale setting in the current version of ML (other than going back to the dec 11 build)? If not, that would be very useful for people changing iso frequently while shooting.

Alex

unread,
Dec 12, 2010, 7:16:01 PM12/12/10
to Magic Lantern firmware development
Turn the camera off and on, and do not change the setting from the
menu. The setting is only updated when you click on the QScale entry
from the menu.

/* this is in theory, I didn't test if it really works */

On Dec 13, 2:10 am, Matt Dennie <matts...@gmail.com> wrote:
> Is there a way to turn off the manual qscale setting in the current version
> of ML (other than going back to the dec 11 build)? If not, that would be
> very useful for people changing iso frequently while shooting.
>
> On Sun, Dec 12, 2010 at 4:04 PM, Alex <broscutama...@gmail.com> wrote:
> > The encoder "thinks" that ISO noise is useful detail, and is
> > increasing the bitrate :)
>
> > On Mon, Dec 13, 2010 at 2:02 AM, Matt Dennie <matts...@gmail.com> wrote:
> > > I just recorded a scene at -12 at iso 100 and got 30.56 mbit/s. However,
> > > after only changing the iso to 200, the bitrate increased to 43.32.
>
> > > Also, at -16 and iso 100 I get 36.8 mbit/s, at iso 200 i get 40 mbit/s,
> > and
> > > at 1600 I get 85 mbit/s (the buffer filled after 2 sec.), all at -16.
>
> > > I have also noticed that the inverse is true. If I am recording at 1600 I
> > > need to turn down the qscale to about -10 of -11 to avoid buffer
> > overflows,
> > > but if I switch to iso 100, and do not change the qscale back up to
> > > something like -15, then the video will drop to like 30 mbit/s.
>
> > > Does anyone know what would cause any of this?
>
> > > On Sun, Dec 12, 2010 at 3:25 PM, Alex <broscutama...@gmail.com> wrote:
>
> > >> ... it seems we'll be able to see the video tomorrow...
>
> > >> Only 40 mbit/s at -16?
>
> > >> I don't know whether values outside this range make sense, since I'm
> > >> clueless about how h264 is configured (I've just copied the code from
> > >> Trammell's 5D2 branch and it worked from the first try...)
>
> > >> On Mon, Dec 13, 2010 at 1:16 AM, Matt Dennie <matts...@gmail.com>
> > wrote:
> > >> > I have compiled a video of all the qscale settings as well as their
> > >> > bitrates. Here is the link:
>
> > >> >http://vimeo.com/17742479
>
> > >> > --
> > >> >http://magiclantern.wikia.com/
>
> > >> > To post to this group, send email to ml-d...@googlegroups.com
> > >> > To unsubscribe from this group, send email to
> > >> > ml-devel+u...@googlegroups.com<ml-devel%2Bunsu...@googlegroups.com>
> > >> > For more options, visit this group at
> > >> >http://groups.google.com/group/ml-devel?hl=en
>
> > >> --
> > >>http://magiclantern.wikia.com/
>
> > >> To post to this group, send email to ml-d...@googlegroups.com
> > >> To unsubscribe from this group, send email to
> > >> ml-devel+u...@googlegroups.com<ml-devel%2Bunsu...@googlegroups.com>
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/ml-devel?hl=en
>
> > > --
> > >http://magiclantern.wikia.com/
>
> > > To post to this group, send email to ml-d...@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > ml-devel+u...@googlegroups.com<ml-devel%2Bunsu...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/ml-devel?hl=en
>
> > --
> >http://magiclantern.wikia.com/
>
> > To post to this group, send email to ml-d...@googlegroups.com
> > To unsubscribe from this group, send email to
> > ml-devel+u...@googlegroups.com<ml-devel%2Bunsu...@googlegroups.com>

Matt Dennie

unread,
Dec 12, 2010, 7:21:17 PM12/12/10
to ml-d...@googlegroups.com
cool, thanks. I tested videos at iso 100,200, 1600, and 6400 using the method you described. All showed the default bitrate.

By the way, that video I made should be online now.

Alex

unread,
Dec 12, 2010, 7:30:34 PM12/12/10
to Magic Lantern firmware development
Cool test, thanks!

It shows a lot of banding at very low bitrates... but with negative
qscales it's much better :)

On Dec 13, 2:21 am, Matt Dennie <matts...@gmail.com> wrote:
> cool, thanks. I tested videos at iso 100,200, 1600, and 6400 using the
> method you described. All showed the default bitrate.
>
> By the way, that video I made should be online now.
>
> > <ml-devel%2Bunsu...@googlegroups.com<ml-devel%252Buns...@googlegroups.com>
>
> > > > >> > For more options, visit this group at
> > > > >> >http://groups.google.com/group/ml-devel?hl=en
>
> > > > >> --
> > > > >>http://magiclantern.wikia.com/
>
> > > > >> To post to this group, send email to ml-d...@googlegroups.com
> > > > >> To unsubscribe from this group, send email to
> > > > >> ml-devel+u...@googlegroups.com<ml-devel%2Bunsu...@googlegroups.com>
> > <ml-devel%2Bunsu...@googlegroups.com<ml-devel%252Buns...@googlegroups.com>
>
> > > > >> For more options, visit this group at
> > > > >>http://groups.google.com/group/ml-devel?hl=en
>
> > > > > --
> > > > >http://magiclantern.wikia.com/
>
> > > > > To post to this group, send email to ml-d...@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > ml-devel+u...@googlegroups.com<ml-devel%2Bunsu...@googlegroups.com>
> > <ml-devel%2Bunsu...@googlegroups.com<ml-devel%252Buns...@googlegroups.com>
>
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/ml-devel?hl=en
>
> > > > --
> > > >http://magiclantern.wikia.com/
>
> > > > To post to this group, send email to ml-d...@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > ml-devel+u...@googlegroups.com<ml-devel%2Bunsu...@googlegroups.com>
> > <ml-devel%2Bunsu...@googlegroups.com<ml-devel%252Buns...@googlegroups.com>

Alex

unread,
Dec 13, 2010, 6:18:16 AM12/13/10
to Magic Lantern firmware development
The new release will have an OFF option in QScale. Code is already
commited to the repo.

HelmetBox

unread,
Dec 14, 2010, 3:40:12 PM12/14/10
to Magic Lantern firmware development
Some findings on FW1.0.8. tested on 4 cards with same results:

Without the config file, I can turn on and off without any issues.
Once I save the config file, it hangs on power off and I need to
remove the battery. However, on the next reboot, power off and on is
ok.

Zebras are not displayed initially on load to video mode. Once I
change over to camera and go to live view, the zebras are enabled and
stay enabled even on next reboot.

Camera only hung once when I zoomed in during video mode, audio meters
running but display froze. A power on and off fixed it.

Once everything is enabled, changing cards did not matter, all works
well!

Alex

unread,
Dec 14, 2010, 3:58:44 PM12/14/10
to ml-d...@googlegroups.com
Thanks for feedback.

1. config issue
I can't reproduce it on latest 1.0.9 prerelease. I've tried to save
config a few times and power off and back on => works OK.

2. known problem, I don't know how to fix it yet.

3. zoom works (with zebras too). I was not able to lockup the camera.

.k

unread,
Dec 15, 2010, 10:32:02 AM12/15/10
to Magic Lantern firmware development

is it possible, to implement an qscale ON/OFF option?
i tested the different values, and i think no value has the same
bitrate like the "original" firmware value.
i had some breaks already on -7 and -8 on high contrast ranges and
movements with my class 6 card. and it seems that the qscale options
have a more expanded room for the min. and max. bitrate.
so till the bitrates are more constant it would be a nice option.
thx

On 12 Dez., 13:09, Alex <broscutama...@gmail.com> wrote:
> Pedro: if you succeed, please post all the details :)
>
> Just enabled QScale (bit rate control) and spotmeter. Lots of thanks
> to Trammell for the bitrate experiments and 5D2 code!
>
> QScale is also saved to config file (read: pull request for the 5D2
> branch). Changeset is here:https://bitbucket.org/a1ex/magic-lantern/changeset/ad23388b1f0e
>
> Now you can do speed/quality tests like on 5D2. You can also record 30
> minutes of FullHD in 4 GB at lower quality, or even use slower SD
> cards (less than class 6)!
>
> Download address is the same:https://bitbucket.org/a1ex/magic-lantern
>
> On Dec 12, 1:43 pm, Pedro Barbosa <barbosa_f...@hotmail.com> wrote:> does anybody owns the original fw1.0.8? i found one on the internet
> > but i'm not sure it's the right FW... i think i'm gone disable the
> > DISKBOOT flag and downgrade from 1.0.9 to 1.0.8...does anybody tried
> > this way?
>
>

Alex

unread,
Dec 15, 2010, 10:47:20 AM12/15/10
to ml-d...@googlegroups.com
Already done.

Alex

unread,
Dec 15, 2010, 10:47:44 AM12/15/10
to ml-d...@googlegroups.com
Of course, in next 1.0.9 release.

h4nz

unread,
Dec 15, 2010, 11:19:53 AM12/15/10
to Magic Lantern firmware development
is it possible, to implement an qscale ON/OFF option?
i tested the different values, and i think no value has the same
bitrate like the "original" firmware value.
i had some breaks already on -7 and -8 on high contrast ranges and
movements with my class 6 card. and it seems that the qscale options
have a more expanded room for the min. and max. bitrate.
so till the bitrates are more constant it would be a nice option.


jb

unread,
Dec 15, 2010, 4:44:51 PM12/15/10
to Magic Lantern firmware development
It is maybe a stupid question, but I cannot figure how to make the
rack focus feature work, I mean I tried using MF and AF, I tried to
use the zoom in button to set the begining of the rack as explained in
the user guide but still no luck... Am I missing something?

Alex

unread,
Dec 15, 2010, 4:56:43 PM12/15/10
to ml-d...@googlegroups.com
Well... neither I can make it work, and I don't understand how the code works...

Can anyone show me a movie with how this works on 5D2?

Alex

unread,
Dec 16, 2010, 4:46:00 AM12/16/10
to ml-d...@googlegroups.com
I think I'm on the way to fix it. Seems to start working, but it's not
reliable at all.

I was able to handle the zoom out button, to focus the lens. As it's
implemented now, it counts focus steps. With the 50/1.8 and kit lens,
it's not reliable (i.e. it stops at the wrong position). But at least
it tries to work :)

Maybe it should be changed to work with focus distance instead (i.e.
not with focus steps). The kit lens reports that, and I think most USM
lenses do. This means it won't work any more with the 50/1.8.

With those lenses, it's noisy and it pauses when it likes to...

jb

unread,
Dec 16, 2010, 6:48:29 AM12/16/10
to Magic Lantern firmware development
By stops at the wrong position, you mean that it focus randomly or
that it just misses the correct position by a little bit? That would
mean that the focus_lens() function does not work properly? (I am just
starting to read the code, so my understanding is still limited.)
Wouldn't be even worse to use the focus distance as it is fairly
inaccurate with some lenses?

On 16 déc, 10:46, Alex <broscutama...@gmail.com> wrote:
> I think I'm on the way to fix it. Seems to start working, but it's not
> reliable at all.
>
> I was able to handle the zoom out button, to focus the lens. As it's
> implemented now, it counts focus steps. With the 50/1.8 and kit lens,
> it's not reliable (i.e. it stops at the wrong position). But at least
> it tries to work :)
>
> Maybe it should be changed to work with focus distance instead (i.e.
> not with focus steps). The kit lens reports that, and I think most USM
> lenses do. This means it won't work any more with the 50/1.8.
>
> With those lenses, it's noisy and it pauses when it likes to...
>
> On Wed, Dec 15, 2010 at 11:56 PM, Alex <broscutama...@gmail.com> wrote:
> > Well... neither I can make it work, and I don't understand how the code works...
>
> > Can anyone show me a movie with how this works on 5D2?
>

Alex

unread,
Dec 16, 2010, 7:00:12 AM12/16/10
to ml-d...@googlegroups.com
Code is in focus.c, menu.c and gui.c.

Wrong position: just misses the focus position a little bit more :)
It's open loop focusing (no feedback). With focus distance, at least
it's closed loop, and you'll also be able to set the focus manually
(from the ring). Maybe add an option to toggle between the two modes?

The other problem is the user interface. I don't have a consistent way
to handle button presses, and zoom in/out are problematic. There are
two sets of button event codes, and some of them are shared between
more buttons. Here is my rough analysis:
http://magiclantern.wikia.com/wiki/GUI_Events/550D

So, if I start the camera, put it in LV mode, and the first thing I do
is rack focus, it works. I've assigned the star button (zoom out) to
adjust the focus. It also reacts to shutter half-press (due to event
code sharing). But (randomly) it starts to miss the key press events,
and instead do autofocus. At this point, stack focus does not work any
more. I have to reboot the camera.

jb

unread,
Dec 16, 2010, 8:00:48 AM12/16/10
to Magic Lantern firmware development
I assume it is possible to read the current focus distance from the
lens (at least with compatible lenses), that means that if it is also
possible to focus on a given distance, it is possible to change the ui
to work the following way:

Use the ring to manually set the "Near" focus, then in the menu a
press (with set button) on a "Set Near" entry would read the current
focus distance and memorize the value
The same could be done to set the "Far" focus (Use the ring, 'Set Far'
menu item , memorize the value)
Then use those two values for the rack...

This would solve the button issues..

On 16 déc, 13:00, Alex <broscutama...@gmail.com> wrote:
> Code is in focus.c, menu.c and gui.c.
>
> Wrong position: just misses the focus position a little bit more :)
> It's open loop focusing (no feedback). With focus distance, at least
> it's closed loop, and you'll also be able to set the focus manually
> (from the ring). Maybe add an option to toggle between the two modes?
>
> The other problem is the user interface. I don't have a consistent way
> to handle button presses, and zoom in/out are problematic. There are
> two sets of button event codes, and some of them are shared between
> more buttons. Here is my rough analysis:http://magiclantern.wikia.com/wiki/GUI_Events/550D
>
> So, if I start the camera, put it in LV mode, and the first thing I do
> is rack focus, it works. I've assigned the star button (zoom out) to
> adjust the focus. It also reacts to shutter half-press (due to event
> code sharing). But (randomly) it starts to miss the key press events,
> and instead do autofocus. At this point, stack focus does not work any
> more. I have to reboot the camera.
>

Alex

unread,
Dec 16, 2010, 8:05:28 AM12/16/10
to ml-d...@googlegroups.com
Yap, that's a very good idea. Thanks.

Morgan Look

unread,
Dec 16, 2010, 3:35:38 PM12/16/10
to ml-d...@googlegroups.com
It may be that you must focus the lens electronically to get the set
points for focus racking. Has someone tested if it still counts focus
steps when the lens is in MF mode?*

Also what might be worth testing is fist telling the lens to focus to
the closest possible focus distance, and use this as a zero reference
before setting the near and far points.
Then return to zero and back out to whichever point you want to start at
before filming.


I have completely disassembled (and successfully reassembled
_eventually_) a Canon (70-300mm f/4-5.6 II non-USM) so I am familiar
with the inner workings of this lens. I'm not sure if it's typical of
other canon lenses, but this is what I know.

There is a "pager" motor to drive the auto focus, this has a gearbox and
optical encoder, which I would assume correlates to the "focus steps"
in the camera.

From memory, I believe the manual focus switch will disengage the
gearbox, and therefore the optical encoder will no longer count steps.
This is why I think it may not be possible to use the MF ring to set
your focus points (unless you have an expensive FTM lens).
I can open the back of the lens again and confirm this over the weekend.

There is some very course focus and zoom information being measured
mechanically in the lens, but these are about 3 bits for the focus, and
5 bits for the zoom. So by no means accurate enough for repeatable
focus measurements. I don't know how much of this gets back to the
camera, I do know that the Zoom setting encoder is used to set the
aperture as it varies with zoom.

P.S. if anyone else is interested in what goes on inside Canon lenses
these two websites are pretty interesting.
http://micro-tools.net/8.html
http://www.clubsnap.com/forums/showthread.php?t=472483

*interestingly, if it does keep counting, you could potentially
implement a manual focus pulling assistant overlay on the LCD.
With a scale showing how far you have left to move the focus, and a
confirmation when you get there.

Alex

unread,
Dec 16, 2010, 4:15:57 PM12/16/10
to ml-d...@googlegroups.com
I've solved it by disabling the acceleration on manual focusing, and
setting the same speed during the rack. Therefore, the (perturbed)
measurements are taken with the same perturbation as when running the
rack focus.

Result: PERFECT with the 50/1.8! (at least no error noticeable without
zooming in).

If the absolute distance is not accurate enough, it will remain as it's now.

Also implemented trap focus (that one was pretty easy once I've found
the focus confirmation address).

Morgan Look

unread,
Dec 16, 2010, 4:28:01 PM12/16/10
to ml-d...@googlegroups.com
I also wondered if it might not be possible to define which areas of the
frame you wish to be in focus at each end of the rack.

If you could define two x,y points / boxes. Then an auto-focus routine
might be able to kick in to give critical focus.

Alex

unread,
Dec 16, 2010, 5:40:33 PM12/16/10
to ml-d...@googlegroups.com
We don't know how to call AF routine, but I have some experiment with
my own algorithms:
http://magiclantern.wikia.com/wiki/Remote_control_with_PTP_and_Python

If implemented on a (very) small area from LiveView image, they should
be fast enough for this. My algorithm needs to detect a peak and stop
when the focus evaluation function falls under, say, 90% of the peak
value. So it will always go a bit too much.

If you can find a function which is 1 when perfectly in focus, and
lower when it's not, then the algorithm will be able to stop when the
selected area is perfectly focused.

Here's a test build for rack focus & trap focus. If all works well, I
think we are ready for the new release.

magiclantern-2010dec16.550d.fw109.PRERELEASE.a1ex.zip

Alex

unread,
Dec 17, 2010, 6:49:42 AM12/17/10
to Magic Lantern firmware development
Just noticed that you can change QScale on the fly (while recording
video) and it has effect!

Now, can anyone think at some control algorithm which tries to keep
bitrate as high as possible, while preventing buffer overflow?

Buffer overflow can be detected by reading a few pixels from the VRAM,
so it's fast. Maybe it's a more elegant way to do this, but I'm not
aware of it.


On Dec 17, 12:40 am, Alex <broscutama...@gmail.com> wrote:
> We don't know how to call AF routine, but I have some experiment with
> my own algorithms:http://magiclantern.wikia.com/wiki/Remote_control_with_PTP_and_Python
>
> If implemented on a (very) small area from LiveView image, they should
> be fast enough for this. My algorithm needs to detect a peak and stop
> when the focus evaluation function falls under, say, 90% of the peak
> value. So it will always go a bit too much.
>
> If you can find a function which is 1 when perfectly in focus, and
> lower when it's not, then the algorithm will be able to stop when the
> selected area is perfectly focused.
>
> Here's a test build for rack focus & trap focus. If all works well, I
> think we are ready for the new release.
>
> On Thu, Dec 16, 2010 at 11:28 PM, Morgan Look <morgan.l...@gmail.com> wrote:
> > I also wondered if it might not be possible to define which areas of the
> > frame you wish to be in focus at each end of the rack.
>
> > If you could define two x,y points / boxes. Then an auto-focus routine might
> > be able to kick in to give critical focus.
>
> > On 17/12/2010 10:15 a.m., Alex wrote:
>
> >> I've solved it by disabling the acceleration on manual focusing, and
> >> setting the same speed during the rack. Therefore, the (perturbed)
> >> measurements are taken with the same perturbation as when running the
> >> rack focus.
>
> >> Result: PERFECT with the 50/1.8! (at least no error noticeable without
> >> zooming in).
>
> >> If the absolute distance is not accurate enough, it will remain as it's
> >> now.
>
> >> Also implemented trap focus (that one was pretty easy once I've found
> >> the focus confirmation address).
>
> > --
> >http://magiclantern.wikia.com/
>
> > To post to this group, send email to ml-d...@googlegroups.com
> > To unsubscribe from this group, send email to
> > ml-devel+u...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/ml-devel?hl=en
>
>
>
>  magiclantern-2010dec16.550d.fw109.PRERELEASE.a1ex.zip
> 808KViewDownload

Ramt

unread,
Dec 17, 2010, 7:21:54 AM12/17/10
to ml-d...@googlegroups.com
you guys are doing such a great work here! I'd like to thank you representing me and all students waiting for release.

I have 1.0.9 . please feel free to contact me if you need any specific tests you want me to do. (ram...@gmail.com)

Does anybody know any sdhc to sata adapter (like eyefi sd2wifi)? I think it might help us with overflows. 

one feature that could really help is having auto recording after the 4gb fat32 limit without loosing data (like in panasonic bigger cams in which your video is splitted into 4gb files but you can "paste" them in post.) 

also I want to ask if anybody is interested in starting some hacking project on goPro HD camera which is also a great camera for the poor indy :-)

Ramtin 
Sent from my iPhone.

cacasodo

unread,
Dec 17, 2010, 11:21:32 AM12/17/10
to Magic Lantern firmware development
> Now you can do speed/quality tests like on 5D2. You can also record 30
> minutes of FullHD in 4 GB at lower quality, or even use slower SD
> cards (less than class 6)!
>

This is fabulous Alex! Will test this weekend to see how much
degradation I get.
'sodo
Reply all
Reply to author
Forward
0 new messages