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

WebOS 3.4, somehow it doesn't work ;(

Open TechnoHoschi opened this issue 4 years ago • 16 comments

Hi,

is there a way to get piccap or hyperion-webos working on webOS 3.4 (OLED E6V from 2016). Unfortunately I get the following error messages with libdile_vt and libvt. The recording resolution doesn't seem to matter.

regards an thanks for the great work Micha

` "board_type": "M16_DVB", "hardware_id": "HE_DTV_W16M_AFADABAA", "product_id": "OLED65E6V-Z", "core_os_release": "3.4.0-6107", "webos_manufacturing_version": "05.60.15",

root@LGwebOSTV:/tmp/hyperion# LD_LIBRARY_PATH=. ./hyperion-webos --address 192.168.0.150 --port 19400 --fps 60 --width 320 --height 240 --backend libvt -S 0.000s [INFO main ] Starting up... 0.018s [INFO capture_preinit ] Preinit called. Copying config.. 0.028s [INFO egl_init ] [EGL] Display, major = 1, minor = 4 0.032s [INFO egl_init ] [EGL] Surface size: 320x240 0.033s [INFO egl_init ] [EGL] init complete 0.034s [INFO capture_init ] [VT] VT_CreateVideoWindow 0.034s [INFO capture_init ] [VT] window_id=0 0.034s [INFO capture_init ] [VT] VT_AcquireVideoWindowResource 5.030s [ ERR capture_init ] [VT] VT_AcquireVideoWindowResource Failed 5.031s [ ERR capture_main ] Error! capture_init: -1 5.031s [ ERR main ] ERROR: Capture main init failed! root@LGwebOSTV:/tmp/hyperion# LD_LIBRARY_PATH=. ./hyperion-webos --address 192.168.0.150 --port 19400 --fps 60 --width 320 --height 240 --backend libdile_vt -S 0.000s [INFO main ] Starting up... 0.006s [INFO capture_preinit ] Preinit called. Copying config.. 0.006s [INFO capture_init ] Init called 0.006s [INFO capture_start ] Capture start called. KADP_DE_SetDHDRInit : Done. 0.068s [WARN capture_start ] DISPLAY dump location failed, attempting SCALER... 0.201s [INFO capture_start ] [DILE_VT] framerate divider: 1 0.301s [INFO capture_start ] [DILE_VT] frametime: 79996; estimated fps before divider: 12.50063 0.341s [INFO capture_start ] [DILE_VT] frametime: 19996; estimated fps after divider: 50.01000 0.341s [INFO capture_start ] [DILE_VT] vfbs: 3; planes: 2 0.342s [INFO capture_start ] [DILE_VT] pixelFormat: 4; width: 320; height: 240; stride: 1920... 0.392s [ ERR capture_main ] Error! capture_start. Code: -12 0.393s [ ERR main ] ERROR: Capture main init failed! root@LGwebOSTV:/tmp/hyperion# `

TechnoHoschi avatar Jan 27 '22 12:01 TechnoHoschi

This has been fixed for libdile_vt in #39 - https://github.com/webosbrew/hyperion-webos/commit/092b13c35c74e3a6130cc3f8c9e189afa1678c16 You can try that development build.

Informatic avatar Jan 27 '22 12:01 Informatic

with

https://github.com/webosbrew/hyperion-webos/actions/runs/1741885843 and https://github.com/webosbrew/hyperion-webos/actions/runs/1747964005

Unfortunately it doesn't work, I get the same error message .

TechnoHoschi avatar Jan 27 '22 14:01 TechnoHoschi

Are you sure you are using correct binaries and running with --backend libdile_vt option?

Informatic avatar Jan 27 '22 15:01 Informatic

yes ;)

root@LGwebOSTV:/tmp/hyperion# ls -e total 2340 -rwxr-xr-x 1 root root 281712 Tue Jan 25 22:16:06 2022 hyperion-webos -rwxr-xr-x 1 root root 1036116 Tue Jan 25 22:16:06 2022 libdile_vt_backend.so -rwxr-xr-x 1 root root 33192 Tue Jan 25 22:16:08 2022 libvt_backend.so -rwxr-xr-x 1 root root 1039612 Tue Jan 25 22:16:08 2022 libvtcapture_backend.so root@LGwebOSTV:/tmp/hyperion# LD_LIBRARY_PATH=. ./hyperion-webos --address 192.168.0.150 --port 19400 --width 320 --height 240 --backend libdile_vt -S 0.001s [INFO main ] Starting up... 0.006s [INFO capture_preinit ] Preinit called. Copying config.. 0.006s [INFO capture_init ] Init called 0.006s [INFO capture_start ] Capture start called. KADP_DE_SetDHDRInit : Done. 0.069s [WARN capture_start ] DISPLAY dump location failed, attempting SCALER... 0.212s [INFO capture_start ] [DILE_VT] framerate divider: 1 0.245s [INFO capture_start ] [DILE_VT] frametime: 16664; estimated fps before divider: 60.00960 0.278s [INFO capture_start ] [DILE_VT] frametime: 16645; estimated fps after divider: 60.07810 0.278s [INFO capture_start ] [DILE_VT] vfbs: 3; planes: 2 0.279s [INFO capture_start ] [DILE_VT] pixelFormat: 4; width: 320; height: 240; stride: 1920... 0.322s [ ERR capture_main ] Error! capture_start. Code: -12 0.323s [ ERR main ] ERROR: Capture main init failed! root@LGwebOSTV:/tmp/hyperion#

root@LGwebOSTV:/tmp/hyperion# ldconfig -p | grep libdile_vt libdile_vt.so.0 (libc6) => /usr/lib/libdile_vt.so.0 root@LGwebOSTV:/tmp/hyperion# ldconfig -p | grep libvt libvt.so.1 (libc6) => /usr/lib/libvt.so.1 root@LGwebOSTV:/tmp/hyperion#

TechnoHoschi avatar Jan 27 '22 15:01 TechnoHoschi

Ah indeed, sorry. I totally missed it's the latest version. (the error we were getting on the same platform on a different software was -2...) Can you please try running this with --verbose flag? This should emit some more logs. Also - if you want to try rebuilding and testing this yourself, you can try commenting out that return and see what happens: https://github.com/webosbrew/hyperion-webos/blob/092b13c35c74e3a6130cc3f8c9e189afa1678c16/src/backends/libdile_vt.c#L217-L219 - there's a chance they just return an error even though they are still going to feed frames as we expect them to.

Also please keep logs wrapped in ```

Informatic avatar Jan 27 '22 15:01 Informatic

root@LGwebOSTV:/tmp/hyperion# LD_LIBRARY_PATH=. ./hyperion-webos --address 192.168.0.150 --port 19400 --width 320 --height 240 --backend libdile_vt -S --verbos e 0.001s [INFO main ] Starting up... 0.001s [ DBG parse_options ] Finished parsing arguments 0.001s [ DBG capture_main ] Using these values: Address: 192.168.0.150 | Port: 19400 | Width: 320 | Height: 240 | FPS: 0 | Backend: libdile_vt | NoVideo: 0 | NoGUI: 0 | Autostart: 0 0.001s [ DBG capture_main ] Detecting backend... 0.001s [ DBG import_backend_library] Full library path: /tmp/hyperion/libdile_vt_backend.so 0.006s [ DBG capture_main ] Backend preinit... 0.006s [INFO capture_preinit ] Preinit called. Copying config.. 0.006s [ DBG capture_main ] Initiating capture... 0.006s [INFO capture_init ] Init called 0.006s [ DBG capture_main ] Starting capture.. 0.006s [INFO capture_start ] Capture start called. KADP_DE_SetDHDRInit : Done. 0.069s [ DBG capture_start ] Got DILE_VT context! 0.069s [ DBG capture_start ] supportScaleUp: 1; (1920x1080) 0.069s [ DBG capture_start ] supportScaleDown: 1; (320x240) 0.069s [ DBG capture_start ] maxResolution: 1920x1080 0.069s [ DBG capture_start ] input deinterlace: 0; display deinterlace: 1 0.069s [WARN capture_start ] DISPLAY dump location failed, attempting SCALER... 0.371s [INFO capture_start ] [DILE_VT] framerate divider: 1 0.451s [INFO capture_start ] [DILE_VT] frametime: 39991; estimated fps before divider: 25.00563 0.566s [INFO capture_start ] [DILE_VT] frametime: 95320; estimated fps after divider: 10.49098 0.567s [INFO capture_start ] [DILE_VT] vfbs: 3; planes: 2 0.567s [INFO capture_start ] [DILE_VT] pixelFormat: 4; width: 320; height: 240; stride: 1920... 0.567s [ DBG capture_start ] [DILE_VT] vfb[0][0] = 0x65198000 0.567s [ DBG capture_start ] [DILE_VT] vfb[0][1] = 0x65393000 0.567s [ DBG capture_start ] [DILE_VT] vfb[1][0] = 0x6558e000 0.567s [ DBG capture_start ] [DILE_VT] vfb[1][1] = 0x65789000 0.567s [ DBG capture_start ] [DILE_VT] vfb[2][0] = 0x65984000 0.567s [ DBG capture_start ] [DILE_VT] vfb[2][1] = 0x65b7f000 0.617s [ ERR capture_main ] Error! capture_start. Code: -12 0.617s [ DBG cleanup ] Starting cleanup... isRunning: 0 0.617s [ DBG cleanup ] Destroying hyperion-client... 0.617s [ DBG cleanup ] Cleanup capture within library... 0.618s [ DBG cleanup ] Cleanup finished. 0.618s [ ERR main ] ERROR: Capture main init failed! root@LGwebOSTV:/tmp/hyperion#

TechnoHoschi avatar Jan 27 '22 15:01 TechnoHoschi

Wonder if some different resolutions, like 1920x1080 could work (of course this will be too big for transfer over the network, but still worth a try - especially that we are starting to rework frame capture/processing flow, and will probably add post-capture downscaling as an option...

Informatic avatar Jan 27 '22 15:01 Informatic

"Also - if you want to try rebuilding and testing this yourself, you can try commenting out that return and see what happens: "

Unfortunately, that's a bit beyond my intellectual horizon. ;)

with "--width 1920 --height 1080" no difference

TechnoHoschi avatar Jan 27 '22 16:01 TechnoHoschi

Sure. We can try debugging this over the weekend.

Informatic avatar Jan 27 '22 16:01 Informatic

Great, if there's a new build I'll post the logs.

TechnoHoschi avatar Jan 27 '22 16:01 TechnoHoschi

I tested some binaries from your today's runs. Unfortunately without success, but this time other errors. Bug reports from Build #106 are attached.

root@LGwebOSTV:/tmp/hyperion# LD_LIBRARY_PATH=. ./hyperion-webos --address 192.168.0.150 --port 19400 --backend libdile_vt -S
     0.001s [INFO main                ] Starting up...
     0.001s [ DBG main                ] Getting basepath..
     0.001s [ DBG get_starting_path   ] Full path is: /tmp/hyperion/
     0.001s [ DBG set_default         ] Setting default settings to runtime...
     0.001s [ DBG set_default         ] Finished setting default.
     0.001s [ DBG parse_options       ] Finished parsing arguments
     0.001s [ DBG capture_main        ] Using these values: Address: 192.168.0.150 | Port: 19400 | Width: 360 | Height: 180 | FPS: 0 | Backend: libdile_vt | NoVideo: 0 | NoGUI: 0 | Autostart: 0
     0.001s [ DBG capture_main        ] Detecting backend...
     0.001s [ DBG import_backend_library] Full library path: /tmp/hyperion/libdile_vt_backend.so
     0.005s [ ERR import_backend_library] Error! dlsym failed, msg: /tmp/hyperion/libdile_vt_backend.so: undefined symbol: capture_preinit
     0.006s [ ERR capture_main        ] Error! detect_backend.
     0.006s [ DBG cleanup             ] Starting cleanup... isRunning: 0
     0.006s [ DBG cleanup             ] Destroying hyperion-client...
     0.006s [ DBG cleanup             ] Cleanup finished.
     0.006s [ ERR main                ] ERROR: Capture main init failed!



root@LGwebOSTV:/tmp/hyperion# LD_LIBRARY_PATH=. ./hyperion-webos --address 192.168.0.150 --port 19400 --backend libvt -S
     0.001s [INFO main                ] Starting up...
     0.001s [ DBG main                ] Getting basepath..
     0.001s [ DBG get_starting_path   ] Full path is: /tmp/hyperion/
     0.001s [ DBG set_default         ] Setting default settings to runtime...
     0.001s [ DBG set_default         ] Finished setting default.
     0.001s [ DBG parse_options       ] Finished parsing arguments
     0.001s [ DBG capture_main        ] Using these values: Address: 192.168.0.150 | Port: 19400 | Width: 360 | Height: 180 | FPS: 0 | Backend: libvt | NoVideo: 0 | NoGUI: 0 | Autostart: 0
     0.001s [ DBG capture_main        ] Detecting backend...
     0.001s [ DBG import_backend_library] Full library path: /tmp/hyperion/libvt_backend.so
     0.018s [ DBG capture_main        ] Backend preinit...
     0.019s [INFO capture_preinit     ] Preinit called. Copying config..
     0.030s [INFO egl_init            ] [EGL] Display, major = 1, minor = 4
     0.034s [INFO egl_init            ] [EGL] Surface size: 360x180
     0.034s [INFO egl_init            ] [EGL] init complete
     0.034s [ DBG capture_main        ] Initiating capture...
     0.036s [INFO capture_init        ] [VT] VT_CreateVideoWindow
     0.036s [INFO capture_init        ] [VT] window_id=0
     0.036s [INFO capture_init        ] [VT] VT_AcquireVideoWindowResource
     5.035s [ ERR capture_init        ] [VT] VT_AcquireVideoWindowResource Failed
     5.035s [ ERR capture_main        ] Error! capture_init: -1
     5.035s [ DBG cleanup             ] Starting cleanup... isRunning: 0
     5.035s [ DBG cleanup             ] Destroying hyperion-client...
     5.035s [ DBG cleanup             ] Cleanup capture within library...
     5.035s [ DBG cleanup             ] Cleanup finished.
     5.035s [ ERR main                ] ERROR: Capture main init failed!
root@LGwebOSTV:/tmp/hyperion#

TechnoHoschi avatar Feb 06 '22 12:02 TechnoHoschi

That one is an incompatible work in progress branch, sorry.

Informatic avatar Feb 06 '22 12:02 Informatic

FYI #45 is the same platform - current master branch will probably work for you now, with the exception of the cropping issue the author mentioned. We'll integrate the fixes they mentioned in the last comment soon.

Informatic avatar Feb 08 '22 08:02 Informatic

I've already read the post and don't understand why it doesn't work for me. The only difference is WebOS and firmware minor versions. Since I'm too stupid to compile the master by myself, I tested your workflows 93, 94!, 99, 100, 101, 102 and 103. I always get the same error messages. I had already tested the binary from Build #94, which was probably intended to address the M16_DVB problem, without success.

libvt: VT_AcquireVideoWindowResource Failed libdile: capture_start. Code: -2

ot: is there perhaps some information somewhere on how I can compile the whole thing myself? would https://github.com/openlgtv/buildroot-nc4 be the way to go or do I reach the goal with cmake and the informations from https://github.com/webosbrew/hyperion-webos/blob/main/.github/workflows/build.yml.

TechnoHoschi avatar Feb 12 '22 12:02 TechnoHoschi

Having the same exact problem, same exact model... any fix yet?

boliito avatar May 02 '22 20:05 boliito

I think I have a similar issue not 100% sure however this is the error I get when I run the same command as the author. However my LED's just flash non stop.

"board_type": "M16_DVB",
"hardware_id": "HE_DTV_W16M_AFADABAA",
"product_id": "OLED65C6T-T",
"core_os_release": "3.4.0-6107",
"webos_manufacturing_version": "05.60.15",
root@LGWebOS:/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service# ./hyperion-webos --address 127.0.0.1 --port 19400 --fps 25 --width 192 --height 96 --backend libvt -S
     0.001s [INFO main                ] Starting up...
     0.001s [INFO main                ] Running via CLI
     0.001s [INFO service_init        ] Autodetecting UI backend...
[001449.366241:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x5e338

[001449.366369:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x5e768

[001449.366411:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x5fc58

[001449.366453:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x60088

[001449.366502:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x5f3f8

[001449.366543:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x5f828

[001449.366597:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x60d18

[001449.366639:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x61148

[001449.366706:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x60d18

[001449.366784:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x61148

[001449.366829:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x5e338

[001449.366870:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x5e768

[001449.366919:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x61578

[001449.366962:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x619a8

[001449.367002:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x5fc58

[001449.367058:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x60088

[001449.367099:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x61578

[001449.367139:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x619a8

[001449.367179:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x61578

[001449.367218:hyperion-webos->hyperion-webos] <warning> GM_TEMPLATE_HASH_Insert : node already found..ptr = 0x619a8

[001449.367256:hyperion-webos->hyperion-webos] [_GM_UseGFXHWDirectly][905] _GM_UseGFXHWDirectly OK

     0.027s [ ERR unicapture_init_backend] Error! dlsym failed, msg: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/libvt_backend.so: undefined symbol: capture_acquire_frame
     0.029s [ ERR service_register    ] Unable to register on Luna bus: Attempted to register for a service name that already exists: org.webosbrew.piccap.service
     0.029s [WARN main                ] Service register failed: -1
     0.030s [INFO connection_loop     ] Connecting hyperion-client..
     0.030s [INFO unicapture_run      ] UI capture started
     0.030s [INFO unicapture_vsync_handler] vsync thread starting...
     0.031s [INFO connection_loop     ] hyperion-client connected!
     2.439s [INFO unicapture_run      ] Framerate: 24.908627 FPS; timings - wait: 36398us, acquire: 1805us, convert: 1681us, process; 28us, send: 285us, release: 1us
     2.439s [INFO unicapture_run      ]         UI: pixfmt: 11; 192x96
     2.439s [INFO unicapture_run      ]      VIDEO: pixfmt: 0; 0x0
     2.439s [INFO unicapture_run      ] CONV    UI: pixfmt: 12; 192x96
     2.439s [INFO unicapture_run      ] CONV VIDEO: pixfmt: 0; 0x0
^X^C     3.113s [INFO int_handler         ] SIGINT detected, stopping...
     3.115s [INFO connection_loop     ] Ending connection loop
     3.120s [INFO unicapture_run      ] Shutting down...
     3.156s [INFO unicapture_vsync_handler] vsync thread finished

root@LGWebOS:/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service# ./hyperion-webos -c config.json
     0.000s [INFO main                ] Starting up...
     0.001s [INFO main                ] Running via CLI
     0.001s [INFO service_init        ] UI capture disabled
     0.001s [INFO service_init        ] Autodetecting video backend...
     0.002s [WARN unicapture_init_backend] Unable to load libvtcapture_backend.so: libvtcapture.so.1: cannot open shared object file: No such file or directory
     0.005s [INFO capture_init        ] Capture start called.
KADP_DE_SetDHDRInit : Done.
     0.054s [ ERR service_register    ] Unable to register on Luna bus: Attempted to register for a service name that already exists: org.webosbrew.piccap.service
     0.054s [WARN main                ] Service register failed: -1
     0.054s [INFO connection_loop     ] Connecting hyperion-client..
     0.055s [INFO unicapture_vsync_handler] vsync thread starting...
     0.056s [INFO connection_loop     ] hyperion-client connected!
     0.095s [WARN unicapture_run      ] No valid frame to send...
Screenshot_1

jimmyleet avatar May 07 '22 05:05 jimmyleet

With latest releases, we now support webOS 3.4 and above.

TBSniller avatar Sep 25 '22 12:09 TBSniller