Streaming PC to LG TV

Streaming a desktop PC to the TV is very convenient for webbrowser streaming, for watching movies, series, or anime, for gaming, or navigating the desktop, file-system, and applications.

After I got my new TV at the end of last year I looked into alternatives to my previous hardware Steam Link. On big panning movements in anime I saw stuttering, which I had always been wondering where the bottleneck lies, unable to narrow it down.

Exploration of Alternatives

From [PC] To [TV] Notes
Steam Steam Link hardware + HDMI performance issues; video stuttering on wide scenery panning [in anime]
Steam Steam Link smart-TV app unfortunately not available on LG TVs WebOS
Steam IHSplay IHSPlay is an open source Steam Link Client for webOS TV
WiFi screen mirroring (WIN+P) not possible over cable
LG WebOS Windows Remote Desktop not adequate quality or FPS performance for video
nVidia thing was dropped by nVidia, and I have AMD
Kodi Kodi App
Sunshine Moonlight Works great! Low latency, after inherent setup-hassle works stable

Streaming from Sunshine to Moonlight

Installing and running Sunshine on the PC is as simple as any other program. The service runs in the background, and offers a website user interface.

The TV setup is a hassle because it requires a developer account and manual installation, because the Moonlight app is not published in the official WebOS app store.

  1. Prerequisite: Have PC and TV in the same local network
  2. Install Sunshine on the host PC
  3. Install Moonlight on the LG TV
    1. On TV: Enable Dev Mode on the TV
      1. Register a WebOS TV Developer Account
      2. Open Home -> Developer Mode (app) -> Login (LG Account email + password) -> confirm TV restart
      3. Open Home -> Developer Mode
        1. Enable Developer mode
        2. Enable key server
    2. On PC: Install webOS Dev Manager
    3. Connect webOS Dev Manager and TV
      1. webOS Dev Manager -> TV Dev Mode App -> Enable dev mode and key server -> add TV (see TV Developer Mode app for details; should still be open from previous steps)
    4. On PC: In webOS Dev Manager Install Moonlight
  4. Connect Sunshine and Moonlight
    1. On PC: Open Sunshine
    2. On TV: Open Moonlight
    3. In Moonlight connect to PC (automatically appears when visible in the network)
    4. Follow authentication via displayed PIN (only necessary once) (available (on network) PC -> connect with PIN - sunshine notifies and shows PIN -> enter on TV -> Connected)

You are now connected.

The webOS Dev Manager serves as a remote TV manager on the PC. The TV has to be on, and on the network, then you can install apps on it remotely, and a few other functionalities.

Automatically Refreshing Developer Mode Expiry

The TV developer mode remains in developer mode for 999 hours (~41 days) by default. After expiry, it has to be enabled and connected again.

The TV offers a HTTP endpoint you can call to extend it back to 999.

I set up a scheduled task in Windows Task Scheduler that runs every hour. It’s a simple inexpensive call, so every hour is fine, and for when the TV is regularly turned off, it’s still regular enough to hit when it is on.

My preferred shell is Nushell, so I have it installed, and use

"C:\Program Files\nu\bin\nu.exe" C:\dev\tv-webos\

http get --redirect-mode error | from json

This works through other scripts and programs too, as long as you can send the HTTP GET request with the correct token, while your TV is on[line].

To find the correct token, you can check in webOS Dev Manager -> Info -> Renew automatically… and it shows you the URL that you need to call one way or another. It also offers a (Linux) shell script, and IFTTT applet information.

It’s also fine if you call the URL manually from your webbrowser. Given that it’s necessary only about once a month, that’s feasible if you’re not familiar with scripting and/or don’t want to go through the setup.

Wireless Control

Having bought a wireless mouse, connected to my PC as an additional mouse, specifically for control from the sofa made controlling flawless.

I flip the switch and can immediately use the mouse. And after that I flip it off again. No delay. (No holding power button for 3 seconds like I had to on my wireless controller before.)