ChrisAJS / lgx2userspace

This is a Linux userspace driver for the AverMedia LGX2 (GC551) and AverMedia LGX (GC550)
MIT License
26 stars 5 forks source link

New feature No-Video mode #12

Closed Nama closed 2 years ago

Nama commented 2 years ago

Hi, I used the LGX2 since 2018 on Windows and started to use Linux mainly and for convenience I want the LGX2 to work on Linux. (And found this, thank you!) A lot of times I use the capture just for viewing or even just for the audio. The normal output is pretty fine for this, but my notebook has performance issues regarding the LGX2. Glitchy frames and cracked sound. Watch the video.

https://user-images.githubusercontent.com/2297270/183318143-5522d5c6-a9b8-41ac-9d5b-2f3583ac8b10.mp4

On the CPU this tool adds like 5% load. On the GPU this tool adds like 25% load. And my CPU temperature wents up to 90°C. (Even with cooling down to 80°C the performance is not better.) I compared the loads with firefox while playing youtube videos. On the CPU firefox adds like 10% load. On the GPU firefox adds like 45% load. And thats whats confusing me. The CPU temperature doesn't goes above 70°C. (GPU is always max'd at 60°C.)

So I fear, that there are some optimization potential here. Also weird, that my CPU (and GPU) is the AMD Ryzen 7 5875U. So it should have enough power for this task.

Coming to the point now :D So I would appreciate a mode, where the video is disabled and only audio is handled. Or some cheap downscaling option which is easier to do than displaying the raw frames.

I also tried @baoulettes fork, which has options to downscale the window and frames, but that didn't help (much?). (Also mentioning them, since issues are disabled on that fork.)

Thank you for the work on this!

ChrisAJS commented 2 years ago

No video option sounds like an easy win, I'll get that in ASAP. There is likely some optimisation that can take place regarding cpu use also, but I've not looked into the profiling of performance at all. I'm playing around with a few things now to help streamline the experience so with any luck I'll get around to using just what's needed in regards to CPU use.

ChrisAJS commented 2 years ago

I squeezed no video (and no audio just for symmetry) into https://github.com/ChrisAJS/lgx2userspace/pull/10

Let me know if this helps at all!

Nama commented 2 years ago

Works superb! No sound cracking and normal temperatures in sound only.

Thaaaaank you!

There seem to be new issues. Clicking "Stop" when its stopped already crashes the application. If the bootstraping is skipped, I see only one glitched and frozen frame. GTK window doesn't resizes to the input resolution.

ChrisAJS commented 2 years ago

Apologies! The gtk application is proof of concept right now (boo) I'm working on getting it to a point where I'll be able to recommend it as the go to, but for now it is really unperformant as the rendering of the image involves little to no hardware acceleration.

Nama commented 2 years ago

Don't need to apologize! Just wanted to let you know.

Thank you!