Sign inSign up

fbartolini/mytview

By fbartolini

•Updated about 1 month ago

Your video library, your server, every screen. Self-hosted viewer with native TV and phone apps.

Image
0

1.8K

fbartolini/mytview repository overview

⁠MytView

Your video library, your server, every screen. MytView is a clean, fast player for a video library you host yourself: video files plus their metadata sidecars (.info.json, or Kodi/Emby .nfo for TV series and movies). Run this container on your NAS, home server or mini-PC and watch in any browser, or with the native iPhone / iPad / Apple TV, Android / Google TV and Samsung TV apps.

  • Private by design. No cloud, no analytics, no ads. Your videos stream straight from your server to your device.
  • Read-only. Your library is mounted :ro; MytView never writes to, moves, or deletes your files.
  • Channels, series and movies. Creator channels, TV shows with seasons and episodes, and a movie poster wall, each configured in the UI.
  • Everyone in the house. Each person gets their own sign-in, watch history and private collections; the owner decides who sees what.
  • Plays what your device can, converts what it can't. Direct playback first; anything else is transcoded live into a stream that starts in seconds (Intel VAAPI when available, CPU otherwise). Nothing converted ahead of time, nothing stored.
  • Subtitles and audio tracks. Sidecar and embedded subtitles, audio track selection, and caption settings that follow each person across devices.
  • Offline on the phone. The iPhone and iPad apps keep movies and episodes on the device and follow a series for the next unwatched ones; the server hands out each copy in the format the device plays, remuxing H.264 and HEVC without re-encoding, and paces a batch so it never crowds out someone watching live.
  • Federation. Peer with other MytView households and share whole libraries or single shows; their catalogs merge into yours while the video streams directly between homes.
  • Plex sync. Two-way watched-state and resume sync with a Plex server on the same library, per user.

Website: https://mytview.com⁠ · Privacy: https://mytview.com/privacy/⁠ · Source (GPL-3.0): https://github.com/fbartolini/mytview-server⁠


⁠Quick start

# docker-compose.yml
services:
  mytview:
    image: fbartolini/mytview:latest
    container_name: mytview
    restart: unless-stopped
    ports:
      - "8700:8700"
    environment:
      ALLOW_SIGNUP: invite            # first account becomes the owner
      # ORIGIN: https://mytview.example.com   # only behind a reverse proxy / TLS
    volumes:
      - /path/to/your/library:/media:ro   # your video library, READ-ONLY
      - mytview-data:/data                # accounts + watch state + index (keep this)
      # - /path/to/scratch:/transcodes    # live-transcode segments + image cache (optional)
volumes:
  mytview-data:
docker compose up -d

Open http://your-host:8700⁠ and sign up: the first account becomes the owner. Then add your libraries under Admin → Libraries (a folder, a format: channels, series or movies). After that, signup needs a single-use invite unless ALLOW_SIGNUP=all.


⁠Configuration

⁠Volumes
Container pathPurposeNotes
/mediaYour video libraryMount read-only (:ro). MytView never modifies it.
/dataAccounts, sessions, watch state, the indexDurable: back this up. The index rebuilds from disk; your users and progress do not.
/transcodesScratch for live-transcode segments and the image cacheOptional but recommended. Segments exist only while someone is watching and are swept on idle and at start-up. Never inside your library.
⁠Environment
VariableDefaultPurpose
ALLOW_SIGNUPinviteinvite (first account = owner, then invite-only), all (open signup) or off.
ALLOW_INVITESownerWho may create invite links: owner or all.
ORIGINYour external URL. Set only behind a reverse proxy / TLS.
EXTERNAL_URLThe address other MytView servers reach you at, if it differs from what the app can derive (federation only).
TRANSCODE_HWACCEL01 enables Intel VAAPI hardware encoding (needs /dev/dri passed through, amd64). Falls back to CPU automatically.
HLS_DIR/transcodes/hlsWhere live-transcode segments are written. off disables live transcoding entirely (files then play only where the device can decode them).
HLS_MAX_SESSIONS3 (6 with hardware encoding)Concurrent live encodes. Raise it if your CPU or GPU keeps up (the About page shows encoder use).
HLS_MAX_COPY_SESSIONS4Concurrent stream-copy sessions (remux only, no encoder): what the apps' offline downloads of H.264 files use.
IMAGE_CACHE_DIR/transcodes/imgcacheResized artwork for the apps. off serves originals.
SCAN_INTERVAL300Seconds between library rescans (0 = only on start and on demand).

Baked into the image (override only if you must): PORT=8700, HOST=0.0.0.0, MEDIA_ROOT=/media, DB_PATH=/data/index.db, TRANSCODE_DIR=/transcodes, and KEEP_ALIVE_TIMEOUT=65 / HEADERS_TIMEOUT=66 (idle connections stay open longer than a reverse proxy's upstream keep-alive, so the proxy never reuses a connection the server just closed — if your proxy keeps upstream connections longer than 60 s, raise both to match).

⁠Optional: hardware transcoding (amd64 + Intel iGPU)
    environment:
      TRANSCODE_HWACCEL: "1"
    devices:
      - /dev/dri:/dev/dri

Behind a reverse proxy, allow at least 60 s of read timeout on /hls/ (a first segment of a cold transcode can take a while; the server itself never holds a request beyond ~45 s, and answers 503 + Retry-After when it needs the client to come back later).

Live transcoding is on by default and only runs when a device cannot play a file directly. Without a GPU it uses the CPU (libx264); on arm64 it is CPU-only. Check the container's VA stack with docker exec mytview vainfo.


⁠Accounts and privacy (all in the web UI)

  • Change your password from the avatar menu → Account (every user).
  • No email is stored. If someone forgets their password, the owner generates a single-use reset link under Users and sends it to them. The owner can also deactivate or delete accounts. A locked-out owner resets from a shell: docker compose exec mytview node scripts/set-password.mjs <username>.
  • Sharing (owner-only): a per-person × per-channel grid with bulk controls, plus whole-library grants for federated servers. Each Library sets whether newly found channels or shows default to public or private.
  • TV sign-in without typing: on Apple TV, Google TV or Samsung TV, scan the code with the phone app. Only a one-time encrypted handshake is relayed; no media ever passes through it.

⁠Tags and architectures

  • latest, and one tag per release (0.4.7, ...).
  • Multi-arch manifest: linux/amd64 and linux/arm64.

⁠First run

The first visit shows Sign up: create the owner account, add a library, and the index builds in the background (you can browse while it fills). Point the mobile and TV apps at the server address and sign in with the same account. Rescan any time from the web UI (or POST /api/scan).

Tag summary

Content type

Image

Digest

sha256:d9d7d69e2…

Size

264.1 MB

Last updated

about 1 month ago

docker pull fbartolini/mytview