Continuous video script not working on G16 - Script Writing - CHDK Forum  

Continuous video script not working on G16

  • 8 Replies
  • 4242 Views
Continuous video script not working on G16
« on: 18 / April / 2020, 15:07:00 »
Advertisements
Hello, I just recently discovered and installed CHDK 1.5.0 on my Powershot G16 using STICK. I was able to run many intervalometer and motion detection scripts successfully, however, I have not been able to use continuous video scripts correctly, specifically the 3rd script from https://chdk.fandom.com/wiki/Continuous_Video_Scripts, attached below as well.

I'm able to load the script and the first time I run it by pressing the shutter button it starts recording correctly, but when the camera reaches the 4GB limit it does not start recording again automatically. I noticed that if I input something(e.g. 20)  in the seconds parameter it starts recording for that amount of time then stops for that amount of time then starts recording again, is that the normal behavior of the script? Furthermore, the script can only be used the first time the camera boots, if I stop it by pressing the MENU button the next time I press the shutter button the script starts running but it does not trigger recording. I've been looking at the code for the past 2 days but my programming skills are non-existent, any help would be appreciated. Thanks

*

Offline reyalp

  • ******
  • 14121
Re: Continuous video script not working on G16
« Reply #1 on: 18 / April / 2020, 17:57:39 »
What Canon firmware version does your G16 have?

Can you check the following:
In miscellaneous -> tools -> memory browser
set address to BB48
You can use the zoom lever to change the increment

In miscellaneous -> debug check Show Misc values
You should see four rows of values, starting with MEM at the top. Note the value of MEM at each of the following:
In playback
Switch to shooting mode
Start recording video
Stop recording video, waiting for processing to complete
Start recording video again
Don't forget what the H stands for.

Re: Continuous video script not working on G16
« Reply #2 on: 18 / April / 2020, 18:48:08 »
I noticed that if I input something(e.g. 20)  in the seconds parameter it starts recording for that amount of time then stops for that amount of time then starts recording again, is that the normal behavior of the script? Furthermore, the script can only be used the first time the camera boots, if I stop it by pressing the MENU button the next time I press the shutter button the script starts running but it does not trigger recording.
Behaviour confirmed.  Although you can restart the script and it will eventually start recording.

Doesn't seem to matter if the <ALT> key is the Video key or the Shortcut key.

What Canon firmware version does your G16 have?
1.01c    :)
Quote
Can you check the following:
In miscellaneous -> tools -> memory browser
set address to BB48
You can use the zoom lever to change the increment
In miscellaneous -> debug check Show Misc values
You should see four rows of values, starting with MEM at the top. Note the value of MEM at each of the following:

In playback  :  0
Switch to shooting mode  : 0
Start recording video :  0x6fd
Stop recording video, waiting for processing to complete  : 0x6fd
Start recording video again : 0x6fd

EDIT1 :  did a little poking around with the script.  Looks like get_movie_status() returns a "4" regardless of whether the camera is recording video or not.  Which explains all of the reported issues with the script.

EDIT2 : Based on the comments in stub_min.s for the G16, CAM_SIMPLE_MOVIE_STATUS in platform_camera.h should be #undef.

EDIT3 : Patch file submitted. Tested on 1.01c f/w - script now works properly.
« Last Edit: 18 / April / 2020, 19:43:36 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14121
Re: Continuous video script not working on G16
« Reply #3 on: 18 / April / 2020, 19:46:38 »
EDIT2 : Based on the comments in stub_min.s for the G16, CAM_SIMPLE_MOVIE_STATUS in platform_camera.h should be #undef.
You either need to find the correct simple_movie_status, or movie_status (which AFAIK isn't known on any digic 6)

simple_movie_status just needs be a boolean recording or not, there are likely multiple variables that do that.
Don't forget what the H stands for.


Re: Continuous video script not working on G16
« Reply #4 on: 18 / April / 2020, 19:49:23 »
bork
« Last Edit: 18 / April / 2020, 20:04:19 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14121
Re: Continuous video script not working on G16
« Reply #5 on: 18 / April / 2020, 19:55:28 »

I submitted a patch. Works properly but the difference between simple_movie_status and movie_status is a bit trivial - not sure why both were needed (albiet only one or the other in any given port).
If your description of the values is correct, then the patch does not fix the underlying problem. It may coincidentally make that particular script appear to work, but get_movie_status / is_video_recording will still be broken.

movie_status is an internal firmware variable which has the values described on https://chdk.fandom.com/wiki/Script_commands#get_movie_status

simple_movie_status is a boolean, which is used to provide a mostly backward compatible version on cameras which the real movie status is not known or doesn't exist.

From your description, the variable at bae8+0x0c+0x54 does not correspond to either of these, because it doesn't change when recording stops.
Don't forget what the H stands for.

Re: Continuous video script not working on G16
« Reply #6 on: 18 / April / 2020, 20:30:00 »
From your description, the variable at bae8+0x0c+0x54 does not correspond to either of these, because it doesn't change when recording stops.

Found it - patch file updated.  Thanks.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Continuous video script not working on G16
« Reply #7 on: 18 / April / 2020, 20:49:48 »
From your description, the variable at bae8+0x0c+0x54 does not correspond to either of these, because it doesn't change when recording stops.

Found it - patch file updated.  Thanks.

My camera firmware is 1.00H, would it work for it? Where can I get the updated file?  Thanks for looking into it


*

Offline reyalp

  • ******
  • 14121
Re: Continuous video script not working on G16
« Reply #8 on: 18 / April / 2020, 21:29:47 »
My camera firmware is 1.00H, would it work for it? Where can I get the updated file?  Thanks for looking into it
Fix is in the next autobuild, #5469. Should be available within the next hour.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal