Pages: Prev 1 [2] 3 4 ... 10 Next   Go Down
  Print  
Author Topic: Fast MD with burst/preview mode  (Read 30061 times)
0 Members and 1 Guest are viewing this topic.
fudgey
Global Moderator
Hero Member
*****

Karma: +74/-1
Offline Offline

Posts: 842

a570is


« Reply #15 on: 13 / April / 2008, 15:42:56 »

Maybe after they finally put in the display off/on or backlight off/on/intensity uBASIC commands so you can put in the much needed "energy savings" mode toggle. Smiley

Yep, and I've understood there's some hope for getting those commands some day too Smiley

Quote
I tried it just now using the display-off button but it appears that MD routine doesn't work with the camera's own display-off feature. Sad

Yes, that's because the camera stops updating the viewfinder image when you turn the display off. But you can use the AV-cable method to disable the LCD while still allowing MD to work.

Logged
carlos
Jr. Member
**

Karma: +2/-0
Offline Offline

Posts: 61

A640


« Reply #16 on: 13 / April / 2008, 17:36:05 »

Quote fudgey; " ......... use the AV-cable method to disable the LCD while still allowing MD to work."

A convenient alternative to the larger AV plug or adapter ... hard plastic + 15 minutes cut, scrape, file, sand and drill.

(Picture was here - vanished due my error!)

carlos

Edit: Sorry about the dropped picture! Here it is again:




« Last Edit: 13 / April / 2008, 19:24:51 by carlos » Logged
Jucifer
Global Moderator
Full Member
*****

Karma: +42/-0
Offline Offline

Posts: 224


[A710IS]


« Reply #17 on: 13 / April / 2008, 17:49:55 »

Or you can just take a shoelace and stick one end to the jack. :]
(Some laces work better than others.)
Logged

PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1818


Coders Humiliate DSLR Kiddies


« Reply #18 on: 13 / April / 2008, 18:03:44 »


Quote fudgey; " ......... use the AV-cable method to disable the LCD while still allowing MD to work."

A convenient alternative to the larger AV plug or adapter ... hard plastic + 15 minutes cut, scrape, file, sand and drill.

 

carlos


somehow the picture doesnt load, except when i take that url and load it directly in browser.
but why do you think av plug is large?
takes an old headphone and a knife/scissors and about 1 minute work. Big Grin
Logged

carlos
Jr. Member
**

Karma: +2/-0
Offline Offline

Posts: 61

A640


« Reply #19 on: 13 / April / 2008, 19:33:59 »

PhyrePhox,

" ..... why do you think av plug is large?"

Didn't say large, I said larger.  Tongue

I needed the head of the plug to project as little as possible and didn't want to work metal. I will reduce the head of this plug even more, as it still gets in my way. (Hand-held shooting.) Previously was using regular plug - OK for tripod.

Sorry about the picture loss! It's back - see above.

Best,

carlos 
« Last Edit: 13 / April / 2008, 21:06:46 by carlos » Logged
Barney Fife
Hero Member
*****

Karma: +70/-225
Offline Offline

Posts: 1159



« Reply #20 on: 13 / April / 2008, 22:52:10 »

Deleted
« Last Edit: 22 / April / 2008, 15:50:29 by Barney Fife » Logged

[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
fudgey
Global Moderator
Hero Member
*****

Karma: +74/-1
Offline Offline

Posts: 842

a570is


« Reply #21 on: 14 / April / 2008, 22:06:09 »

Oh well, here's a development update MDFB-080414-DigicIII.bas. This one adds a video clip record mode, but it's probably not useful to you (at least not yet)... read on:

As you can see from the script comments, this one is only an improvement to 080411 if you are running a build which has the "dm_movie" virtual button, which changes the dialmode to video mode. AFAIK this currently means only the A570IS using the build referred to here: http://chdk.setepontos.com/index.php/topic,488.msg7446.html#msg7446. Consequently I didn't bother posting a Digic II version since I figured anyone who's capable enough to add dm_movie work for a Digic II camera is capable of changing those get_prop's  Grin.

Oh and there are a ton of sleep commands down there in the video record loop, I didn't even try to cut them down yet, just kept adding them everywhere until it finally worked. Smiley

Code:
rem Fudgey's Fast/Slow/Video Motion Detector with masks.
rem Requires a build with "dm_movie" included.
rem (At the time of writing only a570is KAP test build has this feature).
rem
rem Changes to MDFB 080411:
rem Burst/Review time is now burst/review/video time.
rem In video mode it specifies how long in seconds to film.
rem
rem Fast/Slow mode is now fast/slow/video mode. Video mode is
rem never fast, mode change takes some time. To optimize it try decresing
rem sleep times in video_md_loop to whatever minimum values your camera
rem allows. The most important one is after the line 'press "dm_movie"'
rem because that delay is waited between detection and start of record.
rem
rem If you set video time 0 s, about 1 second of video will be shot.
rem
rem Shortened the title a bit.
rem
rem Developed on A570IS by fudgey. May work on all Digic III cameras.
rem Allbest build 34 or higher (or compatible md_detect_motion) is required for
rem fast/slow MD modes, a build with dm_movie is required for video mode.
rem Digic II needs a small modification: "get_prop 206 p" -> "get_prop 205 p"
@title Fast MD 080414
@param a Columns
@default a 6
@param b Rows
@default b 4
@param c Threshold (0-255)
@default c 10
@param g Burst/Review/Video time (s)
@default g 0
@param d Compare Interval (ms)
@default d 7
@param h Pixel Step (pixels)
@default h 6
@param f Channel (0U,1Y,2V,3R,4G,5B)
@default f 1
@param n Timeout (10s of seconds)
@default n 30
@param e Trigger Delay (0.1 sec)
@default e 5
@param i Masking (0=No 1=Mask 2=Use)
@default i 0
@param j Mask Columns Left
@default j 0
@param k Mask Columns Right
@default k 0
@param l Mask Rows Top
@default l 0
@param m Mask Rows Bottom
@default m 0
@param o Shoot fast=0 slow=1 video=2
@default o 0
if a<1 then a=1
if b<1 then b=1
if i<0 then i=0
if i>2 then i=2
if j<0 then j=0
if k<0 then k=0
if l<0 then l=0
if m<0 then m=0
if j>a then j=a
if k>a then k=a
if l>b then l=b
if m>b then m=b
if g<0 then g=0
if f<0 then f=1
if f>5 then f=1
if f=0 then print "Channel: U chroma"
if f=1 then print "Channel: Luminance"
if f=2 then print "Channel: V chroma"
if f=3 then print "Channel: Red"
if f=4 then print "Channel: Green"
if f=5 then print "Channel: Blue"
if n<1 then n=1
e=e*100
g=g*1000
n=n*10000
if o=1 then goto "slow_md"
if o=2 then goto "video_md"

print "Fast shoot mode"
:fast_md_loop
  press "shoot_half"
  t=0
  do
    do
      get_prop 206 p
    until p=1
    md_detect_motion a, b, f, n, d, c, 1, t, i, j+1, l+1, a-k, b-m, 9, h, e
  until t>0
  let X=get_tick_count
  :contloop1
    let U=get_tick_count
    let V=(U-X)
    if V<g then goto "contloop1"
  release "shoot_full" 
  do
    get_prop 206 p
  until p<>1
goto "fast_md_loop"

:slow_md
print "Slow shoot mode"
:slow_md_loop
  t=0
  do
    md_detect_motion a, b, f, n, d, c, 1, t, i, j+1, l+1, a-k, b-m, 0, h, e
  until t>0
  if g>1 then goto "contshoot2" else shoot
  goto "slow_md_loop"
  :contshoot2
  press "shoot_full"
  let X=get_tick_count
  :contloop2
    let U=get_tick_count
    let V=(U-X)
    if V<g then goto "contloop2"
  release "shoot_full" 
  do
    get_prop 206 p
  until p<>1
goto "slow_md_loop"

:video_md
if g<1 then g=1
print "Video clip mode"
:video_md_loop
  do
    md_detect_motion a, b, f, n, d, c, 1, t, i, j+1, l+1, a-k, b-m, 0, h, e
  until t>0
  press "dm_movie"
  sleep 1000
  press "shoot_full"
  print "starting video record"
  sleep 300
  release "shoot_full"
  let X=get_tick_count
  :videowaitloop
    let U=get_tick_count
    let V=(U-X)
    if V<g then goto "videowaitloop"
  press "shoot_full"
  print "ending video record"
  sleep 300
  release "shoot_full"
  sleep 1000
  release "dm_movie"
  sleep 1000
  do
    get_prop 206 p
  until p<>1
goto "video_md_loop"
Logged
Barney Fife
Hero Member
*****

Karma: +70/-225
Offline Offline

Posts: 1159



« Reply #22 on: 14 / April / 2008, 23:09:23 »

Deleted
« Last Edit: 22 / April / 2008, 15:50:53 by Barney Fife » Logged

[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
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1818


Coders Humiliate DSLR Kiddies


« Reply #23 on: 14 / April / 2008, 23:18:17 »

Quote
as the camera needs processing time to close a video file
in future builds this can be found out via ubasic, i guess i will add it. as in my recent dev thread we now have a way to find out status of video recording. you can ask the status of that special variable and you can directly see: video in progress? video stopped? video stopped but not finished writing to card?
sorry for offtopic, just wanted to tell barney.
Logged

Barney Fife
Hero Member
*****

Karma: +70/-225
Offline Offline

Posts: 1159



« Reply #24 on: 14 / April / 2008, 23:35:35 »

Deleted
« Last Edit: 22 / April / 2008, 15:51:13 by Barney Fife » Logged

[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
fudgey
Global Moderator
Hero Member
*****

Karma: +74/-1
Offline Offline

Posts: 842

a570is


« Reply #25 on: 22 / April / 2008, 20:13:11 »

Quote
as the camera needs processing time to close a video file
in future builds this can be found out via ubasic, i guess i will add it. as in my recent dev thread we now have a way to find out status of video recording. you can ask the status of that special variable and you can directly see: video in progress? video stopped? video stopped but not finished writing to card?
sorry for offtopic, just wanted to tell barney.

That would be really good. I actually have a new version of this script in my camera (haven't tested it through enough quite yet but I'll post it eventually), I ditched the dialmode change and did video mode the "regular" way instead. It now has a slow and fast acting video mode (just like the still modes, with focus either right before shoot or at startup/timeout/restart).

It has two awkward problems, one is the need for delays in video mode (which you say will be solved) and the other one is the lack of a portable way to find if we're in video mode i.e. the user must first set the camera to video mode and then also select video mode from script settings (or if the propcase and it's value at video mode are same for all equal digic version cameras, someone tell me they are; that would be fairly ok since the 205/206 already requires separate versions for the two digic versions).

Actually there's a third thing I'm not quite sure about and that's how digic II and/or S/G series handle shoot_full. The a570is seems to autofocus on shoot_full (which was a problem in the MD speedup thread a couple of months back), which means that in the slow acting video MD mode I can exit the MD function and press shoot_full immediately and the camera will waste no more time than absolutely necessary for autofocus and autoexposure before starting to record video.

If the S3 and some other models work differently, they may shoot_half + sleep + shoot_full combo, where the length of sleep is unknown. Or does "shoot" work? Or is there a way to find if those camera models are done focusing/calculating exposure in video mode?
Logged
PhyrePhoX
Global Moderator
Hero Member
*****

Karma: +139/-37
Offline Offline

Posts: 1818


Coders Humiliate DSLR Kiddies


« Reply #26 on: 23 / April / 2008, 01:17:53 »

hm, dont know how s3is is focusing during/before recording video. will make a test someday.
in this post http://chdk.setepontos.com/index.php/topic,978.msg9804.html#msg9804 i built such a version that has a ubasic way of finding out status of movierecording. i may add a command to find out current mode dial position (prop 230 doesnt seem to work on my s3is?), as chdk does find that out (camera independent) i only need to include that "check" into ubasic.
Logged

fudgey
Global Moderator
Hero Member
*****

Karma: +74/-1
Offline Offline

Posts: 842

a570is


« Reply #27 on: 23 / April / 2008, 18:32:35 »

hm, dont know how s3is is focusing during/before recording video. will make a test someday.
in this post http://chdk.setepontos.com/index.php/topic,978.msg9804.html#msg9804 i built such a version that has a ubasic way of finding out status of movierecording. i may add a command to find out current mode dial position (prop 230 doesnt seem to work on my s3is?), as chdk does find that out (camera independent) i only need to include that "check" into ubasic.

Cool, the ability to check video status and mode dial position would help a bunch. Do you mean prop 236 or prop 0? (http://chdk.wikia.com/wiki/PropertyCase)

Btw, do we know a good way to check (from ubasic) if the script is running on digic II or III? Like some stupid useless propcase which is always 1 if power is on, but only on digic II  Tongue

Logged
fudgey
Global Moderator
Hero Member
*****

Karma: +74/-1
Offline Offline

Posts: 842

a570is


« Reply #28 on: 08 / May / 2008, 18:51:06 »

A few changes, most importantly added video modes (fast and slow action, just like the still modes). Should work on any camera (put camera in video mode, configure and start the script and the camera will shoot a video clip after it has detected motion), see the documentation .txt file, there's a changelog in the end.

Keep in mind that I have no way to test the Digic II version or any Digic III camera other than my a570is.

edit:The script version MDFB-080419 is attached to this message. If you can't see the attachment, you must log in. See further for a version whose video mode works on cameras with a separate movie button (S series and TX1). Also note that the IXUS850IS/SD800IS and G7 need the Digic II version.

edit 2: There is a more recent version here: http://chdk.setepontos.com/index.php/topic,471.msg17797.html#msg17797.
« Last Edit: 17 / July / 2008, 19:50:56 by fudgey » Logged
yvesson
Jr. Member
**

Karma: +2/-0
Offline Offline

Posts: 99


A540


« Reply #29 on: 08 / May / 2008, 22:06:24 »

Hej,
Well I'll test it on my A540... Have used your script for my latest pics... worked well except my camera doesn't focus all the time on the birds... but was the same with the other script. Any hint ? It seems to focus on what's in the middle always.
Video can be fun too, indeed ^^
Logged

poll, which is the best... ?
+ my pics on the same site
Pages: Prev 1 [2] 3 4 ... 10 Next   Go Up
  Print  
 
Jump to: