CHDK Wiki
No edit summary
Jocewang (talk | contribs)
No edit summary
 
(13 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
<!-- Please put your content under this line. Be sure to sign your edits with four tildes: ~~~~ -->
 
<!-- Please put your content under this line. Be sure to sign your edits with four tildes: ~~~~ -->
 
I have difficulity in make good use of the CHDK in my S2 IS camera. Two very useful functions are not working well: 1. when I update the CHDK to pre14.grand148.md.cln.zsm-s2is-100f-119 or 120, I cannot use video recoder (it will hang my camera), but pre14-s2is-100f-148 did work. 2. when it is in "alt" mold (try to run a script). I am writing a script try to get the exposure information in the Av mold by: [press "shoot_half"] [sleep 3000] [get_tv f] but always get the f value to 15 with different light condition. Anyone out here using S2 IS GM1.00F and working?
 
I have difficulity in make good use of the CHDK in my S2 IS camera. Two very useful functions are not working well: 1. when I update the CHDK to pre14.grand148.md.cln.zsm-s2is-100f-119 or 120, I cannot use video recoder (it will hang my camera), but pre14-s2is-100f-148 did work. 2. when it is in "alt" mold (try to run a script). I am writing a script try to get the exposure information in the Av mold by: [press "shoot_half"] [sleep 3000] [get_tv f] but always get the f value to 15 with different light condition. Anyone out here using S2 IS GM1.00F and working?
  +
  +
here is the script I wrote to bracketing a set of pictures when light changed.
  +
  +
<pre>
  +
rem Light Change Capture (from dark to bright)
  +
  +
@title Light Change Capture (Av Mode)
  +
@param a Number of Pics
  +
@default a 8
  +
@param b exposure time differnce (in step)
  +
@default b 1
  +
@param c time wait for shoot half
  +
@default c 1 (0.1s)
  +
  +
if a<1 then let a=1
  +
if b<1 then let b=1
  +
c=c*100
  +
  +
print "Pics:"; a; " Step:"; b
  +
  +
click "shoot_half"
  +
sleep c
  +
get_tv e
  +
print "preset tv=";e
  +
  +
for s=1 to a
  +
  +
if s<a then gosub "cec"
  +
if (f-b)>=e then gosub "cap" else s=s-1
  +
  +
next s
  +
  +
end
  +
  +
rem check exposure change
  +
:cec
  +
click "shoot_half"
  +
sleep c
  +
get_tv f
  +
print "p=";e;" n=";f
  +
if f<e then e=f
  +
return
  +
  +
rem capture one image
  +
:cap
  +
shoot
  +
print "Pics:"; s;"/";a
  +
e=f
  +
return
  +
  +
</pre>
  +
  +
- You can test this version [http://ewavr.nm.ru/hdk/for_test/ewavr-s2is-100f-150.zip http://ewavr.nm.ru/hdk/for_test/ewavr-s2is-100f-150.zip]. If video recording does not work, I shall make some more test versions. -[[User:Ewavr|Ewavr]] 11:22, 21 November 2007 (UTC)
  +
  +
- I am sorry to tell that this ewavr-s2is-100f-150.zip version still cannot work out in video in my S2 IS as well as the script command "get_tv" does not return me the exposure information...
  +
[[User:Jocewang|Jocewang]] 13:24, 21 November 2007 (UTC)
  +
  +
- I have found a bug in my code for video recording. You can try corrected version: [http://www.ewavr.nm.ru/hdk/for_test/ewavr-s2is-100f-151.zip http://www.ewavr.nm.ru/hdk/for_test/ewavr-s2is-100f-151.zip]. [[User:Ewavr|Ewavr]] 17:35, 21 November 2007 (UTC)
  +
  +
- Thank you so much!!! The video works great! I can adjust any bitrate I like and get a good video now. Not only for that, the file size already over the 1G on my 2G SD card!!! Thank you again for your hard work to make us enjoy stick by this old canon camera!
  +
[[User:Jocewang|Jocewang]] 04:09, 22 November 2007 (UTC)
  +
  +
- AGAIN, any one know how to do with the "get_tv" function in script?
  +
[[User:Jocewang|Jocewang]] 04:10, 22 November 2007 (UTC)
  +
- I just found that the get_tv is the function to get the value in M mode telling the value you set to rather than the exposure condition respond from the camera. There is a function "get_prop" and the propid of the Coming Tv is 69. I tested the function like [get_prop 69 e] but this scrip function will hang my S2 IS. [[User:Jocewang|Jocewang]] 06:01, 22 November 2007 (UTC)
  +
  +
'''solved and looking for...'''
  +
  +
I have download pre14.grand148.md.cln.zsm-s2is-100f-121.zip from Fingalo's Builds and the script command "get_prop" does work. I have rewrite my script of light change capture to:
  +
<pre>
  +
rem Light Change Capture (from dark to bright)
  +
  +
@title Light Change Capture (Av Mode)
  +
@param a Number of Pics
  +
@default a 8
  +
@param b exposure time differnce (in step)
  +
@default b 30
  +
@param c time wait for shoot half
  +
@default c 10 (0.1s)
  +
  +
if a<1 then let a=1
  +
if b<1 then let b=1
  +
c=c*100
  +
  +
print "Pics:"; a; " Step:"; b
  +
  +
press "shoot_half"
  +
sleep c
  +
get_prop 69 e
  +
release "shoot_half"
  +
print "preset tv=";e
  +
  +
for s=1 to a
  +
if s<a then gosub "cec"
  +
if (f-b)>=e then gosub "cap" else s=s-1
  +
next s
  +
  +
end
  +
  +
rem check exposure change
  +
:cec
  +
press "shoot_half"
  +
sleep c
  +
get_prop 69 f
  +
release "shoot_half"
  +
print "p=";e;" n=";f
  +
if f<e then e=f
  +
return
  +
  +
rem capture one image
  +
:cap
  +
shoot
  +
print "Pics:"; s;"/";a
  +
e=f
  +
return
  +
</pre>
  +
But this version still got video capture problem. Looks like I have to wait for a new version combines the script from Fingalo's Builds and video from Ewavr.[[User:Jocewang|Jocewang]] 15:55, 22 November 2007 (UTC)
  +
  +
----
  +
I am so much enjoy using this S2 Is camera. By you guys' hard work and fast update your program here. I download Fingalo's Builds today v122 and '''every thing works great!''' I cannot believe that the respond is so fast. [[User:Jocewang|Jocewang]] 02:43, 23 November 2007 (UTC)

Latest revision as of 02:43, 23 November 2007

Forums: Index > Help desk > S2 IS for video and scripts problem



I have difficulity in make good use of the CHDK in my S2 IS camera. Two very useful functions are not working well: 1. when I update the CHDK to pre14.grand148.md.cln.zsm-s2is-100f-119 or 120, I cannot use video recoder (it will hang my camera), but pre14-s2is-100f-148 did work. 2. when it is in "alt" mold (try to run a script). I am writing a script try to get the exposure information in the Av mold by: [press "shoot_half"] [sleep 3000] [get_tv f] but always get the f value to 15 with different light condition. Anyone out here using S2 IS GM1.00F and working?

here is the script I wrote to bracketing a set of pictures when light changed.

rem Light Change Capture (from dark to bright)

@title Light Change Capture (Av Mode)
@param a Number of Pics
@default a 8
@param b exposure time differnce (in step)
@default b 1
@param c time wait for shoot half
@default c 1 (0.1s)

if a<1 then let a=1
if b<1 then let b=1
c=c*100

print "Pics:"; a; " Step:"; b

click "shoot_half" 
sleep c
get_tv e
print "preset tv=";e

for s=1 to a

   if s<a then gosub "cec" 
   if (f-b)>=e then gosub "cap" else s=s-1  

next s

end

rem check exposure change
:cec
   click "shoot_half"
   sleep c
   get_tv f
   print "p=";e;"  n=";f
   if f<e then e=f
return

rem capture one image
:cap
   shoot
   print "Pics:"; s;"/";a
   e=f
return

- You can test this version http://ewavr.nm.ru/hdk/for_test/ewavr-s2is-100f-150.zip. If video recording does not work, I shall make some more test versions. -Ewavr 11:22, 21 November 2007 (UTC)

- I am sorry to tell that this ewavr-s2is-100f-150.zip version still cannot work out in video in my S2 IS as well as the script command "get_tv" does not return me the exposure information... Jocewang 13:24, 21 November 2007 (UTC)

- I have found a bug in my code for video recording. You can try corrected version: http://www.ewavr.nm.ru/hdk/for_test/ewavr-s2is-100f-151.zip. Ewavr 17:35, 21 November 2007 (UTC)

- Thank you so much!!! The video works great! I can adjust any bitrate I like and get a good video now. Not only for that, the file size already over the 1G on my 2G SD card!!! Thank you again for your hard work to make us enjoy stick by this old canon camera! Jocewang 04:09, 22 November 2007 (UTC)

- AGAIN, any one know how to do with the "get_tv" function in script? Jocewang 04:10, 22 November 2007 (UTC) - I just found that the get_tv is the function to get the value in M mode telling the value you set to rather than the exposure condition respond from the camera. There is a function "get_prop" and the propid of the Coming Tv is 69. I tested the function like [get_prop 69 e] but this scrip function will hang my S2 IS. Jocewang 06:01, 22 November 2007 (UTC)

solved and looking for...

I have download pre14.grand148.md.cln.zsm-s2is-100f-121.zip from Fingalo's Builds and the script command "get_prop" does work. I have rewrite my script of light change capture to:

rem Light Change Capture (from dark to bright)

@title Light Change Capture (Av Mode)
@param a Number of Pics
@default a 8
@param b exposure time differnce (in step)
@default b 30
@param c time wait for shoot half
@default c 10 (0.1s)

if a<1 then let a=1
if b<1 then let b=1
c=c*100

print "Pics:"; a; " Step:"; b

press "shoot_half" 
sleep c
get_prop 69 e
release "shoot_half"
print "preset tv=";e

for s=1 to a
   if s<a then gosub "cec" 
   if (f-b)>=e then gosub "cap" else s=s-1  
next s

end

rem check exposure change
:cec
   press "shoot_half"
   sleep c
   get_prop 69 f
   release "shoot_half"
   print "p=";e;"  n=";f
   if f<e then e=f
return

rem capture one image
:cap
   shoot
   print "Pics:"; s;"/";a
   e=f
return

But this version still got video capture problem. Looks like I have to wait for a new version combines the script from Fingalo's Builds and video from Ewavr.Jocewang 15:55, 22 November 2007 (UTC)


I am so much enjoy using this S2 Is camera. By you guys' hard work and fast update your program here. I download Fingalo's Builds today v122 and every thing works great! I cannot believe that the respond is so fast. Jocewang 02:43, 23 November 2007 (UTC)