×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Poor FPS when streaming

  • Posts: 33
  • Thank you received: 0
Hi,

So I'm getting less than ideal FPS when streaming video from my CCD. Here's the setup:

QHY5L-II CCD mono connected to a Raspberry Pi 3 running a fairly recent INDI from GitHub (less than a week old).
RPi3 is configured as a WiFi hotspot using its internal WiFi. I'm getting about 49Mbit/s with this as indicated using iperf.
On my laptop I run kstars-bleeding and latest INDI from GitHub.

In the INDI Control Panel I've set the following for the QHY:
Main Control:
- USB Speed: 2
- USB Traffic: 0
Streaming:
- Expose Duration(s): 0.001

Here's are the FPS I'm getting with various resolutions when I enable streaming plus some vital signs of what's happening on the RPi according to xosview:
1280x960: 7.3FPS
- CPU load: 59-62%
- RAM usage: 435M
- Network utilization: 5.4-5.6Mbytes/sec
- No IO waiting
640x480: 7.4FPS
- CPU load: 57-59%
- RAM usage: 425M
- Network utilization: 2.9-3.3Mbytes/sec
- No IO waiting
320x240: 7.4FPS
- CPU load: 39-45%
- RAM usage: 425M
- Network utilization: 0.56-1.1Mbytes/sec
- No IO waiting

I seem to get pretty much the same FPS no matter what I do so I'm not sure what the bottleneck is? The only thing that seems to get maxed out (=same as iperf was indicating) is the network utilization at the maximum resolution but the FPS does not change. In the indiserver log running on the RPi3 I get the following line each time I start streaming:

2018-07-30T12:39:29: Driver indi_qhy_ccd: libusb: error [submit_bulk_transfer] submiturb failed error -1 errno=121

What does this mean and is there anything I can do about it?


I know my setup is not ideal for streaming but I'd like to get the most out of what I have. Feels like it should be able to do better as for example running oaCapture on the RPi3 I'm getting the following FPS:
1280x960: 9-11FPS
800x600: 26FPS
640x480: 43FPS
320x240: 97FPS


Any ideas?
Last edit: 5 years 7 months ago by Kari Brown.
5 years 7 months ago #28018

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 0

Replied by Kari Brown on topic Poor FPS when streaming

Hmm... I just tried the QHY connected directly to my laptop and running INDI server and Ekos on the same machine and I'm getting exactly the same 7.3-7.4FPS as with the RPi3 over WiFi. Feels like it's deliberately capped to this?
5 years 7 months ago #28045

Please Log in or Create an account to join the conversation.

This is a limitation with the QHY SDK. I'll see if we can squeeze more from it.
5 years 7 months ago #28059

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 0

Replied by Kari Brown on topic Poor FPS when streaming

Ah. That explains it! Thanks for looking into it.
5 years 7 months ago #28068

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 0

Replied by Kari Brown on topic Poor FPS when streaming

I'm somewhat tempted to have a closer look at the oaCapture source code and see if it would be easy to write an indi ccd driver based on it. I believe it does not depend on the QHY SDK. Does that make any sense? Obviously it would make it less generic...
5 years 7 months ago #28110

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 1
Hi Jasem,

I'm also getting low FPS with the INDI GPhoto driver, with my Canon T5i/700D.

As a basis of comparison, I can get get 8.2fps max at full resolution with EOS Camera Movie Record (that also uses GPhoto2), but the INDI GPhoto driver gets only 1.5fps max.

Also, it would be nice if we could have a 5x zoom/crop option, like EOS Camera Movie Record does, to be able to get 2x higher FPS (17.7fps max with my setup).

Thanks,
Andre
5 years 2 months ago #33772

Please Log in or Create an account to join the conversation.

and how can this be done in libgphoto2? that's the question :-)
5 years 2 months ago #33791

Please Log in or Create an account to join the conversation.

  • Posts: 107
  • Thank you received: 38
Try this INDI compatible INDIGO driver: github.com/indigo-astronomy/indigo/tree/..._drivers/ccd_gphoto2
It supports 5x Zoom and many more features. It was developed and tested with a 700D, so basically everything works even automatic mirror lockup etc...
5 years 2 months ago #33792

Please Log in or Create an account to join the conversation.

Ok I just asked Thomas if he can add this feature to the INDI driver as well. Regarding the speed, I'm working on a new websocket based solution that should help with the frame rates. Now if I can finish the new Synscan driver...
5 years 2 months ago #33793

Please Log in or Create an account to join the conversation.


Ok I feel stupid now since you are Thomas and the the developer behind this driver. Can something like this be done on the INDI driver side as well? Right now, JPEG frames are sent. Is this software zoom or a camera control feature?
Last edit: 5 years 1 month ago by Jasem Mutlaq.
5 years 1 month ago #33856

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 1
Copello, thanks for the suggestion.
Unfortunately, I'm looking for a way of capturing a video stream of raw cropped/5x zoomed frames (like eos-movrec app does), and the INDIGO ccd gphoto2 driver provide only a feature for capturing cropped/5x zoomed preview stills, since it doesn't have the Streaming tab/feature.
5 years 1 month ago #33908

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 1
Jasem,
I was checking the code from eos-movrec and I found some interesting things:
1- They also used gp_camera_capture_preview(...) for capturing from the Live View stream, but they employed a Mutex to control the update (memcpy() of the pointer data from gp_file_get_data_and_size() into the buffer frame) of the live stream buffer, and a file write control to try to stabilize the fps. Looks like this must be implemented at both INDI::StreamManager and driver side;
2- Instead of doing software cropping, like INDI Photo does, they used _gp_set_config_value_string(camera, "eoszoom", str_param, camera_context) and _gp_set_config_value_string(camera, "eoszoomposition", str_param, camera_context) to enable zoom and set the zoom/crop position features of the camera's Live View itself. According to this thread , only 1x and 5x zoom factors work, and, unfortunately, 10x zoom doesn't work. The equivalent command line call would be something like: gphoto2 --set-config eoszoom=5 eoszoomposition=640,320 --capture-preview
The following user(s) said Thank You: Alfred
5 years 1 month ago #33911

Please Log in or Create an account to join the conversation.

Time to create page: 0.677 seconds