hyperion-webos icon indicating copy to clipboard operation
hyperion-webos copied to clipboard

Capture FPS is half content FPS

Open EmmanuelVella opened this issue 3 years ago • 4 comments

I use the unicapture branch. I noticed that when my TV outputs 60 fps content, piccap captures at 29/30 fps. When I switch to 24 fps content, capture drops to 11/12 fps.

Hardware

LG OLED55B6V Nvidia Shield 2015 Kodi for 24 fps content

Config

{"priority":150,"backend":"auto","address":"192.168.1.254","port":19400,"width":192,"height":108,"fps":0,"vsync":false,"autostart":true,"nogui":true,"novideo":false,"uibackend":"auto"}

(tried fps 0 and 30 : no difference)

60 fps content

     0.001s [INFO main                ] Starting up...
     0.001s [INFO main                ] Running via CLI
     0.002s [INFO service_init        ] UI capture disabled
     0.002s [INFO service_init        ] Autodetecting video backend...
     0.005s [WARN unicapture_init_backend] Unable to load libvtcapture_backend.so: libvtcapture.so.1: cannot open shared object file: No such file or directory
     0.024s [INFO capture_init        ] Capture start called.
     0.100s [INFO capture_init        ] [DILE_VT] framerate divider: 1
     0.433s [INFO capture_init        ] [DILE_VT] frametime: 166098; estimated fps before divider: 6.02054
     0.765s [INFO capture_init        ] [DILE_VT] frametime: 166093; estimated fps after divider: 6.02072
     0.766s [INFO capture_init        ] [DILE_VT] vfbs: 1; planes: 1
     0.767s [INFO capture_init        ] [DILE_VT] pixelFormat: 9; width: 576; height: 108; stride: 576...
     0.772s [ ERR service_register    ] Unable to register on Luna bus: Attempted to register for a service name that already exists: org.webosbrew.piccap.service
     0.772s [WARN main                ] Service register failed: -1
     0.773s [INFO connection_loop     ] Connecting hyperion-client..
     0.774s [INFO connection_loop     ] hyperion-client connected!
     0.775s [INFO unicapture_run      ] Video capture started
     0.775s [INFO unicapture_vsync_handler] vsync thread starting...
     2.802s [INFO unicapture_run      ] Framerate: 29.566350 FPS; timings - wait: 11346us, acquire: 5305us, convert: 1968us, process; 85us, send: 2370us, release: 12297us
     2.802s [INFO unicapture_run      ]         UI: pixfmt: 0; 0x0
     2.802s [INFO unicapture_run      ]      VIDEO: pixfmt: 10; 192x108
     2.802s [INFO unicapture_run      ] CONV    UI: pixfmt: 0; 0x0
     2.802s [INFO unicapture_run      ] CONV VIDEO: pixfmt: 12; 192x108

24fps content

     0.001s [INFO main                ] Starting up...
     0.001s [INFO main                ] Running via CLI
     0.002s [INFO service_init        ] UI capture disabled
     0.002s [INFO service_init        ] Autodetecting video backend...
     0.005s [WARN unicapture_init_backend] Unable to load libvtcapture_backend.so: libvtcapture.so.1: cannot open shared object file: No such file or directory
     0.022s [INFO capture_init        ] Capture start called.
     0.191s [INFO capture_init        ] [DILE_VT] framerate divider: 1
     0.523s [INFO capture_init        ] [DILE_VT] frametime: 166091; estimated fps before divider: 6.02080
     0.856s [INFO capture_init        ] [DILE_VT] frametime: 166054; estimated fps after divider: 6.02214
     0.856s [INFO capture_init        ] [DILE_VT] vfbs: 1; planes: 1
     0.857s [INFO capture_init        ] [DILE_VT] pixelFormat: 9; width: 576; height: 108; stride: 576...
     0.860s [ ERR service_register    ] Unable to register on Luna bus: Attempted to register for a service name that already exists: org.webosbrew.piccap.service
     0.861s [WARN main                ] Service register failed: -1
     0.862s [INFO connection_loop     ] Connecting hyperion-client..
     0.862s [INFO unicapture_run      ] Video capture started
     0.862s [INFO unicapture_vsync_handler] vsync thread starting...
     0.863s [INFO connection_loop     ] hyperion-client connected!
     5.862s [INFO unicapture_run      ] Framerate: 11.999047 FPS; timings - wait: 27723us, acquire: 13972us, convert: 1449us, process; 33us, send: 1593us, release: 38673us
     5.862s [INFO unicapture_run      ]         UI: pixfmt: 0; 0x0
     5.862s [INFO unicapture_run      ]      VIDEO: pixfmt: 10; 192x108
     5.862s [INFO unicapture_run      ] CONV    UI: pixfmt: 0; 0x0
     5.862s [INFO unicapture_run      ] CONV VIDEO: pixfmt: 12; 192x108

EmmanuelVella avatar Apr 05 '22 16:04 EmmanuelVella

With latest releases, we have made some huge enhancements. Can you please check them out and reopen this issue if it still applies?

TBSniller avatar Sep 25 '22 12:09 TBSniller

Thank you for your great work ! I updated, but the issue persists. I don't know why but I can't reopen the issue, could you please do it ?

EmmanuelVella avatar Sep 25 '22 12:09 EmmanuelVella

Sorry for such a late reply - but have you tried disabling vsync and settings fps to 30? This should help on your specific platform. (it seems like either DILE_VT_WaitVsync is broken, or it's done on every frame acquire as well)

Informatic avatar Feb 24 '23 19:02 Informatic

Hello, no problem ;) I just tried to set fps to 30, the issue persists (vsync was already disabled, because if enabled it drops to ~6 fps).

60hz 24hz
image image

EmmanuelVella avatar Mar 03 '23 10:03 EmmanuelVella