rawopint vs ptp - page 2 - Script Writing - CHDK Forum

rawopint vs ptp

  • 15 Replies
  • 11040 Views
*

Offline reyalp

  • ******
  • 14128
Re: rawopint vs ptp
« Reply #10 on: 02 / April / 2018, 16:41:24 »
Advertisements
I understand that, but it will shoot as fast as possible or will it stop, crash,...?
It will shoot as fast as possible. This should only be an issue if you are making  a timelapse and want to keep a fixed timescale, or to run for a fixed amount of time like I suggested in the previous post.

You can get the actual time from the rawopint.csv log: When the "sleep" column is negative, it means the interval was missed by that amount, so sleep -100 with a 1 second interval would mean the frame actually took 1.1 seconds.
Don't forget what the H stands for.

Re: rawopint vs ptp
« Reply #11 on: 25 / July / 2018, 13:14:38 »
Hi reyalp,

i´m sorry to bother you again. :( I always get an error:
Quote
WARNING: capture_get_data error I/O error
WARNING: error waiting for shot script nil
ERROR: I/O error uninit I/O error

It seems like the camera crashes. the power led is on, lens is out, but there is no reaction when i press any button and the connection to chdkptp is lost.
I did a lot of tests with different hardware, but i get always the same error. Sometimes it takes 400 shots, sometimes 4000.
Platforms: Windows 7 on PC; Raspian on Raspberry Pi3
Cams: IXUS 750; IXUS 850IS
saving pictures to: USB flash drive; internal HDD

Code: [Select]
rs C:\Users\Blue\Desktop\Test\${ldate}${ext} -script=C:\Users\Blue\Desktop\rawopint_rs.lua -shots=99999 -int=2
chdkptp and remoteshoot (rs without any script) works fine, so i think there is something wrong with rawopint_rs.

thanks a lot for your help

*

Offline reyalp

  • ******
  • 14128
Re: rawopint vs ptp
« Reply #12 on: 25 / July / 2018, 17:15:34 »
Hi reyalp,

i´m sorry to bother you again. :( I always get an error:
Not a problem, sorry to hear it isn't working for you.
Quote
chdkptp and remoteshoot (rs without any script) works fine, so i think there is something wrong with rawopint_rs.
Have you done rs for a similar number of shots?

I'll try to reproduce it later, but one thing that comes to mind that could cause this is the "metering" and histogram parts of rawopint can might tie up the camera CPU for long enough to cause problems with USB communication.

If you can post a rawopint.csv log, I can see what settings you are using and how long these are taking.

You can decrease the time spent in these parts of the script by increasing ui_meter_step and ui_histo_step_t.value. Both should be odd numbers. In the glue script I have, ui_histo_step_t.value is 5, which is quite small (more pixels used, slower). If you're using the same one, I'd suggest trying 15. The meter step in mine is already 15, which should be fine. If yours is lower, you could raising it as well.

On the raspberry pi, messages in the system logs (/var/log/syslog or /var/log/kern.log) when the failure happens might provide some clues.
Don't forget what the H stands for.

Re: rawopint vs ptp
« Reply #13 on: 26 / July / 2018, 09:32:20 »
Quote
Have you done rs for a similar number of shots?
yes, -shots=99999

attached:
overview.xlsx, 2x rawopint.csv, syslog, kern.log and autostart.sh

my goal is to start the timelaps automaticlly when the raspberry powers on.

by the way: is it possible to switch to manual mode instead to rec/automatic mode in chdkptp cli?

*

Offline reyalp

  • ******
  • 14128
Re: rawopint vs ptp
« Reply #14 on: 26 / July / 2018, 13:32:53 »
yes, -shots=99999
But how many shots actually shot?
Quote
attached:
overview.xlsx, 2x rawopint.csv, syslog, kern.log and autostart.sh
Thanks. From the rawopint IXUS 750 log, I see histo_step is 5, and the histo_time column ~400ms,  so I'd definitely suggesting changing that first. In rawopint_rs.lua, change
Code: [Select]
ui_histo_step_t.value=5
to
Code: [Select]
ui_histo_step_t.value=15



In the IXUS850 log, I see some runs with histo_step 5 and some with 15. Maybe these some are remote shoot and some are not?

I don't see anything obvious in the kern.log and syslog, but I don't know where in the log the problem happened. It would be good to look at the last few lines immediately after the problem happens.

Quote
by the way: is it possible to switch to manual mode instead to rec/automatic mode in chdkptp cli?
If you mean set the shooting mode, you can do that with CHDK, but I don't think your cameras have a true manual mode. The one that is called M on the canon controls is actually P (program AE), which you could set using something like
Code: [Select]
-e"rec" -e"=require'capmode'.set('P')"
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14128
Re: rawopint vs ptp
« Reply #15 on: 29 / July / 2018, 21:28:05 »
I did some testing, but haven't been able to confirm if my theory is correct or not.

The chdkptp error messages just mean the connection failed, I saw the same output when my elph130 was shut down by rawopint for low battery.

Running with the same meter and histogram step values as your example, my a540 crashed in a  after ~700 shots. I tried with meter_step = 3 on the theory it would be more likely to fail, but it ran fine for 1000 shots.

The amount of time the meter and histogram functions takes depends both on the camera processor speed and sensor size. On a540, meter_step 3 results in a meter_time of ~680 ms (for 90% width/height), and histo_step 5 takes 380.

edit:
I tried setting histogram step to 1. This failed because the remote shoot data didn't become available in the expected time, but it didn't cause a crash or low level USB communication failure. I think this makes my theory about meter / histogram interfering with USB less likely.

I subsequently did 2000 shots with both histogram and meter step set to 3, no failures
« Last Edit: 30 / July / 2018, 00:08:13 by reyalp »
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal