TBSniller / piccap

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

Service started but picture transferred to hyperion only by several seconds #27

Closed deasonsv closed 2 years ago

deasonsv commented 2 years ago

When i launching piccap app picture transferred by one-two second to hyperion and than i see black screen. If i restart TV - have same result.

Fearmen commented 2 years ago

Hello. try to disable GUI capture in piccap. In my case it helped. But you need to remember that whenever the TV menu is displayed, the capture will be turned off ... I tested it with HDMI output and everything worked right after switching to HDMI

TBSniller commented 2 years ago

@deasonsv: Do you have some more information for us? Which capture backend are you using? Which settings do you use? Is it really black, or is it disconnected?

Fearmen commented 2 years ago

@TBSniller i have same problems with this setup: Libvtcapture, video capture on, gui capture on. Transfer disconnects after 1-2 sec (i look hypNG log files). If i turned gui capture off, stream transfer stable, but while any of native app opened - capture black screen. If i turned into hdmi or lg live channels, capture work normally.

TBSniller commented 2 years ago

@Fearmen Could you please run this and provide the given logs? (Make sure to stop capture in PicCap before running) /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S --backend libvtcapture --address HYPERIONIP --verbose HYPERIONIP = Your IP from Pi,..,?

Fearmen commented 2 years ago

@TBSniller just copy to terminal webos with correct ip?

TBSniller commented 2 years ago

yes

Fearmen commented 2 years ago

@TBSniller with working settings, or with gui on, when transfer broken?

TBSniller commented 2 years ago

@Fearmen Please with the not working one. We want to investigate why its not working

Fearmen commented 2 years ago

root@LGwebOSTV:~# /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S --backend libvtcapture --address 192.168.1.99 --verbose 0.000s [INFO main ] Starting up... 0.001s [ DBG parse_options ] Finished parsing arguments 0.001s [ DBG capture_main ] Using these values: Address: 192.168.1.99 | Port: 19400 | Width: 360 | Height: 180 | FPS: 0 | Backend: libvtcapture | NoVideo: 0 | NoGUI: 0 | Autostart: 0 0.001s [ DBG capture_main ] Detecting backend... 0.001s [ DBG import_backend_library] Full library path: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/libvtcapture_backend.so 0.077s [ DBG capture_main ] Backend preinit... 0.078s [INFO capture_preinit ] Preinit called. Copying config.. 0.078s [INFO capture_preinit ] Copying config done. Initialize vars.. 0.078s [INFO capture_preinit ] Init finished. 0.078s [ DBG capture_main ] Initiating capture... 0.078s [INFO capture_init ] Initialization of capture devices.. 0.078s [INFO capture_init ] Graphical capture enabled. Begin init.. 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: 0xt71139000 [Utopia][MSOS]: [INFO][_MsOS_InitEventGroup][4053] Flag=MSOS_SHM_QUERY Addr=0x71141130 [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=B0:37:95:8C:78:BD mmcoops=dump wdtlog=dump@1M quiet loglevel=0 console=ttyS0,115200 rootwait ssc_enable= modelopt=001021100 hwopt=213210001104002001 ToolOpt=83958033:12307:1251801:65:15066675:825547787 modelName=65NANO926PB serialNum=109RADC3F330 countryGrp=22 debugMode=5 devtmpfs.mount=1 chip=LM21UA0 snapshot resume=/dev/mmcblk0p48 tvregion=DVB 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=4 SkipFlag_PMIC= get_tconEnumFrom= bForceVfreq60HZ= enable_tcon_panel=4 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=0 cmdEnd

[TCON] MApi_XC_Get_Tcon_Type 6521: u8tcontype = 4 0.114s [INFO capture_init ] HAL_GAL_Init done! Exit: 0 0.117s [INFO capture_init ] HAL_GAL_CreateSurface done! SurfaceID: 0 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 131 0.297s [INFO capture_init ] HAL_GAL_CaptureFrameBuffer done! 0 0.298s [INFO capture_init ] HAL_GAL: gfx open ok result: 24 0.298s [INFO capture_init ] Halgal done! 0.298s [INFO capture_init ] Init video capture.. 0.312s [INFO capture_init ] Driver created! 0.312s [INFO vtcapture_initialize] Starting vtcapture initialization. 0.359s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion-webos_service Client ID: 2318696 0.359s [INFO vtcapture_initialize] Skipping successfull vtCapture_init to prevent start after first try. 0.361s [INFO vtcapture_initialize] vtCapture_postprocess done! 0.363s [INFO vtcapture_initialize] vtCapture_finalize done! 0.363s [INFO capture_init ] vtcapture not ready yet! 0.363s [INFO capture_init ] Malloc hal+vt vars.. 0.365s [INFO capture_init ] Malloc hal+vt vars finished. 0.365s [ DBG capture_main ] Starting capture.. 0.365s [INFO capture_start ] Starting capture thread.. 0.365s [ DBG capture_main ] Capture main init completed. Creating connection thread... 0.365s [ DBG connection_loop ] Starting connection loop 0.365s [INFO connection_loop ] Connecting hyperion-client.. 0.381s [INFO connection_loop ] hyperion-client connected! [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 131 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 131 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 131 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 131 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 131 Segmentation fault

TBSniller commented 2 years ago

It looks a bit like its failing to init graphical capture but returns a successfully init. Just to clean a bit up and this isn't caused by not cleaned up stuff: can you please run reboot in terminal and after that execute above command again and send the logs here? Would like to see if they differ

Fearmen commented 2 years ago

root@LGwebOSTV:~# /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S --backend libvtcapture --address 192.168.1.99 --verbose 0.000s [INFO main ] Starting up... 0.001s [ DBG parse_options ] Finished parsing arguments 0.001s [ DBG capture_main ] Using these values: Address: 192.168.1.99 | Port: 19400 | Width: 360 | Height: 180 | FPS: 0 | Backend: libvtcapture | NoVideo: 0 | NoGUI: 0 | Autostart: 0 0.001s [ DBG capture_main ] Detecting backend... 0.001s [ DBG import_backend_library] Full library path: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/libvtcapture_backend.so 0.102s [ DBG capture_main ] Backend preinit... 0.102s [INFO capture_preinit ] Preinit called. Copying config.. 0.102s [INFO capture_preinit ] Copying config done. Initialize vars.. 0.103s [INFO capture_preinit ] Init finished. 0.103s [ DBG capture_main ] Initiating capture... 0.103s [INFO capture_init ] Initialization of capture devices.. 0.103s [INFO capture_init ] Graphical capture enabled. Begin init.. 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: 0xt711D1000 [Utopia][MSOS]: [INFO][_MsOS_InitEventGroup][4053] Flag=MSOS_SHM_QUERY Addr=0x711D9130 [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=B0:37:95:8C:78:BD mmcoops=dump wdtlog=dump@1M quiet loglevel=0 console=ttyS0,115200 rootwait ssc_enable= modelopt=001021100 hwopt=213210001104002001 ToolOpt=83958033:12307:1251801:65:15066675:825547787 modelName=65NANO926PB serialNum=109RADC3F330 countryGrp=22 debugMode=5 devtmpfs.mount=1 chip=LM21UA0 snapshot resume=/dev/mmcblk0p48 tvregion=DVB 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=4 SkipFlag_PMIC= get_tconEnumFrom= bForceVfreq60HZ= enable_tcon_panel=4 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=0 cmdEnd

[TCON] MApi_XC_Get_Tcon_Type 6521: u8tcontype = 4 0.147s [INFO capture_init ] HAL_GAL_Init done! Exit: 0 0.153s [INFO capture_init ] HAL_GAL_CreateSurface done! SurfaceID: 0 0.205s [INFO capture_init ] HAL_GAL_CaptureFrameBuffer done! 0 0.205s [INFO capture_init ] HAL_GAL: gfx open ok result: 22 0.205s [INFO capture_init ] Halgal done! 0.205s [INFO capture_init ] Init video capture.. 0.233s [INFO capture_init ] Driver created! 0.233s [INFO vtcapture_initialize] Starting vtcapture initialization. 0.293s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion-webos_service Client ID: 20507920 0.293s [INFO vtcapture_initialize] Skipping successfull vtCapture_init to prevent start after first try. 0.294s [INFO vtcapture_initialize] vtCapture_postprocess done! 0.296s [INFO vtcapture_initialize] vtCapture_finalize done! 0.296s [INFO capture_init ] vtcapture not ready yet! 0.296s [INFO capture_init ] Malloc hal+vt vars.. 0.299s [INFO capture_init ] Malloc hal+vt vars finished. 0.299s [ DBG capture_main ] Starting capture.. 0.299s [INFO capture_start ] Starting capture thread.. 0.299s [ DBG capture_main ] Capture main init completed. Creating connection thread... 0.300s [ DBG connection_loop ] Starting connection loop 0.300s [INFO connection_loop ] Connecting hyperion-client.. 0.305s [INFO connection_loop ] hyperion-client connected! 3.868s [ DBG capture_thread_target] framerate: 16.811658 FPS 7.291s [ DBG capture_thread_target] framerate: 17.532069 FPS 10.749s [ DBG capture_thread_target] framerate: 17.350257 FPS 12.004s [INFO send_picture ] Try to init vtcapture again.. 12.005s [INFO vtcapture_initialize] Starting vtcapture initialization. 12.062s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion-webos_service Client ID: 20507920 12.070s [INFO vtcapture_initialize] vtCapture_preprocess done! 12.070s [INFO vtcapture_initialize] vtCapture_planeInfo done! stride: 384 Region: x: 0, y: 0, w: 360, h: 180 Active Region: x: 0, y: 0 w: 360 h: 180 12.070s [INFO vtcapture_initialize] vtCapture_process done! 12.170s [INFO vtcapture_initialize] vtCapture_currentCaptureBuffInfo done after 1 tries! addr0: 0x6ff5b000 addr1: 0x70904000 size0: 69120 size1: 34560 12.170s [INFO vtcapture_initialize] vtcapture initialization finished. 12.170s [INFO send_picture ] Init possible. Terminating current capture.. 12.170s [INFO capture_terminate ] Called termination of vtcapture 12.170s [INFO capture_terminate ] Video capture enabled - Also stopping.. 12.171s [INFO capture_stop_vt ] Stopping VT capture... 12.697s [INFO capture_stop_vt ] vtCapture_stop done! 12.697s [INFO capture_terminate ] GUI capture enabled - Also stopping.. 12.697s [INFO capture_stop_hal ] Stopping HAL capture... [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 12.697s [INFO capture_stop_hal ] HAL_GAL_DestroySurface done. Result: 0 12.699s [INFO capture_terminate ] vtCapture_postprocess done! 12.700s [INFO capture_terminate ] vtCapture_finalize done! 12.718s [INFO capture_terminate ] Driver released! 12.718s [INFO capture_terminate ] Finished capture termination! 12.718s [INFO send_picture ] Init possible. Cleanup current capture.. 12.718s [INFO capture_cleanup ] Capture cleanup... 12.718s [INFO capture_cleanup ] Capture was running, freeing vars... 12.718s [INFO capture_cleanup ] Freeing video vars... 12.718s [INFO capture_cleanup ] Freeing gui vars... 12.719s [INFO capture_cleanup ] gfx close ok result: 0 12.719s [INFO capture_cleanup ] Finished capture cleanup.. 12.719s [INFO send_picture ] Init possible. Init capture.. 12.719s [INFO capture_init ] Initialization of capture devices.. 12.719s [INFO capture_init ] Graphical capture enabled. Begin init.. 12.719s [INFO capture_init ] HAL_GAL_Init done! Exit: 0 12.724s [INFO capture_init ] HAL_GAL_CreateSurface done! SurfaceID: 0 12.781s [INFO capture_init ] HAL_GAL_CaptureFrameBuffer done! 0 12.781s [INFO capture_init ] HAL_GAL: gfx open ok result: 22 12.782s [INFO capture_init ] Halgal done! 12.782s [INFO capture_init ] Init video capture.. 12.802s [INFO capture_init ] Driver created! 12.802s [INFO vtcapture_initialize] Starting vtcapture initialization. 12.856s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion-webos_service Client ID: 1847624208 12.862s [INFO vtcapture_initialize] vtCapture_preprocess done! 12.862s [INFO vtcapture_initialize] vtCapture_planeInfo done! stride: 384 Region: x: 0, y: 0, w: 360, h: 180 Active Region: x: 0, y: 0 w: 360 h: 180 12.862s [INFO vtcapture_initialize] vtCapture_process done! 12.963s [INFO vtcapture_initialize] vtCapture_currentCaptureBuffInfo done after 1 tries! addr0: 0x709ae000 addr1: 0x709a5000 size0: 69120 size1: 34560 12.963s [INFO vtcapture_initialize] vtcapture initialization finished. 12.963s [INFO capture_init ] vtcapture initialized! 12.963s [INFO capture_init ] Malloc hal+vt vars.. 12.966s [INFO capture_init ] Malloc hal+vt vars finished. 12.966s [INFO send_picture ] Init possible. Starting capture again.. 12.966s [INFO capture_start ] Starting capture thread.. 18.727s [ DBG capture_thread_target] framerate: 10.415587 FPS 18.798s [ DBG capture_thread_target] framerate: 7.454358 FPS 18.798s [ DBG capture_thread_target] We are not the main thread, exiting 22.245s [ DBG capture_thread_target] framerate: 17.054762 FPS 25.696s [ DBG capture_thread_target] framerate: 17.388018 FPS 29.186s [ DBG capture_thread_target] framerate: 17.193381 FPS 32.698s [ DBG capture_thread_target] framerate: 17.084842 FPS 36.289s [ DBG capture_thread_target] framerate: 16.708224 FPS 40.106s [ DBG capture_thread_target] framerate: 15.717183 FPS 44.096s [ DBG capture_thread_target] framerate: 15.039038 FPS 48.375s [ DBG capture_thread_target] framerate: 14.024659 FPS 52.448s [ DBG capture_thread_target] framerate: 14.729511 FPS 55.959s [ DBG capture_thread_target] framerate: 17.088423 FPS 60.037s [ DBG capture_thread_target] framerate: 14.716176 FPS 63.765s [ DBG capture_thread_target] framerate: 16.094330 FPS 67.505s [ DBG capture_thread_target] framerate: 16.042832 FPS ^Z[1]+ Stopped

And picture in visualisaton like this 151662128-dbc32204-d312-4ed9-937c-9ff938bf7fa2

TBSniller commented 2 years ago

@Fearmen Okay, so firstly you shouldn't stop capture using CTRL+Z please use CTRL+C instead, Z just puts the application paused in backgound, so nothing is cleaned up. That also might be the problem for failed successed init of graphical capture in your first log output.

This example now looks like misscalculated width/high/stride. It also looks like this isn't the actual PicCap-Version, much more a development branch from here: https://github.com/webosbrew/hyperion-webos/pull/40 ? Since its also working after a TV restart, it seems to not be an issue like @deasonsv has, its more related to failed usage (Two capture instances and using development branch) Can you confirm you will get a correct image in latest original PicCap? (Yeah I know other bugs, but just to clarrify)

Fearmen commented 2 years ago

I use 0.2.3 piccap, but with fix, without fix capture not start at any config

TBSniller commented 2 years ago

Which fix? And what wasn't working?

Fearmen commented 2 years ago

If i delete piccap in hbc, and install again, it will be clean install? If yes, i might reinstall

TBSniller commented 2 years ago

Most likley, yeah

Fearmen commented 2 years ago

Fix from thread, which you post in message above

Fearmen commented 2 years ago

login as: root root@192.168.1.111's password:

/!\ Your system is using a default password. /!\ Insert SSH public key into /home/root/.ssh/authorized_keys and perform a re boot to remove this warning.

root@LGwebOSTV:~# /media/developer/apps/usr/palm/services/org.webosbrew.piccap.s ervice/hyperion-webos -S --backend libvtcapture --address 192.168.1.99 --verbose 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.1.9 9 | Port: 19400 | Width: 360 | Height: 180 | FPS: 0 | Backend: libvtcapture | No Video: 0 | NoGUI: 0 | Autostart: 0 0.001s [ DBG capture_main ] Detecting backend... 0.002s [ DBG import_backend_library] Full library path: /media/developer/ap ps/usr/palm/services/org.webosbrew.piccap.service/libvtcapture_backend.so 0.085s [ DBG capture_main ] Backend preinit... 0.085s [INFO capture_preinit ] Preinit called. Copying config.. 0.085s [INFO capture_preinit ] Copying config done. Initialize vars.. 0.085s [INFO capture_preinit ] Init finished. 0.085s [ DBG capture_main ] Initiating capture... 0.086s [INFO capture_init ] Initialization of capture devices.. 0.086s [INFO capture_init ] Graphical capture enabled. Begin init.. initializing lock 'MADP_SYS' [Utopia][MSOS]: [ERROR][MsOS_CreateMutex][2244] [MsOS_CreateMutex][2244] Upda te max number of msos mutex: 256 [Utopia][MSOS]: [INFO][MsOS_SHM_Init][1097] Mappd share memory: 0xt71104000 [Utopia][MSOS]: [INFO][_MsOS_InitEventGroup][4053] Flag=MSOS_SHM_QUERY Addr= 0x7110C130 [utopia info] utopia init [utopia info] default using kernel mode utopia [Utopia][PWS]: Function = PWSRegisterToUtopia, Line = 1134, PWS Register finishe d

[Utopia][AUDIO]: AUDIORegisterToUtopia is invoked [Utopia][AUDIO]: AUDIORegisterToUtopia : Success to register resource 'audio0' o f 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=B0:37:95:8C:78:BD mmcoo ps=dump wdtlog=dump@1M quiet loglevel=0 console=ttyS0,115200 rootwait ssc_enable = modelopt=001021100 hwopt=213210001104002001 ToolOpt=83958033:12307:12518 01:65:15066675:825547787 modelName=65NANO926PB serialNum=109RADC3F330 countryGrp =22 debugMode=5 devtmpfs.mount=1 chip=LM21UA0 snapshot resume=/dev/mmcblk0p48 tv region=DVB NR_BANK=0x0 vmalloc=408M LX_MEM=0x1c500000 EMAC_MEM=0x100000 DRAM_LEN =0x80000000 LX_MEM2=0x43800000,0x58c00000 LX_MEM3=0xe0000000,0x0 DRAM_SIZE1=0x80 000000 DRAM_SIZE2=0x0 KERNEL_PROTECT MIU_DEBUG_LEVEL=5 MIU_HITINTERRUPT=ON MIU HIT_PANIC=OFF criu_enabled portProtection emmc_size=0x1d1fff000 BOOTLOGO_IN_MBOO T ENV_VAR_OFFSET=0x0 ENV_VAR_SIZE=0x10000 ENV=EMMC SECURITY=ON sver=0.01.179 bve r=0.01.179 innolux=0 tcontype=4 SkipFlag_PMIC= get_tconEnumFrom= bFo rceVfreq60HZ= enable_tcon_panel=4 CMA0=PVRDOWNLOAD,miu=0,hid=23,sz=0xc0000 0,st=0x19400000 CMA1=PVRUPLOAD,miu=0,hid=24,sz=0x400000,st=0x1a000000 CMA2=CIPLU S,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=0 cmdEnd

[TCON] MApi_XC_Get_Tcon_Type 6521: u8tcontype = 4 0.135s [INFO capture_init ] HAL_GAL_Init done! Exit: 0 0.142s [INFO capture_init ] HAL_GAL_CreateSurface done! SurfaceID: 0 0.199s [INFO capture_init ] HAL_GAL_CaptureFrameBuffer done! 0 0.199s [INFO capture_init ] HAL_GAL: gfx open ok result: 22 0.199s [INFO capture_init ] Halgal done! 0.199s [INFO capture_init ] Init video capture.. 0.225s [INFO capture_init ] Driver created! 0.226s [INFO vtcapture_initialize] Starting vtcapture initialization. 0.285s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion -webos_service Client ID: 18214160 0.285s [INFO vtcapture_initialize] Skipping successfull vtCapture_init to p revent start after first try. 0.287s [INFO vtcapture_initialize] vtCapture_postprocess done! 0.290s [INFO vtcapture_initialize] vtCapture_finalize done! 0.290s [INFO capture_init ] vtcapture not ready yet! 0.290s [INFO capture_init ] Malloc hal+vt vars.. 0.293s [INFO capture_init ] Malloc hal+vt vars finished. 0.293s [ DBG capture_main ] Starting capture.. 0.293s [INFO capture_start ] Starting capture thread.. 0.293s [ DBG capture_main ] Capture main init completed. Creating co nnection thread... 0.293s [ DBG connection_loop ] Starting connection loop 0.295s [INFO connection_loop ] Connecting hyperion-client.. 0.296s [INFO connection_loop ] hyperion-client connected! 12.361s [INFO send_picture ] Try to init vtcapture again.. 12.362s [INFO vtcapture_initialize] Starting vtcapture initialization. 12.425s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion-webos_service Client ID: 18214160 12.433s [INFO vtcapture_initialize] vtCapture_preprocess done! 12.433s [INFO vtcapture_initialize] vtCapture_planeInfo done! stride: 384 Region: x: 0, y: 0, w: 360, h: 180 Active Region: x: 0, y: 0 w: 360 h: 180 12.433s [INFO vtcapture_initialize] vtCapture_process done! 12.534s [INFO vtcapture_initialize] vtCapture_currentCaptureBuffInfo done after 1 tries! addr0: 0x6ff1a000 addr1: 0x6ff11000 size0: 69120 size1: 34560 12.534s [INFO vtcapture_initialize] vtcapture initialization finished. 12.534s [INFO send_picture ] Init possible. Terminating current capture.. 12.534s [INFO capture_terminate ] Called termination of vtcapture 12.534s [INFO capture_terminate ] Video capture enabled - Also stopping.. 12.534s [INFO capture_stop_vt ] Stopping VT capture... 13.060s [INFO capture_stop_vt ] vtCapture_stop done! 13.060s [INFO capture_terminate ] GUI capture enabled - Also stopping.. 13.060s [INFO capture_stop_hal ] Stopping HAL capture... [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 13.062s [INFO capture_stop_hal ] HAL_GAL_DestroySurface done. Result: 0 13.063s [INFO capture_terminate ] vtCapture_postprocess done! 13.065s [INFO capture_terminate ] vtCapture_finalize done! 13.088s [INFO capture_terminate ] Driver released! 13.088s [INFO capture_terminate ] Finished capture termination! 13.088s [INFO send_picture ] Init possible. Cleanup current capture.. 13.089s [INFO capture_cleanup ] Capture cleanup... 13.089s [INFO capture_cleanup ] Capture was running, freeing vars... 13.089s [INFO capture_cleanup ] Freeing video vars... 13.089s [INFO capture_cleanup ] Freeing gui vars... 13.089s [INFO capture_cleanup ] gfx close ok result: 0 13.089s [INFO capture_cleanup ] Finished capture cleanup.. 13.089s [INFO send_picture ] Init possible. Init capture.. 13.089s [INFO capture_init ] Initialization of capture devices.. 13.089s [INFO capture_init ] Graphical capture enabled. Begin init.. 13.090s [INFO capture_init ] HAL_GAL_Init done! Exit: 0 13.093s [INFO capture_init ] HAL_GAL_CreateSurface done! SurfaceID: 0 13.149s [INFO capture_init ] HAL_GAL_CaptureFrameBuffer done! 0 13.150s [INFO capture_init ] HAL_GAL: gfx open ok result: 22 13.150s [INFO capture_init ] Halgal done! 13.150s [INFO capture_init ] Init video capture.. 13.171s [INFO capture_init ] Driver created! 13.171s [INFO vtcapture_initialize] Starting vtcapture initialization. 13.225s [INFO vtcapture_initialize] vtCapture_init done! Caller_ID: hyperion-webos_service Client ID: 1847624208 13.228s [INFO vtcapture_initialize] vtCapture_preprocess done! 13.229s [INFO vtcapture_initialize] vtCapture_planeInfo done! stride: 384 Region: x: 0, y: 0, w: 360, h: 180 Active Region: x: 0, y: 0 w: 360 h: 180 13.229s [INFO vtcapture_initialize] vtCapture_process done! 13.330s [INFO vtcapture_initialize] vtCapture_currentCaptureBuffInfo done after 1 tries! addr0: 0x6ffdd000 addr1: 0x6ffd4000 size0: 69120 size1: 34560 13.330s [INFO vtcapture_initialize] vtcapture initialization finished. 13.330s [INFO capture_init ] vtcapture initialized! 13.330s [INFO capture_init ] Malloc hal+vt vars.. 13.333s [INFO capture_init ] Malloc hal+vt vars finished. 13.333s [INFO send_picture ] Init possible. Starting capture again.. 13.333s [INFO capture_start ] Starting capture thread.. ^C 77.029s [INFO handle_signal ] SIGINT called! Stopping capture if running..

(process:5356): GLib-CRITICAL **: 20:17:03.501: g_main_loop_quit: assertion 'loop != NULL' failed 77.037s [INFO connection_loop ] Ending connection loop 77.037s [ DBG cleanup ] Starting cleanup... isRunning: 1 77.037s [ DBG cleanup ] Capture is running! Breaking loop and joining thread... 77.037s [ DBG cleanup ] Destroying hyperion-client... 77.037s [ DBG cleanup ] Terminating capture within library... 77.037s [INFO capture_terminate ] Called termination of vtcapture 77.140s [INFO capture_terminate ] Video capture enabled - Also stopping.. 77.140s [INFO capture_stop_vt ] Stopping VT capture... 77.664s [INFO capture_stop_vt ] vtCapture_stop done! 77.664s [INFO capture_terminate ] GUI capture enabled - Also stopping.. 77.664s [INFO capture_stop_hal ] Stopping HAL capture... [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 77.664s [INFO capture_stop_hal ] HAL_GAL_DestroySurface done. Result: 0 77.666s [INFO capture_terminate ] vtCapture_postprocess done! 77.669s [INFO capture_terminate ] vtCapture_finalize done! 77.688s [INFO capture_terminate ] Driver released! 77.688s [INFO capture_terminate ] Finished capture termination! 77.688s [ DBG cleanup ] Cleanup capture within library... 77.688s [INFO capture_cleanup ] Capture cleanup... 77.688s [INFO capture_cleanup ] Capture was running, freeing vars... 77.688s [INFO capture_cleanup ] Freeing video vars... 77.688s [INFO capture_cleanup ] Freeing gui vars... 77.688s [INFO capture_cleanup ] gfx close ok result: 0 77.689s [INFO capture_cleanup ] Finished capture cleanup.. 77.689s [ DBG cleanup ] Cleanup finished. 77.689s [ DBG connection_loop ] Connection loop exiting 77.689s [INFO main ] Finished [Utopia][GOP API]: ---MApi_GOP_Exit 5452: PID[5356], TID[1956945936] tries to exit [Utopia][GOP API]: ---MApi_GOP_Exit 5452: PID[5356], TID[1956945936] tries to exit root@LGwebOSTV:~#

Capture running ~1 min. Image in live visualisation same as above.

Fearmen commented 2 years ago

if i started capture from piccap, capture disconnects. Settings in piccap: port 19400, width 360, Height 180, Max FPS 0, New 2020+ TV(libvtcapture+libhalgal), Video capture on, GUI on.

I delete piccap, reboot tv, install piccap from HBC, reboot tv, insert IP in piccap, press save, reboot, and insert command in SSH session

TBSniller commented 2 years ago

Could you run --no-video Would be nice to see if it makes any difference /media/developer/apps/usr/palm/services/org.webosbrew.piccap.s ervice/hyperion-webos -S --backend libvtcapture --address 192.168.1.99 --verbose --no-video

TBSniller commented 2 years ago

You should also check with editing width/hight: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S -a 192.168.1.99 -b libvtcapture -x 384 -y 180

Fearmen commented 2 years ago

Could you run --no-video Would be nice to see if it makes any difference /media/developer/apps/usr/palm/services/org.webosbrew.piccap.s ervice/hyperion-webos -S --backend libvtcapture --address 192.168.1.99 --verbose --no-video

/!\ Your system is using a default password. /!\ Insert SSH public key into /home/root/.ssh/authorized_keys and perform a reboot to remove this warning.

root@LGwebOSTV:~# root@LGwebOSTV:~# root@LGwebOSTV:~# root@LGwebOSTV:~# root@LGwebOSTV:~# root@LGwebOSTV:~# root@LGwebOSTV:~# root@LGwebOSTV:~# /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S --backend libvtcapture --address 192.168.1.99 --verbose --no-video 0.001s [INFO main ] Starting up... 0.004s [ DBG parse_options ] Finished parsing arguments 0.004s [ DBG capture_main ] Using these values: Address: 192.168.1.99 | Port: 19400 | Width: 360 | Height: 180 | FPS: 0 | Backend: libvtcapture | NoVideo: 1 | NoGUI: 0 | Autostart: 0 0.004s [ DBG capture_main ] Detecting backend... 0.004s [ DBG import_backend_library] Full library path: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/libvtcapture_backend.so 0.238s [ DBG capture_main ] Backend preinit... 0.238s [INFO capture_preinit ] Preinit called. Copying config.. 0.238s [INFO capture_preinit ] Copying config done. Initialize vars.. 0.238s [INFO capture_preinit ] Init finished. 0.238s [ DBG capture_main ] Initiating capture... 0.238s [INFO capture_init ] Initialization of capture devices.. 0.238s [INFO capture_init ] Graphical capture enabled. Begin init.. 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: 0xt71153000 [Utopia][MSOS]: [INFO][_MsOS_InitEventGroup][4053] Flag=MSOS_SHM_QUERY Addr=0x7115B130 [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=B0:37:95:8C:78:BD mmcoops=dump wdtlog=dump@1M quiet loglevel=0 console=ttyS0,115200 rootwait ssc_enable= modelopt=001021100 hwopt=213210001104002001 ToolOpt=83958033:12307:1251801:65:15066675:825547787 modelName=65NANO926PB serialNum=109RADC3F330 countryGrp=22 debugMode=5 devtmpfs.mount=1 chip=LM21UA0 snapshot resume=/dev/mmcblk0p48 tvregion=DVB 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=4 SkipFlag_PMIC= get_tconEnumFrom= bForceVfreq60HZ= enable_tcon_panel=4 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=0 cmdEnd

[TCON] MApi_XC_Get_Tcon_Type 6521: u8tcontype = 4 0.324s [INFO capture_init ] HAL_GAL_Init done! Exit: 0 0.330s [INFO capture_init ] HAL_GAL_CreateSurface done! SurfaceID: 0 0.423s [INFO capture_init ] HAL_GAL_CaptureFrameBuffer done! 0 0.424s [INFO capture_init ] HAL_GAL: gfx open ok result: 22 0.424s [ DBG capture_init ] Malloc halgal vars... 0.431s [ DBG capture_init ] Malloc halgal vars finished. 0.431s [INFO capture_init ] Halgal done! 0.431s [ DBG capture_main ] Starting capture.. 0.431s [INFO capture_start ] Starting capture thread.. 0.434s [ DBG capture_main ] Capture main init completed. Creating connection thread... 0.448s [ DBG connection_loop ] Starting connection loop 0.452s [INFO connection_loop ] Connecting hyperion-client.. 0.456s [INFO connection_loop ] hyperion-client connected! [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129 [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 129

Capture transfered, but black screen.

TBSniller commented 2 years ago

You have gui elements visible, or only video playing? if you dont have gui elements visible it will be black

Fearmen commented 2 years ago

if i stopped with Ctrl+C

^C 143.515s [INFO handle_signal ] SIGINT called! Stopping capture if running..

(process:4034): GLib-CRITICAL : 20:50:07.726: g_main_loop_quit: assertion 'loop != NULL' failed 143.571s [INFO connection_loop ] Ending connection loop 143.571s [ DBG cleanup ] Starting cleanup... isRunning: 1 143.571s [ DBG cleanup ] Capture is running! Breaking loop and joining thread... 143.571s [ DBG cleanup ] Destroying hyperion-client... 143.571s [ DBG cleanup ] Terminating capture within library... 143.571s [INFO capture_terminate ] Called termination of vtcapture 143.610s [INFO capture_terminate ] GUI capture enabled - Also stopping.. 143.610s [INFO capture_stop_hal ] Stopping HAL capture... [Utopia][GOP API]: MApi_GOP_GWIN_Delete32FB:3904 FBId = 128 143.610s [INFO capture_stop_hal ] HAL_GAL_DestroySurface done. Result: 0 143.610s [ ERR capture_terminate ] Finishing with errors: 170cc!** 143.610s [ DBG cleanup ] Cleanup capture within library... 143.610s [INFO capture_cleanup ] Capture cleanup... 143.610s [INFO capture_cleanup ] Capture was running, freeing vars... 143.610s [INFO capture_cleanup ] Freeing gui vars... 143.611s [INFO capture_cleanup ] gfx close ok result: 0 143.611s [INFO capture_cleanup ] Finished capture cleanup.. 143.611s [ DBG cleanup ] Cleanup finished. 143.611s [ DBG connection_loop ] Connection loop exiting 143.612s [INFO main ] Finished [Utopia][GOP API]: ---MApi_GOP_Exit 5452: PID[4034], TID[1957269520] tries to exit [Utopia][GOP API]: ---MApi_GOP_Exit 5452: PID[4034], TID[1957269520] tries to exit root@LGwebOSTV:~#

Fearmen commented 2 years ago

You have gui elements visible, or only video playing? if you dont have gui elements visible it will be black

oh, yes. in menu i have image

Fearmen commented 2 years ago

You should also check with editing width/hight: /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S -a 192.168.1.99 -b libvtcapture -x 384 -y 180

Yes, i have image.

also i trying several combinations in this command, it looks through ssh works much stable, i have image

/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S --backend libvtcapture --address 192.168.1.99 -x 640 -y 360 -f 30 - works (HDMI, not menu)

/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos -S --backend libvtcapture --address 192.168.1.99 -x 640 -y 360 -f 60 - works (HDMI, not menu)

And, when i try -novideo, i try DRM content from native app on tv. capture crashing and after i quit dont recovery. And after i try start capture through SSH, it wont start, only restart help

TBSniller commented 2 years ago

You should set settings to width 384 and height 180 in PicCap, if you don't have problems with stride on terminal with this settings.

Are you sure you meant --no-video in your latest statement? Regardless of this, capture of DRM content isnt supported at the moment (for latley 2018-19+ TVs -https://github.com/webosbrew/hyperion-webos/issues/28)

Fearmen commented 2 years ago

When you ask me to test with --no-video https://github.com/TBSniller/piccap/issues/27#issuecomment-1030870279

I also try drm and describe what happend. Native app launched, captured, but when i choose movie, it crash capture. I know, that drm not working, but i thought, it will be black screen or no capturing, when drm playing. But capture crash and dont recovery until i reboot tv.

I thought it was helpfull information. If you and other devs dont win DRM, maybe make autorestart after drm content stops playing.

TBSniller commented 2 years ago

Ah okay I see. At the moment (current latest released version) it shouldn't crash. But there is another bug: While switching to DRM content video will be black, also when switching back to non DRM protected content, so a restart will be needed. Main problem is that the bufferadresses got changed and we don't know them. Its reworked here, so at least this bug should be fixed in future https://github.com/webosbrew/hyperion-webos/pull/43

But also in your case I assume crashing is caused by some internally miscalculated stride/height/width. Have you tried with width 384 and height 180? Could you also provide some logs?

deasonsv commented 2 years ago

@deasonsv: Do you have some more information for us? Which capture backend are you using? Which settings do you use? Is it really black, or is it disconnected?

My problem was the poor quality of the Wifi network. Rebooting the router solves the problem in most cases.

tuxuser commented 2 years ago

Solved