Live view (video out) in shot mode - Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes) - CHDK Forum  

Live view (video out) in shot mode

  • 12 Replies
  • 587 Views
Live view (video out) in shot mode
« on: 13 / February / 2020, 05:18:26 »
Advertisements
Hello everybody,

I'm a complete newbie to chdk. Really impresed on how chdk can expand the functionality of those cameras

I've already searched for the topic without success...sorry if this has been asked before

I intend to use chdk on a dron for aerial photograpy and I'd like to have 'live video' in shot mode (like I where looking at the camera lcd when shoting)

So far I've found two options:

1. Some cameras have live view, analog video out in shoot mode (like G16). This way I can connect the video out to a video transmitter

 - When doing so, is feasible to connect usb trigger to the camera to launch lua scripts?
 - Does chdk support this function for those cameras?
 - Does chdk extends this functionality for other models?
 - Is there a list of cameras with this funcion?
 - Is there any functional limitation when doing this?
 
2. Some cameras has the screen capture feature that can be send to a pc using chdkptp. Instead I can send this capture to a rpi and then send the stream through mavlink

 - Is it possible to use chdkptp together with the usb trigger?
 - Is there a list of chdkptp commands?
 
 ...or maybe there is another option I'm not aware
 
 Thanks in avance,
 Daniel
« Last Edit: 13 / February / 2020, 05:55:32 by DanielGeA »

Re: Live view (video out) in shot mode
« Reply #1 on: 13 / February / 2020, 06:14:02 »
Damn, this has been asked before...https://chdk.setepontos.com/index.php?topic=9610.msg99056#msg99056

Althugh is an old post. Maybe thinks have changed since then

I'll answer myself below...


So far I've found two options:

1. Some cameras have live view, analog video out in shoot mode (like G16). This way I can connect the video out to a video transmitter

 - When doing so, is feasible to connect usb trigger to the camera to launch lua scripts?
Apparently yes. It is needed a combined shutter/av cable though
- Does chdk support this function for those cameras?
Yes
- Does chdk extends this functionality for other models?
No
- Is there a list of cameras with this funcion?
No. Look at models manual
- Is there any functional limitation when doing this?
Still don't know but with stock firmware there some limitations with live view

2. Some cameras has the screen capture feature that can be send to a pc using chdkptp. Instead I can send this capture to a rpi and then send the stream through mavlink

 - Is it possible to use chdkptp together with the usb trigger?
Apparently no

- Is there a list of chdkptp commands?

Damn, yes... https://github.com/simonswine/chdkptp/blob/master/USAGE.TXT

Also I've found this... https://chdk.fandom.com/wiki/Lua/PTP_Scripting to interact between lua script an ptp

All in all chdkptp seems more promising as it allows script execution

More questions...

Does someone have experience using chdkptp for remote shoting?

Is it possible to do live view (analog view out) and chdkptp together?

But being so promising I wonder why I couldn't find anything about it in ardupilot wiki
« Last Edit: 13 / February / 2020, 06:30:09 by DanielGeA »

*

Offline reyalp

  • ******
  • 12441
Re: Live view (video out) in shot mode
« Reply #2 on: 13 / February / 2020, 13:34:43 »
Quote
1. Some cameras have live view, analog video out in shoot mode (like G16). This way I can connect the video out to a video transmitter

 - When doing so, is feasible to connect usb trigger to the camera to launch lua scripts?
Apparently yes. It is needed a combined shutter/av cable though
Correct.  Some sources of cables are linked in https://chdk.setepontos.com/index.php?topic=13448.msg137446#msg137446

It's also possible to use other inputs to trigger the remote instead of a custom cable, depending on the camera. See this thread https://chdk.setepontos.com/index.php?topic=13451.msg137576#msg137576
Only a few ports support this currently, but it's easy to add on cameras with the necessary hardware.

Some old cameras have the video out on a separate plug.
Quote
- Does chdk extends this functionality for other models?
There isn't CHDK feature to add video out in rec mode yet, but it is possible from script on some models https://chdk.setepontos.com/index.php?topic=13451.msg142500#msg142500

It's likely we'll add this as a feature in some way.

Quote
Still don't know but with stock firmware there some limitations with live view
Sometimes the resolution changes, which might interfere with CHDK features like histogram, edge overlay and zebra. I wouldn't expect this to be an issue for UAVs though, and it should be fixable without much effort.

Quote
Quote
- Is it possible to use chdkptp together with the usb trigger?
Apparently no
It is possible. You can either use one of the alternate triggers mentioned above, or use a custom cable and usb_force_active https://chdk.fandom.com/wiki/Lua/PTP_Scripting#usb_force_active

Alternately, if you have a PTP connection, you could just use PTP commands to shoot instead of remote trigger.

Quote
Is it possible to do live view (analog view out) and chdkptp together?
Yes.

Quote
- Is there a list of chdkptp commands?

Damn, yes... https://github.com/simonswine/chdkptp/blob/master/USAGE.TXT
FWIW, the official chdkptp project is at https://app.assembla.com/spaces/chdkptp/wiki
The current USAGE.TXT is https://app.assembla.com/spaces/chdkptp/subversion/source/HEAD/trunk/USAGE.TXT
« Last Edit: 13 / February / 2020, 13:38:18 by reyalp »
Don't forget what the H stands for.

Re: Live view (video out) in shot mode
« Reply #3 on: 06 / March / 2020, 05:11:24 »
Thanks for the reply. Sorry for the delay

I've bought a SX210IS and started playing with it. So far I've installed chdk and chdkptp and it works good except for the liveview being the image distorted. Damn this is a no go issue  :(. See https://chdk.setepontos.com/index.php?topic=4338.msg98577#msg98577

Not sure if it can be solved. Will post in the porting thread

Thanks


*

Offline Caefix

  • ***
  • 146
  • Sorry, busy deleting test shots...
« Last Edit: 06 / March / 2020, 12:43:22 by Caefix »
All lifetime is a loan from eternity.

*

Offline srsa_4c

  • ******
  • 4149
Re: Live view (video out) in shot mode
« Reply #5 on: 06 / March / 2020, 13:25:48 »
I've bought a SX210IS and started playing with it. So far I've installed chdk and chdkptp and it works good except for the liveview being the image distorted.
The liveview issue should no longer be present in CHDK 1.5. Download the current release from trunk autobuild.

*

Offline Caefix

  • ***
  • 146
  • Sorry, busy deleting test shots...
Re: Live view (video out) in shot mode
« Reply #6 on: 06 / March / 2020, 14:20:52 »
 :o  :-X  The ORK of Distortion is not defeated from all  :blink: platforms...                 ----------------------- ;) -------->>
All lifetime is a loan from eternity.

Re: Live view (video out) in shot mode
« Reply #7 on: 09 / March / 2020, 03:07:41 »
Yes, using CHDK 1.5 and chdkptp r795, liveview image is perfect including the overlay. BTW chdkptp is running on Ubuntu 18.04.4. Though I can't connect to the camera with chdkptp r921. Is this ok?

Sorry for the noob question... I can execute lua native functions but I can't get any chdk lua function to work. It seems they are not recognized:

Code: [Select]
con 21> !print(math.sin(10))
-0.54402111088937
con 21> !print(get_focus())
ERROR: call failed:[string "print(get_focus())"]:1: attempt to call global 'get_focus' (a nil value)
stack traceback:
[C]: in function 'xpcall'
.../chdk/chdkptp-r795-Linux-x86_64/chdkptp-r795/lua/cli.lua:733: in function <.../chdk/chdkptp-r795-Linux-x86_64/chdkptp-r795/lua/cli.lua:724>
(...tail calls...)
[C]: in function 'xpcall'
.../chdk/chdkptp-r795-Linux-x86_64/chdkptp-r795/lua/cli.lua:285: in function 'execute'
.../chdk/chdkptp-r795-Linux-x86_64/chdkptp-r795/lua/cli.lua:400: in function <.../chdk/chdkptp-r795-Linux-x86_64/chdkptp-r795/lua/cli.lua:391>
(...tail calls...)
...chdk/chdkptp-r795-Linux-x86_64/chdkptp-r795/lua/main.lua:282: in main chunk
[C]: in function 'require'
[string "require('main')"]:1: in main chunk

What am I doing wrong?
« Last Edit: 09 / March / 2020, 05:46:10 by DanielGeA »


*

Offline reyalp

  • ******
  • 12441
Re: Live view (video out) in shot mode
« Reply #8 on: 09 / March / 2020, 12:34:58 »
Yes, using CHDK 1.5 and chdkptp r795, liveview image is perfect including the overlay. BTW chdkptp is running on Ubuntu 18.04.4. Though I can't connect to the camera with chdkptp r921. Is this ok?
What happens when you try to use r921? Connecting should be the same, although one user has reported a difference if you disconnect and try to connect again https://chdk.setepontos.com/index.php?topic=13997.0

Quote
Sorry for the noob question... I can execute lua native functions but I can't get any chdk lua function to work. It seems they are not recognized:

Code: [Select]
con 21> !print(math.sin(10))
-0.54402111088937
con 21> !print(get_focus())
! runs *local* Lua code, in the chdkptp process on your computer. get_focus is a camera side function. If you want to run code on the camera, you can either use =, like
Code: [Select]
=return get_focus()
Or if you want to use values inside you local code, use the connection methods like
Code: [Select]
!print(con:execwait('return get_focus()'))
See https://app.assembla.com/spaces/chdkptp/wiki/Scripting_Guide for some information and examples.
Don't forget what the H stands for.

Re: Live view (video out) in shot mode
« Reply #9 on: 09 / March / 2020, 15:12:39 »
What happens when you try to use r921? Connecting should be the same, although one user has reported a difference if you disconnect and try to connect again https://chdk.setepontos.com/index.php?topic=13997.0

I've made some tests with the r921:

- Camera has to be unmounted. This was the reason why I couldn't connect
- I confirm the reconnection issue https://chdk.setepontos.com/index.php?topic=13997.0 an the same solution works for me. The reconnection issue only happens when connected to usb 3. No issue with usb 2. No hubs used
Code: [Select]
set usb_reset_on_close=true
There is no connection issue with r795 being mounted/unmounted or usb 2/3

! runs *local* Lua code, in the chdkptp process on your computer. get_focus is a camera side function. If you want to run code on the camera, you can either use =, like
Code: [Select]
=return get_focus()
Or if you want to use values inside you local code, use the connection methods like
Code: [Select]
!print(con:execwait('return get_focus()'))

Yes, that works

Everything seems to be working fine using chdk 1.5 and chdkptp r921. Now lets see it on the rpi

Thanks a lot reyalp

 

Related Topics