CHDK Wiki
Advertisement

The following script can be used to restart video recording periodically to get around the Canon 4G video file size limit. It creates a new video file each time it restart, allowing recording until the SD card fills with only a brief gap between each video file.

@title MultiMovie
@param x time per file in seconds 
@default x 590
   f=0
   print "recording started..."
   press "shoot_half" 
   sleep 1500

:new
   f=f+1 
   click "shoot_full" 
   if f=1 then release "shoot_half"
   print "file number: ";f
   s=get_tick_count 
 
:loop
   t=(get_tick_count-s)/1000
   if t>x then goto "reload" 
   print "file number: ";f 
   print "time left: ", x-t, "s"  
   sleep 900 
   goto "loop"

:reload
   print "reloading..." 
   click "shoot_full" 
   print "waiting for video..."

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

Modified from a script written by outslider and posted on the CHDK forum by Vash11779 .

Advertisement