TBSniller / piccap

PicCap - Hyperion Sender App | Ambilight for LG WebOS TVs
MIT License
296 stars 30 forks source link

FPS issue #13

Closed tavalin closed 2 years ago

tavalin commented 2 years ago

Hi @TBSniller - I noticed a message on the UI that limiting FPS doesn't seem to work properly.

The usage text suggests that not setting the FPS argument results in an unlimited FPS cap but my Hyperion receives 15 FPS in this scenario.

Trying to set the FPS to 60 results in a small bump to 17 FPS.

Is the issue that the CPU in the TV is unable to process the Flat Buffers packets faster than 15 Hz? Is this functionality just not ready? Or is there likely something wrong with my Hyperion?

Thanks

TBSniller commented 2 years ago

Hey, so limiting using PicCap has caused segmentation faults. Havent looked any deeper into it, thats why its not used also if set. Setting it in CLI will cause it "working", but the FPS calculation in hyperion-webos isn't real, it may differ a few fps from what hyperiond will recieve.

The FPS flag is also only for limitting the FPS and not to set them. If you set it to unlimited, it will be as fast as your TV supports. Mine goes up to ~23 FPS with libvtcapture & halgal combined.

At the moment we are really really unoptimized, I think it will change when libdile_vt is ready to use. It seems like a promising alternative.

tavalin commented 2 years ago

At the moment we are really really unoptimized, I think it will change when libdile_vt is ready to use. It seems like a promising alternative.

Is there anywhere to track the progress on this new/alternative library? I'm super keen to remove the usb grabber from my setup so I'd like to keep an eye on how this all progresses : smile

TBSniller commented 2 years ago

I think looking at JohnPauls work here https://github.com/webosbrew/hyperion-webos/pull/12 would be come a progressbar the nearst :)

Sinergetikus commented 2 years ago

How do you even check FPS? I want to check what I have on my CX, but there is no counter on both hyperion and piccap. No fps counter in hyperion with debug option or if I start hyperion-webos_libvtcapture from cli.

TBSniller commented 2 years ago

At the moment its not possible to check the FPS directly in libvtcapture. Gave up after few hours trying to get the really real FPS. You can try to get the FPS out of hyperiond. Otherwise you can edit the hyperion-webos source to output it to a MJPEG-Stream and get the FPS from ffmpeg. Notice that this FPS will differ, but you will get a idea how much it is.

tavalin commented 2 years ago

How do you even check FPS? I want to check what I have on my CX, but there is no counter on both hyperion and piccap. No fps counter in hyperion with debug option or if I start hyperion-webos_libvtcapture from cli.

I can check the received FPS in 2 ways:

  1. HyperHDR shows the FPS in the logs
  2. WLED can display the received FPS

If you can't use any of these then you'll probably have to do as @TBSniller suggested

Sinergetikus commented 2 years ago

WLED can display the received FPS

WLED report something unreliable, most of the time ~26fps, sometimes 300+fps

HyperHDR shows the FPS in the logs

In custom build probably? As there is nothing about fps in logs.

But I can confirm @tavalin observation: when you set fps limit with -f flag, it gives you a few extra fps. Hyperion preview looks smoother. Also doesn't matter what number you put there: with -f 1 it works as fast as with -f 60 and it's better than without -f Latency also lower by ~50ms with -f flag set

tavalin commented 2 years ago

I think looking at JohnPauls work here webosbrew/hyperion-webos#12 would be come a progressbar the nearst :)

Are there any instructions on how to compile this? Would be keen to test the PR

Informatic commented 2 years ago

You can get prebuilt binaries in summary of most pushed commits CI build: https://github.com/webosbrew/hyperion-webos/actions/runs/1570119948

When testing that PR/branch please report in comments in that PR.

tuxuser commented 2 years ago

Solved via unicapture branch.