rkaczorek / astroberry-server

Astroberry Server is a ready to use system for Raspberry Pi for controlling all your astronomy equipment
GNU General Public License v3.0
274 stars 19 forks source link

Camera on RPi +3B #67

Open M31Fan opened 4 years ago

M31Fan commented 4 years ago

Thank you for creating Astroberry!

I'm trying to get the autoguiding to work with a regular USB webcam or Raspberry camera module. I'm getting massive lags (5 to 10 sec) and also extremely bad frame rates (about 1fps). Raspstill works fine. Raspvid does horrible... Are there any sort of lib, or codecs missing?

INDI has no problems in recognizing either camera (V4l2 CCD), so once the camera is working well with the Astroberry, I'm confident PHD2 will also work well with it. Many Thanks!

rkaczorek commented 4 years ago

Does it mean that you get lags using V4L2CCD driver? What is the result of using an independen webcam app such as cheese? (sudo apt install cheese)

M31Fan commented 4 years ago

Hello Rkaczorek,

It's a bit more than just a lag.

I reflashed the SD card, run update and upgrade to ensure I had a fresh start. I then installed cheese and tried various combinations. Results:

Many thanks, Tiago

On Tue, Apr 14, 2020 at 6:59 PM Radek Kaczorek notifications@github.com wrote:

Does it mean that you get lags using V4L2CCD driver? What is the result of using an independen webcam app such as cheese? (sudo apt install cheese)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rkaczorek/astroberry-server/issues/67#issuecomment-613561046, or unsubscribe https://github.com/notifications/unsubscribe-auth/APFMZ4KR4777CMKGZCVNIC3RMSI75ANCNFSM4MHLAKGQ .

M31Fan commented 4 years ago

I would like to add that I installed Webcamoid and it was able to detect and identify my USB cam (located at /dev/video0). If I keep it with the initiall resolution of 1920x1080 I get about 10 sec of lag. Reducing to the lowest resolution in webcamoid (1280 x 720) lowers the lag and improves the fps, but still unusable.

Many Thanks! Tiago

rkaczorek commented 4 years ago

Could you reproduce this on standard Raspbian Buster for Raspberry Pi Foundation?

M31Fan commented 4 years ago

I’ll give a try to reproduce it. Thanks!

On 15. Apr 2020, at 00:03, Radek Kaczorek notifications@github.com wrote:

 Could you reproduce this on standard Raspbian Buster for Raspberry Pi Foundation?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

M31Fan commented 4 years ago

Hello again,

Sorry it took longer to reply... Kids are getting restless 😬

I followed a suggestion of a friend, got one of the test files I had crated and tested in a separate computer: It looks perfect. So the issue is not capture but the playing or the streaming.

Meanwhile I found this thread, where the equipment, method and problem are exactly what I was facing.

https://www.raspberrypi.org/forums/viewtopic.php?t=225073

Seems the bottleneck is the VCN. At least 1.5 years ago it was.

If I understand correctly, VCN allows us to a browser to access the headless Raspberry, and I love that feature!

On one side this is good, as it means PHD2 won’t see the problem I was seeing. On the other hand I’ll need to find a different approach to stream with better quality, as I also wanted to use the camera to do my polar alignment without breaking my back. I’m considering netcat.

What are your thoughts on this? Any way to improve VCN performance, or simple use it as it is for AP, and use netcat to PA?

Many Thanks!! Tiago

On 15. Apr 2020, at 00:03, Radek Kaczorek notifications@github.com wrote:

 Could you reproduce this on standard Raspbian Buster for Raspberry Pi Foundation?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rkaczorek commented 4 years ago

You can access Astroberry Server via VNC or via web browser. Both ways will stream full desktop to your PC in hight resolution. I'm doing planetary imaging up to 120 fps without any problem and I use browser connection to Astroberry Server. For PA you can use Align in Ekos, which provides very good PA module. No need for a cam in polar alignment scope as the module uses main scope for PA. Give it a try!

M31Fan commented 4 years ago

Hello Again,

Thanks for the tip on the PA. I have not yet invested in a dedicated camera for the main scope, and I'm simply using a DSLR (with a remote shutter controler). I'll check if I can use the guidescope for it.

Meanwhile, regarding the camera viewing performance, I made quite a few tests and here are my findings:

Potential ways to improve the camera's view:

Essentially, for now it seems that the lag and low fps come from the fact that I'm using it remotely (local network), so my hope is that PHD2 won't be afected by it. I'll need to find the time to try it.

I thank you your time and effort in creating this awesome tool! Many Thanks! Tiago

On Fri, Apr 17, 2020 at 6:11 PM Radek Kaczorek notifications@github.com wrote:

You can access Astroberry Server via VNC or via web browser. Both ways will stream full desktop to your PC in hight resolution. I'm doing planetary imaging up to 120 fps without any problem and I use browser connection to Astroberry Server. For PA you can use Align in Ekos, which provides very good PA module. No need for a cam in polar alignment scope as the module uses main scope for PA. Give it a try!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rkaczorek/astroberry-server/issues/67#issuecomment-615332956, or unsubscribe https://github.com/notifications/unsubscribe-auth/APFMZ4PDIKPKRALO3MNG3Y3RNB5R3ANCNFSM4MHLAKGQ .

rkaczorek commented 4 years ago

Good to know that there is some progress on your side. I think you will not get better performance with Raspberry Pi. It is a small computer with limited resources.

rkaczorek commented 4 years ago

Raspberry Pi Cam driver has been added. Please upgrade your system and report back.

yesyesuk commented 4 years ago

Raspberry Pi Cam driver has been added. Please upgrade your system and report back.

Does this also support the new High Quality RPi camera?

rkaczorek commented 4 years ago

Yes