TBSniller / piccap

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

piccap won't start capture #9

Closed tavalin closed 2 years ago

tavalin commented 2 years ago

Hi

I've got a 2021 LG TV that's rooted and I've managed to install the Homebrew channel aswell as piccap. I've done the elevated privileges as per the readme and told to it to use the new libraries but it always fails to start the capture.

I've run the following in order to try and debug the issue:

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

and get the following output:

Init graphical capture..
HAL_GAL_Init done! Exit: 0
HAL_GAL_CreateSurface done! SurfaceID: 250
HAL_GAL_CaptureFrameBuffer done! 0
HAL_GAL: gfx open ok result: 14
Halgal done!
Init video capture..
Driver created!
vtCapture_init done!
Caller_ID: org.webosbrew.piccap.capUsage: hyperion-webos -a ADDRESS [OPTION]... Client ID: 6355432 
vtCapture_preprocess failed: 1
Quitting...
-- Quit called! --
[1]+  Stopped (signal)           /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture -a xxx.xxx.xxx.xxx

Any ideas what's going wrong or how I can find out more information?

Thanks

TBSniller commented 2 years ago

Please try to use a greater capture resolution. E.g 720p and then go deeper

tavalin commented 2 years ago

I've tried setting the capture resolution to 1280 x 720 through updating the height and width properties files and still get the same error when I run the command.

cat /var/luna/preferences/piccap_capture_width 
1280
cat /var/luna/preferences/piccap_capture_height 
720
/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture -a xxx.xxx.xxx.xxx
Init graphical capture..
HAL_GAL_Init done! Exit: 0
HAL_GAL_CreateSurface done! SurfaceID: 250
HAL_GAL_CaptureFrameBuffer done! 0
HAL_GAL: gfx open ok result: 14
Halgal done!
Init video capture..
Driver created!
vtCapture_init failed: 11
Quitting...
-- Quit called! --
[1]+  Stopped (signal)           /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos_libvtcapture -a xxx.xxx.xxx.xxx
TBSniller commented 2 years ago

You actually have to run it with params, please see hyperion-webos_libvtcapture --help Only piccap as frontend uses these configuration files to run the binary with the specified parameters

tavalin commented 2 years ago

Ok. I'm not sure what's happened but I'm now receiving the capture in Hyperion. Runnning the command from the command line still results in a segmentation fault.

Is it possible that there are two instances of the piccap service trying to run concurrently?

TBSniller commented 2 years ago

Not really. The second instance just would crash. But we have seen that very rare first a higher capture resolution is needed before you can use lower

Btw actually piccap is really only a frontend, which doesn't do anything other than running a new command (what youve also did) with the given parameters So obviously you have to stop PicCap before you can execute hyperion-webos from terminal :)

tavalin commented 2 years ago

Not really. The second instance just would crash.

Maybe this is what has been happening when I run it from the command line. Is there a way to disable/stop the piccap service from the command line?

TBSniller commented 2 years ago

pidof hyperion-webos_libvtcapture | xargs kill -TERM Should do the trick

tavalin commented 2 years ago

Thanks @TBSniller - I think the issue is that piccap had already started an instance of hyperion-webos_libvtcapture using perhaps the 360p args which resulted in problems. When I used the CLI to run hyperion-webos_libvtcapture it kept crashing.

Now that I've killed the previous instance of hyperion-webos_libvtcapture I am able to successfully run it again from the CLI.

Much appreciated for your assistance on this.