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

Video is really choppy with high resolution cameras #35

Open
AndrewVos opened this issue Jun 28, 2017 · 13 comments
Open

Video is really choppy with high resolution cameras #35

AndrewVos opened this issue Jun 28, 2017 · 13 comments
Labels
Priority: Medium Should be addressed when time allows Status: Confirmed Verified by someone other than the reporter

Comments

@AndrewVos
Copy link

AndrewVos commented Jun 28, 2017

Steps to reproduce the issue

  1. Plug in a Logitech C920

Expected behavior

Video to not be really slow.

System information

  • elementary OS 0.4.1 Loki:

I also tried installing guvcview from package and from the ppa on sourceforge, no difference. Also there are some mentions online of changing Auto white balance in guvcview, but this didn't change anything.

In cheese and in Chromium there is no problem. Audio and video works as expected.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@davidak
Copy link

davidak commented Aug 23, 2017

I have the same issue on all Notebooks internal webcams.

  • MacBook Pro 10.2
  • Dell Latitude E5470

Way better quality in Wire (messanger) and Chromium.

@ghost
Copy link

ghost commented Sep 8, 2017

+1, Logitech C920, video is very slow
elementary OS 0.4.1 Loki stable

@matzipan
Copy link

matzipan commented Sep 9, 2017

Welp, since you already have the hardware, it would be very useful if you could have a go at trying to fix the issue.

If you need any help figuring out the issue, just ask.

@ghost
Copy link

ghost commented Sep 9, 2017

Sorry, I'm not a developer yet.

@artemanufrij
Copy link
Contributor

@AndrewVos could you test #44 please?

@AndrewVos
Copy link
Author

Sorry @artemanufrij I don't run Elementary anymore

@artemanufrij
Copy link
Contributor

@davidak could you test it please?

@davidak
Copy link

davidak commented Mar 30, 2018

@artemanufrij i also don't run elementary OS and don't have the devices anymore.

Are you changing the resolution of the preview or also the final recording? The latter would be bad.

@ghost
Copy link

ghost commented Nov 3, 2018

I'd like to request this issue be reopened. I have a Logitech C920 and experience this issue myself. I'd be willing to do additional testing and provide logs. The issue is similar to the original post with the only exception being that other applications like GUVCVIEW working as expected. (My guess based on what I've seen in applications like OBS, is that the app is pulling in the highest possible resolution from the camera, which is not good as that resolution runs at 2-5FPS max. Possibly having options to change the resolution in-app may help.)

@cassidyjames
Copy link
Contributor

@Schyken this issue was never closed.

While investigating this, I found that Cheese (and likely other apps) use a lower resolution by default which does not cause problems. In Cheese, choosing the camera's highest resolution produces similarly choppy and freezing results. So I think the resolution (heh) to this issue would be to cap out on a smaller resolution, perhaps checking what Cheese is doing.

@cassidyjames cassidyjames added Priority: Medium Should be addressed when time allows Status: Confirmed Verified by someone other than the reporter labels Dec 21, 2018
@cassidyjames cassidyjames changed the title Video is really choppy with Logitech C920 Video is really choppy with high resolution cameras Dec 21, 2018
@cassidyjames cassidyjames pinned this issue Dec 21, 2018
@ghost
Copy link

ghost commented Dec 21, 2018

I apologize @cassidyjames, I must have read that wrong (I still don't fully understand the way GitHub threads work)

Thanks quite a bit for the response, I will try and look deeper into it and hopefully be able to provide (hopefully) useful feedback.

@ghost
Copy link

ghost commented Apr 24, 2019

Hi, new Elementary OS user here. I'm using the camera app in an old Dell Inspiron 3442 (2014) and I just got this problem.

My guess based on what I've seen in applications like OBS, is that the app is pulling in the highest possible resolution from the camera, which is not good as that resolution runs at 2-5FPS max. Possibly having options to change the resolution in-app may help.

This comment made by @Schyken seems a good reason to get slow recording on low end machines like mine.

So, I changed the capture resolution to a lower one (320x240) in the source code here:

this.set_default_size (320, 240);
this.set_size_request (320, 240);

and here:

camera_view.get_camera_device ().set_capture_resolution (320, 240);

And now video recording works smoothly! 🎉

Before:
Screenshot from 2019-04-23 22-59-03

After:
Screenshot from 2019-04-23 22-57-53

A good solution would be a menu to select camera resolutions and framerates.

By example, my old laptop webcam res. looks like this:

$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'YUYV'
	Name        : YUYV 4:2:2
		Size: Discrete 640x480
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 160x120
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 320x180
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 320x240
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 424x240
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 640x360
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 848x480
			Interval: Discrete 0.050s (20.000 fps)
		Size: Discrete 960x540
			Interval: Discrete 0.067s (15.000 fps)
		Size: Discrete 1280x720
			Interval: Discrete 0.100s (10.000 fps)

	Index       : 1
	Type        : Video Capture
	Pixel Format: 'MJPG' (compressed)
	Name        : Motion-JPEG
		Size: Discrete 848x480
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 960x540
			Interval: Discrete 0.033s (30.000 fps)
		Size: Discrete 1280x720
			Interval: Discrete 0.033s (30.000 fps)

BTW, the build and install process of this io.elementary.camera app was straightforward,

I just followed the README.md Thank you so much!

@cassidyjames
Copy link
Contributor

@tintou's suggestion is:

We could provide choice while still be clever and default to the highest resolution >=24fps

Which I think I agree with. It's clear from testing a wide variety of hardware that there are so many different issues with resolution and framerate, so maybe offering a (smart) choice would widen the hardware compatibility the most.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Should be addressed when time allows Status: Confirmed Verified by someone other than the reporter
Projects
Status: To do
Development

No branches or pull requests

5 participants