TBSniller / piccap

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

service rewrite #6

Closed Informatic closed 2 years ago

Informatic commented 2 years ago
Informatic commented 2 years ago

Built with current hyperion-webos main branch (986d40afe2fee72709de9931a1a7e526e307492e): https://d.inf.re/b/416d2634b2eb7e8acc9d3a2d94131b42.ipk

Installing

  1. Enable SSH Server in Homebrew Channel → Settings, Reboot
  2. (Windows) Enable SSH Client component
  3. Open terminal (cmd.exe/Terminal.app/whatever-you-use-on-linux) and connect over ssh: ssh root@TV_IP - enter alpine password (unless you set up ssh key authentication - you should now what to do)
  4. Run:
    luna-send -i 'luna://org.webosbrew.hbchannel.service/install' '{"ipkUrl":"http://d.inf.re/b/416d2634b2eb7e8acc9d3a2d94131b42.ipk", "ipkHash":"3c3377618acbe8994185fa2528b93de1cf0d4f0edaa8aa74d1cd728bd6d624dd"}'

You should get something like this:

root@lgwebostv:~# luna-send -i 'luna://org.webosbrew.hbchannel.service/install' '{"ipkUrl":"http://d.inf.re/b/416d2634b2eb7e8acc9d3a2d94131b42.ipk", "ipkHash":"3c3377618acbe8994185fa2528b93de1cf0d4f0edaa8aa74d1cd728bd6d624dd"}'
{"statusText":"Downloading…","returnValue":true}
{"statusText":"Downloading…","progress":88.22780597826949,"returnValue":true}
{"statusText":"Downloading…","progress":100,"returnValue":true}
{"statusText":"Verifying…","returnValue":true}
{"statusText":"Installing…","returnValue":true}
{"returnValue":true,"statusText":"Finished.","finished":true}
{"serviceName":"org.webosbrew.hbchannel.service","returnValue":false,"errorCode":-1,"errorText":"org.webosbrew.hbchannel.service is not running."}

GM Blending

Alternatively, for a version with current libdile_vt + gm blending (UI layer) WIP branch:

luna-send -i 'luna://org.webosbrew.hbchannel.service/install' '{"ipkUrl":"http://d.inf.re/b/ba3340eb3f97bd4b3cbaa7fcc5d39758.ipk", "ipkHash":"14be5c195e410798b142533a396af826cdd04ade89517235080f03cd8295652f"}'
PinkyJie commented 2 years ago

Hi @Informatic , this is truly a great improvement, thanks! I had a try with this build (not GM blending one), the "auto-restart" does improve the stability a lot. And libdile_vt backend also improves the experience on HDMI, but unfortnately, HDMI capture still looks weird with a lot of green cross lines. Do you know the reason for that?

A Hyperion Live video scrrenshot for Youtube running on HDMI TV box.

Screen Shot 2021-12-28 at 16 18 08
PinkyJie commented 2 years ago

I also realised another performance issue, not sure if it's related to this thread.

After switching form lib_vt to libdile_vt, the FPS drops dramatically, I can see the LED color delay. Here is the screenshot for the FPS output.

FPS from lib_vt: (width: 192, height: 108)

Screen Shot 2021-12-28 at 16 43 19

FPS from libdile_vt: (width: 320, height: 240)

Screen Shot 2021-12-28 at 16 42 11

For libdile_vt it seems the width/height parameter doens't work, it will always be 320x240 for me. Here you can see even I manually pass 192x108, it still applies 320x240, maybe that's the reason why the FPS drops?

Screen Shot 2021-12-28 at 16 55 30

The steps I follow are:

# ssh to TV and cd to this folder
cd /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service
# lib_vt backend
LD_LIBRARY_PATH=. ./hyperion-webos -b libvt -a 192.168.5.116
# libdile_vt backend
LD_LIBRARY_PATH=. ./hyperion-webos -b libdile_vt -a 192.168.5.116
PinkyJie commented 2 years ago

Also one more thing, is it better to provide an option to not show the "PicCap restarted" message? During my testing, it restarted very frequently sometimes, it's kind of disturbing the message kept popping up, especially when watching a movie.

Informatic commented 2 years ago

Superseded by #18