multimovie for sx30is - Script Writing - CHDK Forum

multimovie for sx30is

  • 8 Replies
  • 3891 Views
multimovie for sx30is
« on: 10 / March / 2012, 15:18:10 »
Advertisements
This script for multimovie does not work in my sx30is.

It runs only once and then hangs.

I would appreciate any help or guidance.


@title MultiMovie
@param x one part time in sec
@default x 590

f=0

print "record will start..."

press "shoot_half"
sleep 1500
:new
f=f+1
press "shoot_full"
release "shoot_full"
if f=1 then release "shoot_half"

print "file number: ";f

s=get_time 0
m=get_time 1
h=get_time 2
d=get_time 3
b=s+m*60+h*3600+d*3600*24

:loop
s=get_time 0
m=get_time 1
h=get_time 2
d=get_time 3
t=s+m*60+h*3600+d*3600*24
u=t-b
print "file number: ";f
print "time left:";x-u
if u>x then goto "reload"
sleep 900
goto "loop"

:reload
print "reloading..."
press "shoot_full"
release "shoot_full"
print "waiting for ready..."

:waitloop
q=get_movie_status
if q=1 then goto "new"
print "status:",q
sleep 100
goto "waitloop"

Re: multimovie for sx30is
« Reply #1 on: 10 / March / 2012, 15:29:40 »
This script for multimovie does not work in my sx30is.

It runs only once and then hangs.

I would appreciate any help or guidance.

Code: [Select]
@title MultiMovie
@param x one part time in sec
@default x 590

f=0

print "record will start..."

press "shoot_half"
sleep 1500
:new
f=f+1
press "shoot_full"
release "shoot_full"
if f=1 then release "shoot_half"

print "file number: ";f

s=get_time 0
m=get_time 1
h=get_time 2
d=get_time 3
b=s+m*60+h*3600+d*3600*24

:loop
s=get_time 0
m=get_time 1
h=get_time 2
d=get_time 3
t=s+m*60+h*3600+d*3600*24
u=t-b
print "file number: ";f
print "time left:";x-u
if u>x then goto "reload"
sleep 900
goto "loop"

:reload
print "reloading..."
press "shoot_full"
release "shoot_full"
print "waiting for ready..."

:waitloop
q=get_movie_status
if q=1 then goto "new"
print "status:",q
sleep 100
goto "waitloop"

What do you see on your camera's display when it "hangs".  Does it keep printing something ?  If not, what is the last thing that was printed ?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: multimovie for sx30is
« Reply #2 on: 10 / March / 2012, 16:52:05 »
I load the script.

 Have the camera dial on video. 

I press the shutter. 

The camera takes one jpg image and then counts down 590 seconds.

No video is produced.

I am clearly doing something wrong.   I am new to chdk.

Thanks for any help and suggestions.
« Last Edit: 10 / March / 2012, 17:17:57 by robx »

Re: multimovie for sx30is
« Reply #3 on: 10 / March / 2012, 17:20:45 »
You need to be in video mode ;)

Usually video recording works the best, while camera is in video mode ;p
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick


*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: multimovie for sx30is
« Reply #4 on: 10 / March / 2012, 17:27:09 »
The SX30 has a video button!

Use
Code: [Select]
click "video" instead
Code: [Select]
press "shoot_full"
release "shoot_full"

msl
CHDK-DE:  CHDK-DE links

Re: multimovie for sx30is
« Reply #5 on: 10 / March / 2012, 21:48:12 »
Thank you.

I wrote a simple multi video script to automatically acquire ten 20 minute segments of video on my sx30is.   

20 minutes seems to fall below the 4 GB limit I have encountered.

Unfortunately, it does seem to require a 3 second sleep to stop the old and start the new video.
------------------------------------
@title Multi Video

print "Start Multi Video"
click "video"
sleep 3000

for i=1 to 10
click "video"
for j=1 to 1200
  sleep 1000
  print "f",i,"of",10,"s",j,"of",1200
next j
click "video"
sleep 3000
next i



Re: multimovie for sx30is
« Reply #6 on: 11 / March / 2012, 05:43:18 »
Instead of 'sleep 3000' you could use get_movie_status. This would be a little bit safer.

However - your script is much more simple than mine and should be referenced instead of mine (which you have posted before) :)
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: multimovie for sx30is
« Reply #7 on: 16 / March / 2012, 17:43:21 »
Here is an alternate multi movie video using get status. 

The only thing odd is that to end it I need to turn the camera off.  Once I had to take the battery out.

There is 3 to 4 second gap between sequential video files.

Rob


================================
@title Multi Video z

print "Start multi video z"
z=0
y=0
:loop
  sleep 100
  y=y+1
  s=y/5
  x=get_movie_status
  if s%10=0 then
    cls
    print "Status",x,"M",s/60,"s",s%60,"v",z
  endif
  if x<>4 and x<>5 then
    z=z+1
    click "video"
    sleep 250
  endif
goto "loop"



Re: multimovie for sx30is
« Reply #8 on: 16 / March / 2012, 18:16:39 »
Can't it be stopped by pressing shoot_full? I guess (didn't test) that the problem is that it stops the script but no recording? If so you can add an label called :restore. Label :restore is called by script interpreter, when you press shoot_full button.

I imagine it could be done like this:

Code: [Select]
:restore
    click "video"

I'm not sure about that - my camera has no dedicated video button. Experiment is up to you;)
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal