thank you for this library. I was afraid I will have to write it on my own
I tested it on Jetson Xavier NX and I can achieve 1936x1096x8@170 at about 40% CPU usage.
When I did some tests on my own with my own ZWO Lib patch I could get the same bitstream (around 2.5Gbit) at about 0.3 to 3% CPU usage so I think it can still be optimized somehow. But to be honest I didn't check your code yet so I can't really tell.
Everything works really great. I can achieve 170 FPS of such bitrate at 50% CPU and 50% GPU usage. I will probably optimize it further, but currently I am satisfied. Initial tests results are very good and fair enough for the final gadget we are targetting.
My further plan is to save the video to NVME drive in the uncompressed AVI format (Full FPS) and stream part of the video (15-30 FPS) over WIFI to tablet or mobile using the Jetson H264 hardware encoder. I tested this already with Logitech C270 WebCam
and it works great. On the client I have used this: github.com/matijagaspar/ws-avc-player
Sorry for the late reply on this topic, but things have been busy and hectic.
Finally managed to do some real test. Hope understood the instructions about swapping the libraries correctly. Replaced the libASICamera2.so with libASICamera2Boost.so (renaming that to libASICamera2.so (if that is incorrect, pleas let me know)
On my desktop (Intel processor) compiled the ZWO demo versions and tested these with an ASI178MM with both libraries
Difference (in 16 bit was huge, expected 30fps no error 11 with the "boos" version)
Then I compiled the drop in libraries on an RPI4 (and did the same for replacing the libraries)
Tested with Kstars and Ekos and the results were mixed:
- ASI178 and video: performance increase, but looks as memory is getting full (and also some warning about buffers skipped, but that is probably Ekos not able to follow captures)
- ASI178 and normal captures: driver aborts
- ASI120MM-S: both video capture and normal image capture driver aborts immediatelly
Maybe my mistake? But some guidance would be welcome.
For FireCapture don' see how I could swap. FC seems to use a library calle ASICam_x64.so (on intel, did not look at the rPI) and can't replace that with the boost lib. (Can remove libASICamera2.so, FC keeps on running) Looks like something prepared to use with Java, will need to contact Torsten about that.
I'm coming back after a break.
I thought that we would be able to solve the problems in the original library with ZWO, unfortunately in short I got the answer "most of the users is not so critical about the speed on PI".
So I will continue to develop the boost library. I will take a look at the problems that were mentioned on the forum.
There is low speed writing to the card on the Raspberry PI and it will be difficult to get around this problem. The solution is to introduce:
- compression before saving to the memory card
- saving a short recording - using the version with a large amount of RAM
- sending directly over the network and saving to another computer
I also got "Asus Tinker Edge R" for testing, where most problems can be solved.
After all, there is still a problem with long exposure, if my library solves the problem, I'll be glad my work isn't wasted.
I was recently pointed at this thread as I was experiencing poor FPS with my ASI174MM on RPi4/USB3 at any higher ROI than 1536x1024 (more details
). I gave the libASICamera2Boost.so a whirl with some mixed results:
With indiserver running the library on the RPi I was able to get about 51FPS over gigabit ethernet (~940Mbits/sec). A big difference compared to it barely working at all at full resolution (< 1FPS)! However the indi_asi_ccd driver crashed quite often on the RPi saying something like: 2021-09-15T22:13:13: Driver indi_asi_ccd: No INumber 'Gain' in ZWO CCD ASI174MM.CCD_CONTROLS
2021-09-15T22:13:13: Driver indi_asi_ccd: No INumber 'Offset' in ZWO CCD ASI174MM.CCD_CONTROLS
2021-09-15T22:14:19: Driver indi_asi_ccd: stderr EOF
2021-09-15T22:14:19: Driver indi_asi_ccd: restart #1
Child process 7329 died
Not sure if this is related but on connection I get this in the INDI control panel in Kstars: 2021-09-15T22:11:59: [ERROR] Failed to get control information (ASI_ERROR_INVALID_INDEX).
I was not able to get anything sensible out from AsiCameraPerformance. It says Best bandwidth is 70%, it has 1767770.7 FPS
Please see the attached logs for more information.
Happy to run more tests! Is there a way to run indiserver in gdb in order to try and catch the indi_asi_ccd crash?