I have a Canon A3300 FW Vers 100d and am trying to write a script that takes a round-robin series of videos. When the card fills up it deletes enough of the oldest videos to have room for the next one.
It mostly works but comes a cropper when I use a slower memory card or the card becomes fragmented. The issue is that using sleep is a bad idea because the timing of ending the movie is variable. I could use really long sleep delays, but then the gaps between movies is much longer than what I would like. So I want to wait the minimal amount of time, but long enough that I don't get errors.
Thus I tried using get_movie_status, because according to the documentation, it
"Returns status of movie recording.
can be used for stuff like checks instead of sleep commands. if get_movie_status is 0 or 1, movie recording is stopped or paused. if get_movie_status is 4, recording is in progress. if it is 5, recording is stopped but camera is still writing movie to sdcard."
Well, it doesn't quite work that way on my A3300 -- in the first place, on my camera the status result goes from 1 while it is writing to the card to 6 -- a value that is not mentioned in the documentation. And it stays at 6.
The second issue is that the camera is NOT done writing to the card when the status changes from 1 to 6 -- about another 0.3 seconds of sleep is required. I can see this clearly because I am showing the status on the OSD upon the change, and it pops up well BEFORE the "Busy" message goes away.
Oh yeah, if I don't add that 0.3 seconds of sleep the camera misses the following button-push. So it's important to wait until the Busy message is cleared.
Is there a method that will actually tell me when the Busy message is cleared?
Here is the segment of the script that's giving me grief:
function EndVideo()
press("shoot_half")
sleep(100)
press("shoot_full")
sleep(100)
release("shoot_full")
sleep(100)
release "shoot_half"
-- wait until finished writing to card
O=get_movie_status()
S=""
while get_movie_status() == O do
S=S..O
sleep(100)
end
print("GMS1: ",S)
sleep(300) -- still need to wait for Busy to go away
print("MS: ",get_movie_status())
end
BTW, I get between 10 and 12 passes through the while loop before the status changes.
Thank you for your help!