Manual focus in video mode - CHDK Releases - CHDK Forum  

Manual focus in video mode

  • 11 Replies
  • 7192 Views
*

Offline a710is

  • ****
  • 250
  • A710 IS
Manual focus in video mode
« on: 18 / January / 2008, 15:39:50 »
Advertisements
this feature seems to have appeared but which builds have it?

*

Offline a710is

  • ****
  • 250
  • A710 IS
Re: Manual focus in video mode
« Reply #1 on: 26 / January / 2008, 06:55:16 »
so I'm asking again. is manual focus in video mode supported in any builds?

Re: Manual focus in video mode
« Reply #2 on: 26 / January / 2008, 10:24:59 »
Deleted
« Last Edit: 22 / April / 2008, 10:14:12 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

*

Offline a710is

  • ****
  • 250
  • A710 IS
Re: Manual focus in video mode
« Reply #3 on: 26 / January / 2008, 12:08:51 »
ewavr is said to have added it in the build which would be better

http://chdk.setepontos.com/index.php/topic,323.msg2270.html#msg2270

But I'm still hoping that it's possible to change sound format in video mode to 16 bit 22 kHz or something like that, now when I can use optical zoom and manual focus with Ewavr's latest builds

http://chdk.setepontos.com/index.php/topic,318.msg2110.html#msg2110

Tryed Zoom-Video on Allbest build with my A620 and it doesn't work correctly. My findings:

- set_zoom_rel command doesn't refocurs while zooming in video mode, while it does in Ewavr's build.
  So after zooming in or out, video is not in focus anymore
- I added some set_focus commands, associated with keys up and down, to enable manual focusing in video mode.
  They work on Ewavr's build, but on Allbest build, they don't work at all


maybe both a supporting build and a script are needed. I hope vit40 will reply to this topic, or I'll contact him. also hopefully Allbest will add support and maybe he or ewavr will post here as well.
I don't know about S3 but on the A710 manual focus change definitely doesn't work while filming, I can only set it before recording. Canon policy I guess.  :( .
« Last Edit: 26 / January / 2008, 12:19:40 by a710is »


*

Offline vit40

  • ****
  • 276
Re: Manual focus in video mode
« Reply #4 on: 29 / January / 2008, 04:56:06 »
I'm using Ewavr's build and my script, which is development of Zoom-Video script, so I can use zoom and manual focus. It doesn't work with allbest build at the moment, as I described. Allbest said he will check his build to trace the problem

*

Offline kamil

  • *
  • 21
  • G7
Re: Manual focus in video mode
« Reply #5 on: 11 / February / 2008, 21:43:23 »
I wrote script with MF & video, it's working with Allbest fine.
http://chdk.setepontos.com/index.php/topic,417.0.html

Remember that small focus is impossible with big zoom so camera lost any small focus while zooming.

*

Offline a710is

  • ****
  • 250
  • A710 IS
Re: Manual focus in video mode
« Reply #6 on: 12 / February / 2008, 04:46:38 »
It's great :D
it works flawlessly
is it possible to change the script so that when you keep a focus buttons pressed, it changes focus at short (defineable) intervals so that it at least appears to change from small focus to big focus more smoothly?
cause now it wether changes focus almost instantly or you have to keep pressing those up/down buttons which also shakes the camera.
also, having the camera start recording at a certain focus position
and macro style focus doesn't seem to work

anyway, great job :)
« Last Edit: 12 / February / 2008, 04:54:08 by a710is »

*

Offline a710is

  • ****
  • 250
  • A710 IS
Re: Manual focus in video mode
« Reply #7 on: 12 / February / 2008, 05:33:33 »
I don't have a exp_corr button so I have customized the script for a710 to allow using the second auto focus setting instead of a zoom step button (left)
so in this version the left button focuses to a custom position instead of setting a custom zoom step.
the help may contain errors, I was kind of superficial :)
the a710 zoom has one more step but I've left it like that cause I don't like the way the lens stop when they get to 6x zoom so I've let it only go to 5.3 when pressing the right button

Code: [Select]
rem Author kamil, script ver. 2.0 (customized by someone else), allbuild, works on a710is,...
@title zoom and focus in video
@param a auto focus /erase/
@default a 11
@param b auto focus /left/
@default b 1
@param d step zoom /set/ - at start
@default d 3
@param e step zoom /right/
@default e 13
@param f auto zoom /display/
@default f 1
@param g auto focus /display/
@default g 2
@param h auto zoom /menu/
@default h 11
@param i auto focus /menu/
@default i 10
@param j help (1-on)

if j=1 then gosub "help"

get_prop 12 q
if q=0 then set_prop 12 1

z=d

rem zoom range, change this value if your zoom is different
k=13

get_focus u
o=0

do
o=o+1
p=o*o*(o+1)*(o+1)+90
until u<p

v=o

press "shoot_half"
sleep 800
click "shoot_full"
print "HALF SHOOT - stop record"
:loop
wait_click
if is_key "zoom_in" then goto "in"
if is_key "zoom_out" then goto "out"
if is_key "up" then goto "add_focus"
if is_key "down" then goto "min_focus"
if is_key "left" then goto "focus_2"
if is_key "set" then z=d
if is_key "right" then z=e
if is_key "erase" then goto "focus_1"
if is_key "display" then goto "zoom_focus_1"
if is_key "menu" then goto "zoom_focus_2"
if is_key "shoot_half" then goto "end"
goto "loop"

:in
if z<0 then let z=1
if z>k then let z=k
set_zoom_rel z
get_zoom t
print "zoom", t; "/" k
goto "loop"

:out
if z<0 then let z=1
if z>k then let z=k
set_zoom_rel -z
get_zoom t
print "zoom", t; "/" k
goto "loop"

:focus_1
v=a
gosub "focus_dance"
goto "loop"

:focus_2
v=b
gosub "focus_dance"
goto "loop"

:zoom_focus_1
if g>0 then gosub "focus_zoom_focus_1"
if f>0 then gosub "zoom_zoom_focus_1"
if g>0 then gosub "focus_zoom_focus_1"
goto "loop"

:focus_zoom_focus_1
v=g
gosub "focus_dance"
return

:zoom_zoom_focus_1
set_zoom f
print "zoom", f; "/" k
return

:zoom_focus_2
if i>0 then gosub "focus_zoom_focus_2"
if h>0 then gosub "zoom_zoom_focus_2"
if g>0 then gosub "focus_zoom_focus_2"
goto "loop"

:focus_zoom_focus_2
v=i
gosub "focus_dance"
return

:zoom_zoom_focus_2
set_zoom h
print "zoom", h; "/" k
return

:add_focus
v=v+1
gosub "focus_dance"
goto "loop"

:min_focus
v=v-1
gosub "focus_dance"
goto "loop"

:focus_dance
u=(v*v*v*v)+90
if v>=11 then u=65535
if v<1 then let v=1
if v>11 then let v=11
set_focus u
get_focus t
print "focus", v; "/11 ("t; " mm)"
return

:end
click "shoot_full"
end

end

:help
print "Use with CAUTION"
print "working on A710is"
print "maybe others too"
print "or you need modify this"
print " - [ click ANY KEY ] - "
wait_click
print "script. Zoom and focus"
print "values could be different"
print "lines to modify:"
print "31,132,133"
print " - [ click ANY KEY ] - "
wait_click
print "keys:"
print "UP/DOWN - focusing"
print "ZOOM IN/ZOOM OUT -zooming"
print "SET/RIGHT - zoom set"
print " - [ click ANY KEY ] - "
wait_click
print "LEFT/ERASE - focus set"
print "DISPL/MENU - zoom & focus"
print "You can disable focus"
print "or zoom setting by enter"
print " - [ click ANY KEY ] - "
wait_click
print "0 parameter"
print "focus has 11 steps"
print "zoom has 15 steps"
print "Use DISPLAY & MENU"
print " - [ click ANY KEY ] - "
wait_click
print "for best & fast results."
print "Press SHOOT HALF"
print "to stop recording"
print "Because of zoom and"
print " - [ click ANY KEY ] - "
wait_click
print "focusing noises"
print "i suggest record the"
print "sound with another"
print "recorder and join with"
print " - [ click ANY KEY ] - "
wait_click
print "nandub for example"
print "enter 0 in help param"
print "and play the game :)"
print " - [ click ANY KEY ] - "
wait_click
cls
return
« Last Edit: 12 / February / 2008, 05:39:08 by a710is »


*

Offline kamil

  • *
  • 21
  • G7
Re: Manual focus in video mode
« Reply #8 on: 19 / February / 2008, 11:59:04 »
is it possible to change the script so that when you keep a focus buttons pressed, it changes focus at short (defineable) intervals so that it at least appears to change from small focus to big focus more smoothly?

Good idea. It is possible i think. I will work on it :)

[add day after:]
No, its impossible to make it so nice as we want. CHDK inform only about key pressed, not key release. You can put key_release but You cant get it.

Quote
also, having the camera start recording at a certain focus position and macro style focus doesn't seem to work

Before recording get AF with half pressed shot button and then press Manual Focus.

Here you can find another script for video. There is nice idea of using half shot button.
http://chdk.wikia.com/wiki/UBASIC/Scripts:_Easy_Zoom_%26_MF_while_Video_Recording

Thanks for Your applause  :) it's nice to know that my work is needful. I'm glad that i can help.
« Last Edit: 20 / February / 2008, 05:29:43 by kamil »

*

Offline kamil

  • *
  • 21
  • G7
Re: Manual focus in video mode
« Reply #9 on: 21 / February / 2008, 08:39:21 »
You dont must to change script to make display and menu keys only for focusing. The idea of this script is to make it most configurable by parameters. So if you enter "0" in "auto zoom /display/" parameter then auto zoom is off and "display" works like a "erase" key (only to set a focus). If You set "0" in "auto focus /display/" then display works only for auto zoom. It's written in help but very laconicall.

BTW i correct some features and there is 2.5 version :)
- there was na error in focusing by "menu" button
- nice visualisation of important parameters

In the future i must think about half shoot button. Maybe it will be good idea to give up stop recording. You can always stop record by escape from script and press shoot. But it generate noise and shock :/ . Maybe another focus step (not only +/- 1) will be good idea?

 

Related Topics