Skip to content

Add Media

Provider is the adapter layer that turns external media into SyncTV playback results. Before integrating, answer:

QuestionWhy it matters
Can the client access the media directly?Decides direct play versus proxy
Does the upstream require special headers or cookies?Decides whether browsers can direct play
Are credentials user-owned or instance-owned?Decides user binding, Provider instance, and encryption

Built-in Provider types include alist, bilibili, emby, direct-url, rtmp, and live-proxy. A remote Provider instance is stored in the database and connects SyncTV to a separate Provider service; it is not the media_providers YAML object.

  1. Configure security.credential_encryption_key or _file.
  2. Confirm local Provider timeouts: media_providers.<type>.request_timeout_seconds and connect_timeout_seconds.
  3. Create a remote Provider instance through management APIs or CLI if needed.
  4. Test login, browse, search, parse, and playback with an administrator.
  5. Test direct playback, proxy playback, and Range seek.
  6. Watch Provider error rate, proxy errors, slice cache hits, and upstream status.

Use for: mounted drives, directories, file browse, and search.

Focus:

  • Login, list directories, search, choose a file, and add it to a playlist.
  • Upstream URLs may require a specific User-Agent.
  • If the browser cannot set required headers, use proxy playback.
  • Large directories should use pagination, search, and caching.

Validate: listing works, search works, either direct or proxy playback works, and seek does not produce continuous 4xx/5xx.

ModeConfigurationUse case
Local built-in Providermedia_providers YAML timeoutsSyncTV directly accesses upstream Providers
Provider instanceManagement API/CLI, stored in databaseMultiple instances, credentials, or remote services
Remote ProviderInstance endpoint, tls, jwt_secret, etc.Separate Provider capability or network boundary

Configuration needed by the remote Provider to access upstream media belongs to that remote service, not the SyncTV media_providers object.

  • Use security.credential_encryption_key_file.
  • Make credential ownership explicit: user, instance, or remote Provider service.
  • Never write cookies, tokens, API keys, or passwords into sourceConfig, URL query, logs, or screenshots.
  • Before rotation, confirm whether credentials are referenced by playlists, provider credentials, or remote instances.

See Security Hardening and Rotation.

SymptomCheck first
Browse works but playback failsPlayback URL, headers, proxy mode, upstream Range
Direct works but proxy failsHeaders sent to proxy and whether upstream blocks server IP
Proxy works but direct failsBrowser header restrictions, CORS, client network
Bilibili intermittent 403Cookie, Referer, User-Agent, CDN behavior
Multi-replica live 404Publisher node, HLS backend, shared storage, OSS