Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera lags for few seconds #44

Open
sekulicb opened this issue Sep 4, 2020 · 4 comments
Open

Camera lags for few seconds #44

sekulicb opened this issue Sep 4, 2020 · 4 comments

Comments

@sekulicb
Copy link

sekulicb commented Sep 4, 2020

Hi. I have followed samples for creating Camera capture WPF application. Everything works well, but the camera feed lags for couple of seconds which to me is a big no no since we need it for capturing snapshots. What I mean by lag, is when you move for example something in front of the camera, the camera shows the movement but delayed for ~ 2 seconds. Any help on the matter ?

Thanks

@JohnSWatson
Copy link

Sorry I don’t use WPF so can’t offer any help.
Have you tried writing the time to the console before and after capturing a frame to determine if the delay is in the frame capture.

@andrewkirillov
Copy link
Owner

Try recently added PreferJpegEncoding property - it may help by enabling JPEG compression and so reduce amount of data transferred over USB bus.

See here
https://github.com/andrewkirillov/AForge.NET/blob/master/Sources/Video.DirectShow/VideoCaptureDevice.cs#L232

@sekulicb
Copy link
Author

sekulicb commented Sep 5, 2020

Hi @JohnSWatson no I haven't. I will try but if the delay is in the frame capture how that can be resolved?

@andrewkirillov How to set this property? Looking at the object of type VideoCaptureDevice but I don't see it?

image

@andrewkirillov
Copy link
Owner

You have to checkout the latest code from github and build it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants