get_video_details() alternative - General Help and Assistance on using CHDK stable releases - CHDK Forum

get_video_details() alternative

  • 5 Replies
  • 3329 Views
get_video_details() alternative
« on: 28 / August / 2014, 09:18:11 »
Advertisements
Hello!
Can you tell me please if there are any other ways of getting frames from camera's LCD since get_video_details() deprecated?
I'm trying to get live stream in my program like one in chdkptp.
-Edmund :)

*

Offline reyalp

  • ******
  • 14126
Re: get_video_details() alternative
« Reply #1 on: 28 / August / 2014, 17:08:03 »
Hello!
Can you tell me please if there are any other ways of getting frames from camera's LCD since get_video_details() deprecated?
I'm trying to get live stream in my program like one in chdkptp.
-Edmund :)
Is your program using PTP or running on the camera itself?

In the first case, you can do what chdkptp does. See PTP_CHDK_GetDisplayData in core/ptp.h, and the structures defined in core/live_view.h.

In the second case... tell us more about what you are trying to do.
Don't forget what the H stands for.

Re: get_video_details() alternative
« Reply #2 on: 03 / September / 2014, 10:59:20 »
Sorry for long response.

I'm using PTP, writing in C#.
Unfortunatley, despite chdkptp is far developed and has all functionality I am trying to implement, it is hard for me to understand it's sources (I've already tried and that lua part is kinda tricky for me) also I need to make my solusion in C# using nothing but it.

Fourtunatly I've found project : https://github.com/chakphanu/CHDKPTPRemote - it helped me a lot and it fulfills my question.

May I ask you one offtopic question? How could I transfer photo to PC?
Via PTP as I understood... But I wasn't been able to find nor any documentation nor any usage examples of it.

Thank you very much for taking your time.

*

Offline reyalp

  • ******
  • 14126
Re: get_video_details() alternative
« Reply #3 on: 03 / September / 2014, 16:32:05 »
I'm using PTP, writing in C#.
Unfortunatley, despite chdkptp is far developed and has all functionality I am trying to implement, it is hard for me to understand it's sources (I've already tried and that lua part is kinda tricky for me) also I need to make my solusion in C# using nothing but it.
If you have specific questions about the chdkptp code, feel free to ask. There is some general description of how it's organized  in http://chdk.setepontos.com/index.php?topic=11817.msg115652#msg115652


Quote
May I ask you one offtopic question? How could I transfer photo to PC?
Via PTP as I understood... But I wasn't been able to find nor any documentation nor any usage examples of it.
Do you mean file download or remoteshoot (shoot and save over USB with saving to card)?

File download is pretty simple, looking at chdkptp ptp.c ptp_chdk_download that should cover it.

remoteshoot is a bit complicated, due to the way it's hacked into the original firmware. This post has some explanation http://chdk.setepontos.com/index.php?topic=11330.msg111397#msg111397
Don't forget what the H stands for.

Re: get_video_details() alternative
« Reply #4 on: 08 / September / 2014, 12:25:48 »
Thanks for answers!

Quote
Do you mean file download or remoteshoot (shoot and save over USB with saving to card)?
Done with file download and will try to implement remote shoot. Both are useful.

Just curious, why did get_video_details() where removed anyways?
Because same can be done with PTP?
If I didn't find that source I still would have troubles with getting live view I think...

*

Offline reyalp

  • ******
  • 14126
Re: get_video_details() alternative
« Reply #5 on: 08 / September / 2014, 22:32:10 »
Just curious, why did get_video_details() where removed anyways?
Because the live view needed special PTP commands anyway to get the actual data, and various aspects of the framebuffer layout can change at any time time outside of PTP control. To maintain a correct liveview stream, you need to send the dimensions and offsets with every frame. So a script function to get that information would only cause confusion and make the implementation more complicated and confusing.

The C# code may not handle viewport changes correctly, see http://chdk.setepontos.com/index.php?topic=10799.msg113958#msg113958 but if you don't switch modes or use digital zoom it may be OK for your application.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal