TBSniller / piccap

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

capture running false #2

Closed khiles closed 2 years ago

khiles commented 2 years ago

i have Hyperion configured to run on my home server (192.168.1.12:19400) and i have the webos client pointed to that but it shows capture running false

i'm not sure what im doing wrong to get it to activate

TBSniller commented 2 years ago

Hey, what WebOS Version do you have? Are you using libvt or libvtcapture? What does your hyperion server say?

khiles commented 2 years ago

hey sorry forgot to include them

what WebOS Version do you have? 4.9.0 - 53804 Are you using libvt or libvtcapture? tried both What does your hyperion server say? does not seem to detect it at all

TBSniller commented 2 years ago

Okay, can you please check which version your TV is using? You can see it at the permission status. If it says "not needed" your TV uses libvt, if it says "needed" or "enforced" your TV uses libvtcapture Depending on which version your TV use, put the output of the following command in here please: libvt: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvt -a HYPERION_IP or libvtcapture: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture -a HYPERION_IP

khiles commented 2 years ago

Okay, can you please check which version your TV is using? my tv displays not needed

[EGL] Display, major = 1, minor = 4 [EGL] Surface size: 192x108 [EGL] init complete [VT] VT_CreateVideoWindow [VT] window_id=0 [VT] VT_AcquireVideoWindowResource [VT] resource_id=85 [VT] VT_CreateContext [VT] context_id=1245856 [VT] VT_SetTextureResolution [VT] VT_SetTextureSourceRegion [VT] VT_SetTextureSourceLocation [VT] VT_RegisterEventHandler Start connection loop

causes top of tv to flicker a little bit as well

khiles commented 2 years ago

this is log from Hyperion server

2021-10-30T14:01:54.133Z [hyperiond WEBSOCKET] (DEBUG) (WebSocketClient.cpp:215:sendClose()) send close: 1000 2021-10-30T14:01:54.409Z [hyperiond WEBSOCKET] (DEBUG) (WebSocketClient.cpp:30:WebSocketClient()) New connection from ::ffff:192.168.1.192 2021-10-30T14:01:54.410Z [hyperiond WEBSOCKET] (DEBUG) (JsonAPI.cpp:122:handleInstanceSwitch()) Client '::ffff:192.168.1.192' switch to Hyperion instance 0 2021-10-30T14:01:54.597Z [hyperiond WEBSOCKET] (DEBUG) (JsonAPI.cpp:1058:handleLoggingCommand()) log streaming activated for client ::ffff:192.168.1.192 2021-10-30T14:02:48.614Z [hyperiond XCB] (DEBUG) (XcbGrabber.cpp:204:open()) Cannot open display, error 5 2021-10-30T14:21:26.763Z [hyperiond FLATBUFSERVER] (DEBUG) (FlatBufferServer.cpp:74:newConnection()) New connection from ::ffff:192.168.1.82 2021-10-30T14:21:26.951Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:165:registerInput()) Register new input 'webos@::ffff:192.168.1.82/FLATBUFSERVER' with priority 150 as inactive 2021-10-30T14:21:27.216Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:271:setInputImage()) Priority 150 is now active 2021-10-30T14:21:27.216Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:374:setCurrentTime()) Set visible priority to 150 2021-10-30T14:21:27.217Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:559:handlePriorityChangedLedDevice()) priority[150], previousPriority[255] 2021-10-30T14:21:27.217Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:569:handlePriorityChangedLedDevice()) new source available -> switch LED-Device on 2021-10-30T14:21:39.736Z [hyperiond FLATBUFSERVER] (DEBUG) (FlatBufferClient.cpp:70:disconnected()) Socket Closed 2021-10-30T14:21:39.736Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:292:clearInput()) Removed source priority 150 2021-10-30T14:21:39.736Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:374:setCurrentTime()) Set visible priority to 255 2021-10-30T14:21:39.737Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:559:handlePriorityChangedLedDevice()) priority[255], previousPriority[150] 2021-10-30T14:21:39.737Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:562:handlePriorityChangedLedDevice()) No source left -> switch LED-Device off 2021-10-30T14:23:28.268Z [hyperiond FLATBUFSERVER] (DEBUG) (FlatBufferServer.cpp:74:newConnection()) New connection from ::ffff:192.168.1.82 2021-10-30T14:23:28.308Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:165:registerInput()) Register new input 'webos@::ffff:192.168.1.82/FLATBUFSERVER' with priority 150 as inactive 2021-10-30T14:23:28.386Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:271:setInputImage()) Priority 150 is now active 2021-10-30T14:23:28.386Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:374:setCurrentTime()) Set visible priority to 150 2021-10-30T14:23:28.386Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:559:handlePriorityChangedLedDevice()) priority[150], previousPriority[255] 2021-10-30T14:23:28.386Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:569:handlePriorityChangedLedDevice()) new source available -> switch LED-Device on 2021-10-30T14:23:43.288Z [hyperiond FLATBUFSERVER] (DEBUG) (FlatBufferClient.cpp:70:disconnected()) Socket Closed 2021-10-30T14:23:43.289Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:292:clearInput()) Removed source priority 150 2021-10-30T14:23:43.289Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:374:setCurrentTime()) Set visible priority to 255 2021-10-30T14:23:43.289Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:559:handlePriorityChangedLedDevice()) priority[255], previousPriority[150] 2021-10-30T14:23:43.289Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:562:handlePriorityChangedLedDevice()) No source left -> switch LED-Device off 2021-10-30T14:23:57.472Z [hyperiond WEBSOCKET] (DEBUG) (JsonAPI.cpp:1067:handleLoggingCommand()) log streaming deactivated for client ::ffff:192.168.1.192 2021-10-30T14:23:57.472Z [hyperiond WEBSOCKET] (DEBUG) (JsonAPI.cpp:1058:handleLoggingCommand()) log streaming activated for client ::ffff:192.168.1.192 2021-10-30T14:24:23.730Z [hyperiond XCB] (DEBUG) (XcbGrabber.cpp:204:open()) Cannot open display, error 5 2021-10-30T14:24:31.832Z [hyperiond FLATBUFSERVER] (DEBUG) (FlatBufferServer.cpp:74:newConnection()) New connection from ::ffff:192.168.1.82 2021-10-30T14:24:31.852Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:165:registerInput()) Register new input 'webos@::ffff:192.168.1.82/FLATBUFSERVER' with priority 150 as inactive 2021-10-30T14:24:31.918Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:271:setInputImage()) Priority 150 is now active 2021-10-30T14:24:31.918Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:374:setCurrentTime()) Set visible priority to 150 2021-10-30T14:24:31.918Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:559:handlePriorityChangedLedDevice()) priority[150], previousPriority[255] 2021-10-30T14:24:31.918Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:569:handlePriorityChangedLedDevice()) new source available -> switch LED-Device on 2021-10-30T14:24:46.191Z [hyperiond XCB] (DEBUG) (XcbGrabber.cpp:204:open()) Previous line repeats 1 times 2021-10-30T14:24:46.191Z [hyperiond WEBSOCKET] (DEBUG) (JsonAPI.cpp:1067:handleLoggingCommand()) log streaming deactivated for client ::ffff:192.168.1.192 2021-10-30T14:24:46.191Z [hyperiond WEBSOCKET] (DEBUG) (JsonAPI.cpp:1058:handleLoggingCommand()) log streaming activated for client ::ffff:192.168.1.192

then closing it via terminal window

2021-10-30T14:26:05.361Z [hyperiond FLATBUFSERVER] (DEBUG) (FlatBufferClient.cpp:70:disconnected()) Socket Closed 2021-10-30T14:26:05.362Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:292:clearInput()) Removed source priority 150 2021-10-30T14:26:05.362Z [hyperiond HYPERION] (DEBUG) (PriorityMuxer.cpp:374:setCurrentTime()) Set visible priority to 255 2021-10-30T14:26:05.362Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:559:handlePriorityChangedLedDevice()) priority[255], previousPriority[150] 2021-10-30T14:26:05.362Z [hyperiond HYPERION] (DEBUG) (Hyperion.cpp:562:handlePriorityChangedLedDevice()) No source left -> switch LED-Device off

TBSniller commented 2 years ago

Okay, can you please check which version your TV is using? my tv displays not needed

[EGL] Display, major = 1, minor = 4 [EGL] Surface size: 192x108 [EGL] init complete [VT] VT_CreateVideoWindow [VT] window_id=0 [VT] VT_AcquireVideoWindowResource [VT] resource_id=85 [VT] VT_CreateContext [VT] context_id=1245856 [VT] VT_SetTextureResolution [VT] VT_SetTextureSourceRegion [VT] VT_SetTextureSourceLocation [VT] VT_RegisterEventHandler Start connection loop

causes top of tv to flicker a little bit as well

This looks good, it should work I guess... The flickering is a known issue with libvt, its "normal". Are you playing any video while capturing?

khiles commented 2 years ago

ive tried on multiple sources from hdmi to bulit in apps and always shows capture running false

when i run:

/media/developer/apps/usr/palm/services/org.webosbrew.piccap.s ervice/hyperion-webos_libvt -a 192.168.1.12

and check back in the app it shows capture running true but obviously with flicker i cant do anything

TBSniller commented 2 years ago

That's for sure right. You have to do a full reboot to get rid of the flickering Maybe you can try the command again after reboot

mrhackcz commented 2 years ago

Same problem here :( LG 70UM7100PLA (2019 model) WebOS 5.00.02 Firmware 4.9.0-53902 LibVT

Hyperion running as root and not getting any connection when run command bellow. Rebooted from console. Unpluged power and nothing .. Before and after first start steps done. Any hint ?

root@LGwebOSTV:~# /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvt -a 172.16.1.21
[EGL] Display, major = 1, minor = 4
[EGL] Surface size: 192x108
[EGL] init complete
[VT] VT_CreateVideoWindow
[VT] window_id=0
[VT] VT_AcquireVideoWindowResource
[VT] resource_id=85
[VT] VT_CreateContext
[VT] VT_CreateContext Failed
TBSniller commented 2 years ago

@mrhackcz: Are you sure you need libvt? As far as I have seen WebOS 5 already comes with libvtcapture. What happens if you run hyperion-webos_libvtcapture -a XXXX ?

mrhackcz commented 2 years ago

@mrhackcz: Are you sure you need libvt? As far as I have seen WebOS 5 already comes with libvtcapture. What happens if you run hyperion-webos_libvtcapture -a XXXX ?

I think im using libvt:

root@LGwebOSTV:~# /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture -a 172.16.1.21
/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture: error while loading shared libraries: libvtcapture.so.1: cannot open shared object file: No such file or directory
TBSniller commented 2 years ago

Just to make sure. Could you please run find / | grep libvtcapture

mrhackcz commented 2 years ago

Just to make sure. Could you please run find / | grep libvtcapture

Got these:

root@LGwebOSTV:~# find / 2>&1 | grep libvtcapture
/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture
/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/setlibvtcaptureperms.sh
/mnt/lg/appstore/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture
/mnt/lg/appstore/developer/apps/usr/palm/services/org.webosbrew.piccap.service/setlibvtcaptureperms.sh
root@LGwebOSTV:~# 
oriolism commented 2 years ago

Same problem here: LG OLED65A1AUA (2021 model) WebOS 6.0.1 Firmware 03.11.25 libvtcapture

/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture -a 192.168.30.2

Init graphical capture.. initializing lock 'MADP_SYS' [Utopia][MSOS]: [ERROR][MsOS_CreateMutex][2244] [MsOS_CreateMutex][2244] Update max number of msos mutex: 256 [Utopia][MSOS]: [INFO][MsOS_SHM_Init][1097] Mappd share memory: 0xt71178000 [Utopia][MSOS]: [INFO][_MsOS_InitEventGroup][4053] Flag=MSOS_SHM_QUERY Addr=0x71180130 [utopia info] utopia init [utopia info] default using kernel mode utopia [Utopia][PWS]: Function = PWSRegisterToUtopia, Line = 1134, PWS Register finished

[Utopia][AUDIO]: AUDIORegisterToUtopia is invoked [Utopia][AUDIO]: AUDIORegisterToUtopia : Success to register resource 'audio0' of 1 resource HDMITxRegisterToUtopia.................. [Utopia][SYS]: Function = SYSOpen, Line = 1722, [SYS INFO] OPEN INSTANCE... [Utopia][MSOS]: [WARN][MsOS_Init][5846] Already inited. [Utopia][MSOS]: [INFO][MsOS_SHM_Init][1070] Already inited. [Utopia][SYS]: [MDrv_SYS_Init][199] Already inited.

KeyCustomerList[1].chipid:e8 [Utopia][IPAUTH]: Wrong hash key

[Utopia][IPAUTH]: Wrong Chip ID [Utopia][IPAUTH]: [Auth NG] [Utopia][IPAUTH]: AUTH STATUS:0 initializing lock 'HAL_GAL' initializing lock 'GRAPHIC' [Utopia][MSOS]: [INFO][MsOS_SHM_Init][1070] Already inited. root=/dev/mmcblk0p27 ro rootfstype=squashfs PM ethaddr=B4:B2:91:C6:EC:35 mmcoops=dump wdtlog=dump@1M quiet loglevel=0 console=ttyS0,115200 rootwait ssc_enable= modelopt=000050100 hwopt=502200000004102001 ToolOpt=1049169:19:6210:65:14755126:825547521 modelName=OLED65A1AUA serialNum=105RMFP7S299 countryGrp=2 debugMode=5 devtmpfs.mount=1 chip=LM21UA0 snapshot resume=/dev/mmcblk0p48 tvregion=ATSC NR_BANK=0x0 vmalloc=408M LX_MEM=0x1c500000 EMAC_MEM=0x100000 DRAM_LEN=0x80000000 LX_MEM2=0x43800000,0x58c00000 LX_MEM3=0xe0000000,0x0 DRAM_SIZE1=0x80000000 DRAM_SIZE2=0x0 KERNEL_PROTECT MIU_DEBUG_LEVEL=5 MIU_HIT_INTERRUPT=ON MIU_HIT_PANIC=OFF criu_enabled portProtection emmc_size=0x1d1fff000 BOOTLOGO_IN_MBOOT ENV_VAR_OFFSET=0x0 ENV_VAR_SIZE=0x10000 ENV=EMMC SECURITY=ON sver=0.01.179 bver=0.01.179 innolux=0 tcontype=0 SkipFlag_PMIC= get_tconEnumFrom= bForceVfreq60HZ= enable_tcon_panel=0 bVfreq120to60HZ=1 CMA0=PVRDOWNLOAD,miu=0,hid=23,sz=0xc00000,st=0x19400000 CMA1=PVRUPLOAD,miu=0,hid=24,sz=0x400000,st=0x1a000000 CMA2=CIPLUS,miu=0,hid=27,sz=0x1000000,st=0x18400000 CMA3=GOP,miu=0,hid=29,sz=0x8400000,st=0x23800000 CMA6=PIP,miu=0,hid=25,sz=0x1800000,st=0x1a400000 CMA7=ACPU1,miu=0,hid=26,sz=0x400000,st=0x1bc00000 CMA8=ACPU2,miu=0,hid=30,sz=0x400000,st=0x1c000000 tee_mode=optee pwm=1 cmdEnd

[TCON] MApi_XC_Get_Tcon_Type 6521: u8tcontype = 0 HAL_GAL_Init done! Exit: 0 HAL_GAL_CreateSurface done! SurfaceID: 0 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 147
HAL_GAL_CaptureFrameBuffer failed: ffffffff -- Quit called! -- gfx close ok result: 0 Segmentation fault

Any recommendation?

oriolism commented 2 years ago

It was a permission issue. Now i can see the capture in Hyperion.

tavalin commented 2 years ago

It was a permission issue. Now i can see the capture in Hyperion.

I've got a similar issue - how did you solve this?

oriolism commented 2 years ago

It was a permission issue. Now i can see the capture in Hyperion.

I've got a similar issue - how did you solve this?

My error was that i change the permission "/var/luna-service2-dev/api-permissions.d/org.webosbrew.hbchannel.service.api.json" via telnet but it has to be as root with ssh.

elkarto commented 2 years ago

Same problems as @mrhackcz

LG 75UM7050PLA WebOS 5.00.15

When using Libvt:

[EGL] Display, major = 1, minor = 4
[EGL] Surface size: 192x108
[EGL] init complete
[VT] VT_CreateVideoWindow
[VT] window_id=0
[VT] VT_AcquireVideoWindowResource
[VT] resource_id=85
[VT] VT_CreateContext
[VT] VT_CreateContext Failed

When using Libvtcapture:

./hyperion-webos_libvtcapture: error while loading shared libraries: libvtcapture.so.1: cannot open shared object file: No such file or directory

Output of find / | grep libvtcapture:

/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture
/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/setlibvtcaptureperms.sh
/mnt/lg/appstore/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture
/mnt/lg/appstore/developer/apps/usr/palm/services/org.webosbrew.piccap.service/setlibvtcaptureperms.sh

Inside graphic interface I'm always getting capture running:false

OrionVVE commented 2 years ago

Same problems as @mrhackcz

LG 75UM7050PLA WebOS 5.00.15

When using Libvt:

[EGL] Display, major = 1, minor = 4
[EGL] Surface size: 192x108
[EGL] init complete
[VT] VT_CreateVideoWindow
[VT] window_id=0
[VT] VT_AcquireVideoWindowResource
[VT] resource_id=85
[VT] VT_CreateContext
[VT] VT_CreateContext Failed

When using Libvtcapture:

./hyperion-webos_libvtcapture: error while loading shared libraries: libvtcapture.so.1: cannot open shared object file: No such file or directory

Output of find / | grep libvtcapture:

/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture
/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/setlibvtcaptureperms.sh
/mnt/lg/appstore/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture
/mnt/lg/appstore/developer/apps/usr/palm/services/org.webosbrew.piccap.service/setlibvtcaptureperms.sh

Inside graphic interface I'm always getting capture running:false

I got the same error. Have you found a solution?

khiles commented 2 years ago

nope seems to be borked on my version

khiles commented 2 years ago

Latest version fixes issue for me