webosbrew / hyperion-webos

hyperion.ng video grabber for webOS
MIT License
153 stars 30 forks source link

vtc: add dump loc 1 quirk #107

Closed asturel closed 5 months ago

asturel commented 1 year ago

On some tv-s (including my A1/lm21u/mt5889) dumped frames from scaler output affected by picture settings. Dumping from scaler input gives perfect color for builtin apps, however it breaks hdmi tonemapping afaik. (havent tried due to lack of hdmi device)

dump loc 2 (original): image dump loc 1: image

original: image

Credits to @sundermann for finding it.

sundermann commented 1 year ago

Works on o22 for all content but the result is a little less impressive

TBSniller commented 1 year ago

Thanks! :) Would be great if you add your quirk info also to our Readme: https://github.com/webosbrew/hyperion-webos/blob/10b638fffcb2dde62060f9cd64aad2d406278e73/README.md?plain=1#L56

@tuxuser is quirk counting 0x100, 0x200 for vtCapture in your interest?

tuxuser commented 1 year ago

Wouldn't it make sense to create an enum in tv-native-apis like so:

enum VT_CAPTURE_LOCATION {
  V4L2_EXT_CAPTURE_SCALER_INPUT = 1,
  V4L2_EXT_CAPTURE_SCALER_OUTPUT,
  V4L2_EXT_CAPTURE_DISPLAY_OUTPUT,
  V4L2_EXT_CAPTURE_BLENDED_OUTPUT,
  V4L2_EXT_CAPTURE_OSD_OUTPUT
};

And also rename (undocumented) dump location 1 to something like SCALER_INPUT ?

tavalin commented 1 year ago

Is there any documentation you can point me to compile/build this please?

asturel commented 1 year ago

Is there any documentation you can point me to compile/build this please?

download and setup buildroot from https://github.com/openlgtv/buildroot-nc4

mkdir -p ~/hyperion-webos/build
cd ~/hyperion-webos/build

. /opt/arm-webos-linux-gnueabi_sdk-buildroot/environment-setup

cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=/opt/arm-webos-linux-gnueabi_sdk-buildroot/share/buildroot/toolchainfile.cmake ..

make hyperion-webos gm_backend halgal_backend dile_vt_backend vtcapture_backend 

ssh root@WEBOS_IP 'pkill hyperion-webos'
scp hyperion-webos *.so root@WEBOS_IP:/media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/ 

you can download the build from my fork's action https://github.com/asturel/hyperion-webos/actions/runs/4403108956 and extract to /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service

edit /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service/config.json and add 512 to quirks

satrik commented 1 year ago

@tuxuser @TBSniller is anyone working on this? Would be mindblowing if the capture is really a couple of frames ahead 🤯

TBSniller commented 1 year ago

Currently not. I think this got somehow stalled because of @tuxusers Not answered question. @asturel What do you think about his idea?

sundermann commented 5 months ago

superseded by #116