tvpipe tvpipeOperations Manual
Section 09Public links
09
Option
--tunnel
Providers
Cloudflare
OpenTunnel

Public links

--tunnel puts tvpipe's browser page on a public https link, for people who are not on your network.

Time limit

--tunnel-ttl MIN lets new viewers join for MIN minutes only.

09.1Watching from elsewhere

With the player, anyone with the link watches in their browser. That is preview, or play, screen and test-pattern with --to browser.

$ tvpipe preview movie.mp4 --tunnel
$ tvpipe screen --to browser --tunnel=opentunnel

tvpipe prints the link. In a terminal it also draws the link as a QR code, so a phone can open it by scanning the screen. --no-qr, or TVPIPE_NO_QR=1, turns that off.

At most 4 people can watch over a link. Each of them gets a full copy of the stream, so your upload speed limits how many can watch.

Time limit

The link lets people in for 60 minutes. --tunnel-ttl MIN changes that, and 0 removes the limit.

09.2Sharing to your TV from elsewhere

With the share page, someone elsewhere opens the link and shares a tab, a window or a screen to your TVs.

$ tvpipe share --to "Living Room" --tunnel

Nothing reaches the TV until you allow it. tvpipe asks in the terminal and shows their address, their browser and what they want to share. Answer y to allow it. --yes skips the question.

Programs that use --machine or the Node SDK have no terminal to ask in. They need --yes, in the SDK yes: true, or remote shares never show.

QR codes

tvpipe qr TEXT prints any link as a QR code, --svg as an SVG file.

09.3Any web app

tvpipe tunnel PORT puts a server of your own on a public link, for example a web app on port 8080. It runs until you stop it.

$ tvpipe tunnel 8080
$ tvpipe tunnel 8080 --tunnel=opentunnel

Your server answers everything that comes in, so it decides who may do what.

Party games do not need this: tvpipe playshare starts its own link for the phones, OpenTunnel, else Cloudflare, reusing the last quick tunnel.

Spelling

Attach the provider with =. In --tunnel opentunnel the second word is read as the input.

09.4Providers

Both are built in. Neither needs an account or another program.

OptionProvider
--tunnel, --tunnel=cloudflareA Cloudflare quick tunnel on trycloudflare.com. Ready in about 7 seconds, with a new address every run. Cloudflare can see the page and the stream.
--tunnel=opentunnelOpenTunnel. The encryption ends in tvpipe, so the relay cannot read anything. The first use sets up this computer, which takes about 20 seconds once.

09.5Safety

  • Every link has a secret of its own and stops working when tvpipe stops.
  • Your local link and its secret never leave the computer.
  • A remote share only reaches your TV after you allow it.

09.6Limits

  • Cloudflare's quick tunnels have no uptime guarantee and are not meant for heavy video.
  • After a few dozen quick tunnels from one internet address in an hour, Cloudflare refuses new ones with “429 Too Many Requests” for an hour or more. Wait, or use --tunnel=opentunnel.
  • OpenTunnel allows 30 new tunnels per hour per address, but a computer only creates one, on its first run.

The details are in docs/tunnels.md.