TBSniller / piccap

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

Not getting live video on hyperion #30

Closed Newbaatt closed 2 years ago

Newbaatt commented 2 years ago

Good day! Thanks for your good work! Tell me, please, I can not set up the transfer of images to hyperion. I have PicCap installed on webos 4.9.0, software version 05.00.15, libdile_vt library, resolution 192x108, framerate 0. PicCap starts, writes that the picture is being transmitted. I open Hyperion (installed on BananaPi M2 Zero or on a PC, the situation is the same). In Remote Control, a Flatbuffers server with the correct IP address of the TV is determined. But when you turn on live video, there is only one static blurry first frame. And nothing changes. Tell me what could be a problem? Some addition: all it works over ethernet, no wifi.

Informatic commented 2 years ago

Sounds like that issue: https://github.com/webosbrew/hyperion-webos/issues/23 (tl;dr you'll probably need to update to the latest TV Software Version [and possibly root again])

Also check this branch/build first - this fixes some issue on that platform https://github.com/webosbrew/hyperion-webos/pull/47 / https://github.com/webosbrew/hyperion-webos/actions/runs/1799404765

You'll need to download "hyperion_webos" artifact zip from there, then extract and upload its contents to /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service (you can use something like scp or WinSCP on Windows, after setting up SSH connection to the TV) - then make sure the main binary is executable: chmod +x /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/hyperion-webos)

Newbaatt commented 2 years ago

Tried these libraries, same situation. I really do not want to update the firmware and re-root the TV. Here the person writes that he successfully works with my firmware https://github.com/webosbrew/hyperion-webos/issues/16#issuecomment-1021146604 . Can you tell me where can I download the libraries that he uses?

Informatic commented 2 years ago

Are you using the same resolution as they do? Revision posted by PinkyJie should be pretty much the same to the one that is in currently released piccap app. (at least for libdile_vt)

Newbaatt commented 2 years ago

The resolution is exactly the same, I wrote in the first post. And in the versions, probably, something is still different, because even with this resolution, only the January releases work for me, but they only give the first frame to hyperion. February releases (including the latest ones) do not start at all for me. They give an error when autostarting after a reboot. May be some logs helps you to understand? How can I get logs to post it?

Informatic commented 2 years ago

Sorry, missed that.

Correction to my previous message: version of PicCap currently released on Homebrew Channel contains hyperion-webos in exactly the same version as the one posted by PinkyJie - you can verify this here: https://github.com/TBSniller/piccap/tree/0.2.3 → hyperion-webos submodule leads to 45f2514 commit. I suspect there are still some other config/reproduction-related differences we are unaware of.

For debugging you can do two things:

  1. Run hyperion-webos manually:
    
    # Kill the service running in the background probably
    pkill -9 -f hyperion-webos

/media/developer/apps/usr/palm/service/org.webosbrew.piccap.service/hyperion-webos -S --verbose --backend libdile_vt --address HYPERION-IP -x 192 -y 108


2. Check `/var/log/messages` (see: https://www.webosbrew.org/pages/logging.html)
```sh
# Enable low-level system logging
luna-send -n 1 -f luna://com.webos.service.config/setConfigs '{"configs": {"system.collectDevLogs": true}}'
tail -F /var/log/messages

Single still frame looks like something that should have been fixed by https://github.com/webosbrew/hyperion-webos/pull/47 - are you sure you've correctly replaced all the binaries in /media/developer/apps/usr/palm/service/org.webosbrew.piccap.service? Single still frame was occuring fairly randomly, only in some specific situation - I don't remember whether it was when playing video content from webOS apps, or during TV/HDMI input use.

Newbaatt commented 2 years ago

Interestingly, when I start hyperion-webos manually, it looks like it sends frame by frame to hyperion server, but the server still only has one first frame ... this is observed both through HDMI and when viewing webos applications , for example ott-play. By the way, I installed the latest version of pickup and it sometimes starts as a service on the TV after a reboot, and sometimes it doesn't start. But from the terminal it started immediately and sends pictures to the server. But there is one frame on the server.. Новый рисунок .

Informatic commented 2 years ago

Yes - that's because the frame in the vfb (to simplify - a memory buffer) we get from libdile_vt (that is the system library we use for capture in "libdile_vt backend" handling code on our side) just does not change. This is what was happening sometimes before a fix from hyperion-webos#47.

Try updating the binaries with ones from https://github.com/webosbrew/hyperion-webos/pull/47 (https://github.com/webosbrew/hyperion-webos/actions/runs/1799404765) and check again (unless in the log above you are already using that version)

To clarify we are talking about the same version, please show the result of:

sha256sum /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/*
Newbaatt commented 2 years ago

Ok, I updated the binaries and started the service manually, it works the same as the previous one, it sends frames to the server. But there is one frame on the server... here are the screenshot Новый рисунок (1) :

Newbaatt commented 2 years ago

So, are there really no other options and I will have to update the firmware and re-root the TV? Why don't new versions work?

Newbaatt commented 2 years ago

It confuses me that the pickup regularly sends frames to the hyperion server, this can also be seen from the traffic entering the hyperion IP. And yet, the hyperion only shows one frame. Maybe something is blocking it and you need to allow some kind of connection on the router?

Newbaatt commented 2 years ago

After update TV to newest 05.20.09 software version and re-root via RootMy.tv v. 2.0, piccap perfect works both Old TV (libvt+libgm) and libdile_vt. Moreover, it works even on air, without rebboting TV afrer save settings!!!