Video fast zooming script - Script Writing - CHDK Forum

Video fast zooming script

  • 12 Replies
  • 4472 Views
Video fast zooming script
« on: 02 / August / 2020, 21:25:24 »
Advertisements
Hi guys, is there any script that allows SX cameras to have full zooming speed while shooting video to make them behave like camcorders? I don't care about the motor noise because I'll record the audio separately

*

Offline reyalp

  • ******
  • 14125
Re: Video fast zooming script
« Reply #1 on: 02 / August / 2020, 21:52:33 »
Hi guys, is there any script that allows SX cameras to have full zooming speed while shooting video to make them behave like camcorders? I don't care about the motor noise because I'll record the audio separately
AFAIK there isn't a known way of changing the speed of zooming with the zoom keys (it's possible set_zoom_sped on a couple very early S cameras might). With CHDK 1.5 on Digic 4 and later cameras, you can control the speed used by script set_zoom(), but you can't make a script that uses this to emulate key control, because set_zoom has to be called with a specific zoom position, so you can't use it to keep zooming while a key is held. Repeatedly calling it with short steps would be slow and jerky.
Don't forget what the H stands for.

Re: Video fast zooming script
« Reply #2 on: 02 / August / 2020, 21:59:13 »
I tested out a fast zooming script in this post
https://chdk.setepontos.com/index.php?topic=12276.10
I'm having 3 problems:
- If I don't use manual focus, the camera will crash
- The zoom lever can't be changed during the shoot since the zoom key is binded to the set key
- It loses focus for a second
- Just a caveat, but as soon as I touch the zoom rocker, the zoom speed falls back to the normal slow speed even when using the set button
I'd be very appreciate if someone could help me resolve these problems, my camera's model is SX40
this is the sample video I shot using this script: https://www.facebook.com/groups/CHDK.Users/permalink/10164403121420037/

*

Offline reyalp

  • ******
  • 14125
Re: Video fast zooming script
« Reply #3 on: 02 / August / 2020, 23:10:47 »
I tested out a fast zooming script in this post
https://chdk.setepontos.com/index.php?topic=12276.10
I'm having 3 problems:
- If I don't use manual focus, the camera will crash
There's a good chance this would be solved if you use CHDK 1.5 (the "unstable" version)

Quote
- The zoom lever can't be changed during the shoot since the zoom key is binded to the set key
If you mean you can't change the zoom normally while the script is running, you have 2  options:
* Exit alt and use the zoom lever without ending the script. Exiting alt while a script is running is not generally well defined, but it should probably work for the zoom keys.
* Modify the script to "pass through" zoom keys, like the attached. This adds some latency to the zoom keys, which is not great.
I initially thought you could also just exit and restart the script, but starting it while video is recording will probably fail with a file IO error.

If you mean you can't change the zoom with the keys while the zoom is moving after pressing set, that's expected.

Quote
- It loses focus for a second
This might be improved in CHDK 1.5

Quote
- Just a caveat, but as soon as I touch the zoom rocker, the zoom speed falls back to the normal slow speed even when using the set button
CHDK 1.5 may avoid that. It also suggests there might be something that can be poked in the firmware that would change the key zoom speed.
Don't forget what the H stands for.

Re: Video fast zooming script
« Reply #4 on: 03 / August / 2020, 00:01:11 »
After poking around with CHDK 1.5 on my SX40 I can notice improvements straight off the bat:
- No more losing focus when zooming in
- It no longer crashes when I use AF
- If I use the zoom rocker, it zooms slowly but the fast zoom provided by the script is unaffected
I'd really appreciate it if you can help me modify that script to make it pass through to the zoom rocker since I currently have zero knowledge about scripting

*

Offline reyalp

  • ******
  • 14125
Re: Video fast zooming script
« Reply #5 on: 03 / August / 2020, 00:14:09 »
I'd really appreciate it if you can help me modify that script to make it pass through to the zoom rocker since I currently have zero knowledge about scripting
The script I attached to the previous post does this.
Don't forget what the H stands for.

Re: Video fast zooming script
« Reply #6 on: 03 / August / 2020, 00:41:11 »
I just tested out your script, it turns out that only by using c=c-1 / c=c+1 along with set_zoom can the camera zoom at full speed while shooting video, press('zoom_in') and press('zoom_out') doesn't work that way.

*

Offline reyalp

  • ******
  • 14125
Re: Video fast zooming script
« Reply #7 on: 03 / August / 2020, 00:50:00 »
I just tested out your script, it turns out that only by using c=c-1 / c=c+1 along with set_zoom can the camera zoom at full speed while shooting video, press('zoom_in') and press('zoom_out') doesn't work that way.
Yes, the "pass through" works uses emulated key presses, so it will zoom at the same speed as key presses. There is no known way to change this.

Your comment that using the keys affected set_zoom speed in CHDK 1.4 suggests there might be some relatively simple state involved, but someone would have to do some reverse engineering.
Don't forget what the H stands for.

Re: Video fast zooming script
« Reply #8 on: 03 / August / 2020, 01:18:19 »
can you make a version of it that uses c=c+1 / c=c-1 and set_zoom(c) instead of press('zoom_in')?

Re: Video fast zooming script
« Reply #9 on: 03 / August / 2020, 02:29:15 »
for anyone who's interested in this topic, I tested out this script on my SX230 HS and SX30 IS and found out that on the SX30 IS, it can't trigger fast zoom but on the SX230 HS it can

 

Related Topics


SimplePortal © 2008-2014, SimplePortal