ereyes01 / fishcam

Live video stream of your aquarium with a raspberry pi and a Logitech c920
GNU General Public License v2.0
25 stars 3 forks source link

Lag and artifacts #8

Open stevesrc opened 9 years ago

stevesrc commented 9 years ago

Hi,

I followed the instructions without issue. I'm using the server & the capture running on one Pi, although in future I may stream to another internet facing Pi in the home & use that as the internet facing machine. I'd like to embed the video into a password protected webpage (BarracudaDrive).

My issues are that the picture is clear when nothing is moving but if something moves such as a person walking across the field of view then there are a many coloured artifacts left behind the person & the picture does not clear up until a few more frames have been received by the browser. There is also a 4-5 second lag on the video seen in the browser compared to reality. This is over a wired, mostly Gb company LAN.

Any thoughts on improving the performance?

Cheers, Steve

ereyes01 commented 9 years ago

I don't think your issue is performance, but rather one of the many USB driver issues that plagued some versions of the Raspbian distro. I encountered these issues late 2013 on my Pi, and they manifested themselves in the way that you describe.

Let me know how that goes.

ereyes01 commented 9 years ago

To give you some context about the bandwidth, my Pi streams over a 54Mbps wifi and seems to use about 3Mbps consistently with good performance and picture quality.

Another thing you can do to is to cut out the network altogether and to use gstreamer to record from your c920 to a local file on your Pi:

./capture -o | gst-launch -v -e filesrc location=/dev/fd/0 ! legacyh264parse ! queue ! queue ! filesink location=./video.h264

... or something similar to that (I can't test this command right now).

Then try to watch the video on something like vlc to see how it looks. If your USB driver has problems, this file will have similar artifacts.