supplierdeeply

Request: script to start video record with shutter press

  • 7 Replies
  • 534 Views
Request: script to start video record with shutter press
« on: 16 / December / 2017, 21:33:36 »
Advertisements
Hi all!

I just spent a few hours trying to figure out how to start recording video when I press the shutter button (instead of taking a photo) but am pretty stuck.

My camera is a Canon IXUS240 - it's a touchscreen and has no physical video button (which is why I think I am running into a problem). None of the code I have written is working at all and I would really appreciate some help!

Thanks a lot

*

Offline reyalp

  • ******
  • 11490
Re: Request: script to start video record with shutter press
« Reply #1 on: 16 / December / 2017, 22:20:36 »
Hi all!

I just spent a few hours trying to figure out how to start recording video when I press the shutter button (instead of taking a photo) but am pretty stuck.

My camera is a Canon IXUS240 - it's a touchscreen and has no physical video button (which is why I think I am running into a problem). None of the code I have written is working at all and I would really appreciate some help!
In Lua, you can try

post_levent_to_ui("PressMovieButton")
post_levent_to_ui("UnpressMovieButton")

If this works, we can add a workaround that allows the normal CHDK click('video') to work.

edit:
You might need to put some delay between the Press and Unpress above, like sleep(100)
Don't forget what the H stands for.

Re: Request: script to start video record with shutter press
« Reply #2 on: 17 / December / 2017, 01:40:12 »
In Lua, you can try

post_levent_to_ui("PressMovieButton")
post_levent_to_ui("UnpressMovieButton")

Thank you!!
i tried using it but didn't seem to have any luck. Especially stuck with which command to call on to implement it.

Am very new to all of this..would you be able to provide some sample code?
Cheers

*

Offline reyalp

  • ******
  • 11490
Re: Request: script to start video record with shutter press
« Reply #3 on: 17 / December / 2017, 02:19:16 »
i tried using it but didn't seem to have any luck. Especially stuck with which command to call on to implement it.
To test if that method works on your camera, you just need to run a script with those lines in it. The attached works on one of my cameras.
Don't forget what the H stands for.


Re: Request: script to start video record with shutter press
« Reply #4 on: 17 / December / 2017, 11:11:34 »
Tried this out on one of my Powershot N's  (another touch screen Powershot with no physical video button). 

Works pretty well so I built a few other things into the script to make it a little more usable.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 11490
Re: Request: script to start video record with shutter press
« Reply #5 on: 17 / December / 2017, 16:16:46 »
Tried this out on one of my Powershot N's  (another touch screen Powershot with no physical video button). 
Indeed, I got that suggestion from the N port:
Code: [Select]
// simulate video button with levents
#define KBD_SIMULATE_VIDEO_KEY 1
which sends the levents in response to scripted "video" press/release. This can be added for IXUS240 if the levents work.
Don't forget what the H stands for.

Re: Request: script to start video record with shutter press
« Reply #6 on: 17 / December / 2017, 16:58:23 »
Indeed, I got that suggestion from the N port:
...
which sends the levents in response to scripted "video" press/release. This can be added for IXUS240 if the levents work.
Using CHDK with a PowerShot N and need to trigger video recording with a script.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Request: script to start video record with shutter press
« Reply #7 on: 18 / December / 2017, 20:52:25 »
Tried this out on one of my Powershot N's  (another touch screen Powershot with no physical video button). 

Works pretty well so I built a few other things into the script to make it a little more usable.

legend. thanks both of you for your help. will try that now!


 

Related Topics