Sign in

tvheadend

443f15ba-ls2

Tvheadend works as a proxy server: is a TV streaming server and recorder for Linux, FreeBSD and Android supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT>IP and HDHomeRun as input sources. Tvheadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming. Multiple EPG sources are supported (over-the-air DVB and ATSC including OpenTV DVB extensions, XMLTV, PyXML).

docker pull ghcr.io/linuxserver-playground/tvheadend:latest
443f15ba-ls2 · amd64 · CI screenshot · test report

Quick start · configure#

Pick the optional settings and mods you want, set your paths, ports and values, then copy the result.

Image
Identity

The user the application runs as and its timezone.

Required
Where TVHeadend show store it's config files.
Where you want the PVR to store recordings.
WebUI
HTSP server port.
Optional settings3

Tick what you need; it is added to every output with its value.

Mods

0 for tvheadend, 0 universal mods suggested for it, and 13 other universal mods. Ticked mods join one DOCKER_MODS value in the order you tick them.

---
services:
  tvheadend:
    image: ghcr.io/linuxserver-playground/tvheadend:latest
    container_name: tvheadend
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - /path/to/tvheadend/data:/config
      - /path/to/recordings:/recordings
    ports:
      - 9981:9981
      - 9982:9982
    restart: unless-stopped

Required settings only. Tick optional settings and mods to add them.

  • Replace the /path/to folders with real folders on your host; they are created if missing.

Install on …

Adding a store to your platform

Version tags#

TagLatest buildBuiltTests
:latestStable releasesbranch master · stable443f15ba-ls2amd64 · arm64 passed

Architectures#

Pulling :latest picks the right one for your host automatically.

  • x86_64amd64-latest
  • arm64arm64v8-latest

Inside the latest image#

ghcr.io/linuxserver-playground/tvheadend:443f15ba-ls2

Explore this build
Base image
baseimage-alpine:3.20
Upstream version
443f15ba
amd64 compressed
288 MB · 12 layers
arm64 compressed
273 MB · 12 layers
amd64 packages
321 · Alpine Linux v3.20
arm64 packages
317 · Alpine Linux v3.20
Tests
passed
Built
Reason
upstream check

In the fleet#

Live branches, their latest release, upstream version and next scheduled check.

tvheadend on the fleet board

live branchesloading…

Branch → tagLast buildReleasedUpstreamDriftNext checkFlags
master → :latestsuccess
443f15ba
? unknown––

Application setup#

The setup depends if you run the one of the stable tags or use latest. Running latest is the easiest as it has a setup wizard.

Stable

First thing to do is to go to Configuration –> DVB Inputs –> TV adapters and add your LNB/switch info. Then create a new network in the Networks tab and set the correct pre-defined muxes and orbital position. Go back to the TV adapters tab and add the newly created network under universal LNB. Go back to the Networks tab and mark the network you created earlier and press the Force Scan button. Tvheadend will now scan the muxes for services.

After the scan is done, head to the Services tab and find the services you want as channels, mark them, and press map services. They should now appear under Configuration –> Channel/EPG.

Latest

The first thing to do is to run the setup wizard. If it doesn’t pop up at first login, you can find it in Configuration –> General –> Base and click Start Wizard. This will guide you to set up the basic parts of tvheadend.

Configuring XMLTV grabber

To configure the XMLTV grabber, first check if your grabber is listed in Configuration –> Channel/EPG –> EPG Grabber Modules. If it’s listed, you will have to configure the grabber before enabling. Find the path in the path field of your grabber. We will use the last part. It starts with tv_grab_. Add it after /usr/bin/ in the below command. There should be no space between Usr/bin/ and the part you added.

docker exec -it -u abc tvheadend /usr/bin/for_you_to_fill_out --configure

Now follow the on-screen progress. If you get asked about cache, just accept the default. After you have configured your grabber, you can go back and enable your grabber.

If you already have a configuration file, you can add it in the .xmltv folder where you mapped the /config volume. If it’s not created, create it.

Comskip This container comes with Comskip for commercial flagging of recordings. This you have to add in the recording config of tvheadend. Go to Configuration –> Recording. Change the view level to advanced in the top right corner, and add the below in the Post-processor command field.

/usr/bin/comskip --ini=/config/comskip/comskip.ini "%f"

Now comskip will run after each recording is finished. You will find comskip.ini in the comskip folder of your /config volume mapping. See the Comskip homepage for tuning of the ini file.

FFmpeg

FFmpeg is installed in /usr/bin/ in case you need to use it with pipe.

EPG XML file

If you have EPG data in XML format from a supplier, you can drop it in the data folder of your /config volume mapping. If it doesn’t exist, create it. Then choose the XML file grabber in Configuration –> Channel/EPG –> EPG Grabber Modules. If you use WebGrab+Plus, choose the WebGrab+Plus XML file grabber. The XML file goes in the same path as above. The xml file has to be named guide.xml.

For advanced setup of tvheadend, go to [Tvheadend][appurl]

Picons

We have added all the picons from picons in the folder /picons. To enable the use of these picons, add the path to the Channel icon path in Configuration –> General –> Base. You need to enable minimum advanced view level to see the picons options.

Parameters#

Ports#
PortFunctionRequired
9981:9981WebUIrequired
9982:9982HTSP server port.required
Environment variables#
VariableFunctionRequired
PUID=1000User IDrequired
PGID=1000Group IDrequired
TZ=Etc/UTCTimezonerequired
RUN_OPTS=Optionally specify additional arguments to be passed. See Additional runtime parameters.optional
Volumes#
PathFunctionRequired
/configWhere TVHeadend show store it's config files.required
/recordingsWhere you want the PVR to store recordings.required
Devices#
DeviceFunctionRequired
/dev/driOnly needed if you want to use your AMD/Intel GPU for hardware accelerated video encoding (vaapi).optional
/dev/dvbOnly needed if you want to pass through a DVB card to the container. If you use IPTV or HDHomeRun you can leave it out.optional

Additional runtime parameters#

In some cases it might be necessary to start tvheadend with additional parameters, for example to enable debugging or specify webroot for reverse proxy. Be sure to have the right parameters set, as adding the wrong once might lead to the container not starting correctly.

Environment variables from files (Docker secrets)#

You can set any environment variable from a file by using a special prepend FILE__.

As an example:

-e FILE__MYVAR=/run/secrets/mysecretvariable

Will set the environment variable MYVAR based on the contents of the /run/secrets/mysecretvariable file.

Umask for running applications#

For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional -e UMASK=022 setting. Keep in mind umask is not chmod it subtracts from permissions based on it’s value it does not add. Please read up here before asking for support.

User / Group Identifiers#

When using volumes (-v flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user PUID and group PGID.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance PUID=1000 and PGID=1000, to find yours use id your_user as below:

id your_user

Example output:

uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)

Updating Info#

Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the Application Setup section above to see if it is recommended for the image.

Below are the instructions for updating containers:

Via Docker Compose

  • Update images:

    • All images:

      docker-compose pull
    • Single image:

      docker-compose pull tvheadend
  • Update containers:

    • All containers:

      docker-compose up -d
    • Single container:

      docker-compose up -d tvheadend
  • You can also remove the old dangling images:

    docker image prune

Via Docker Run

  • Update the image:

    docker pull ghcr.io/linuxserver-playground/tvheadend:latest
  • Stop the running container:

    docker stop tvheadend
  • Delete the container:

    docker rm tvheadend
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)

  • You can also remove the old dangling images:

    docker image prune

Image Update Notifications - Diun (Docker Image Update Notifier)

Tip

We recommend Diun for update notifications. Other tools that automatically update containers unattended are not recommended or supported.

Building locally#

If you want to make local modifications to these images for development purposes or just to customize the logic:

git clone https://github.com/linuxserver-playground/docker-tvheadend.git
cd docker-tvheadend
docker build \
  --no-cache \
  --pull \
  -t ghcr.io/linuxserver-playground/tvheadend:latest .

The ARM variants can be built on x86_64 hardware and vice versa using ghcr.io/linuxserver/qemu-static

docker run --rm --privileged ghcr.io/linuxserver/qemu-static --reset

Once registered you can define the dockerfile to use with -f Dockerfile.aarch64.

Every push builds and tests the image with the shared workflow in linuxserver-playground/workflows; every build’s tests, screenshots and package changes are on the image’s builds on the website.

Builds#

The newest five builds per branch, each with its CI report.

TagBuiltReasonChangeResultSize
443f15ba-ls2master · 7052bde3upstream checkupstreamsuccess288 MB amd64273 MB arm64
87509890-ls2master · 7052bde3upstream checkupstreamsuccess288 MB amd64273 MB arm64
595a8972-ls2master · 7052bde3upstream checkupstreamsuccess288 MB amd64273 MB arm64
51ec612f-ls2master · 7052bde3release check or requested rebuildidenticalsuccess288 MB amd64273 MB arm64
51ec612f-ls1master · e9fa84fbupstream checkinitialsuccess288 MB amd64273 MB arm64

Mods#

Add a mod with DOCKER_MODS=<image>; separate several with |.

All mods for tvheadend

No mod targets tvheadend specifically; the 13 universal mods work with every image.

Changelog#

  1. Rebase to Alpine 3.20.

  2. Rebase to Alpine 3.19.

  3. Add mesa-va-gallium package for AMD transcoding.

  4. Add perl-json-xs package.

  5. Install XMLTV from Alpine repos.

  6. Rebase to Alpine 3.18.

  7. Extract picons during build instead of init.

  8. Rebase to Alpine 3.17, migrate to s6v3, drop armhf support.

44 earlier entries
  1. Update sample env vars and how RUN_OPTS are handled.
  2. Switch to new picons builder.
  3. Added URL XMLTV grabber.
  4. Rebase to Alpine 3.15. Disable execinfo to fix builds. Update xmltv.
  5. Added Intel iHD driver support.
  6. Update to Alpine 3.12.
  7. Add requests and perl-json-xs package.
  8. Update to Alpine 3.11.
  9. Improve permission fixing on render & dvb devices.
  10. Add AMD drivers.
  11. Attempt to automatically fix permissions on /dev/dri and /dev/dvb.
  12. Rebasing to alpine 3.10.
  13. Rebase to Alpine 3.9, fix init logic to only chown once.
  14. Switching to new Base images, shift to arm32v7 tag.
  15. Bump xmltv to 0.6.1.
  16. add perl-lwp-useragent-determined.
  17. Bump xmltv to 5.70, ensure version tagging works by cloning tvheadend.
  18. Add picons path to config.
  19. Add pipeline logic and multi arch.
  20. Rebase to alpine 3.8 and use buildstage type build.
  21. Add JSON::XS Perl package for grab_tv_huro.
  22. Add dvbcsa package.
  23. Use sourceforge master rather than mirror for xmltv.
  24. Add lost libva-intel-driver.
  25. Fix wrong version of iconv used.
  26. Add vaapi support, some cleanup and dropping of deprecated options.
  27. Deprecate cpu_core routine lack of scaling.
  28. Rebase to alpine 3.7, linting fixes.
  29. Add codec dependencies.
  30. Increase uniformity across all archs.
  31. Update README with full path for comskip.
  32. Move to one branch for all 4.2 releases.
  33. Rebase to alpine 3.6.
  34. Update to tvheadend 4.2.1 stable.
  35. Use repo version of gnu-libiconv rather than compiling.
  36. Chain cpanm installs in one block and use --installdeps.
  37. Perl changes, add picons file to gitignore and update XMLTV to 0.5.69.
  38. Add variable to add additional runtime paramters.
  39. Update to alpine 3.5 and change dvb-apps to only compile needed libs.
  40. Add picons from picons.xyz to /picons folder and add info to README.
  41. Fix broken tv_grab_wg, libs for xmltv and update README.
  42. Update XMLTV to 0.5.68 and update README.
  43. Add layer badges to README.
  44. Initial Release.

Support#

Questions about running tvheadend? Start with the documentation and the community; open an issue for bugs.

  • Shell access whilst the container is running:

    docker exec -it tvheadend /bin/bash
  • To monitor the logs of the container in realtime:

    docker logs -f tvheadend
  • Container version number:

    docker inspect -f '{{ index .Config.Labels "build_version" }}' tvheadend
  • Image version number:

    docker inspect -f '{{ index .Config.Labels "build_version" }}' ghcr.io/linuxserver-playground/tvheadend:latest

Community project

Improve tvheadend

This image is kept up by volunteers, and you can be one of them. You don't need to know how the pipeline works: point an AI agent at the harness and describe what you want. It reproduces the problem in your Docker, tests the change and drafts the pull request for you to check.

Ask your agent

  • Something is wrong with the tvheadend image: <what you saw>. Reproduce it, fix it and draft the PR.
  • Add <package> to the tvheadend image, test it and draft the PR.
  • Make a mod for tvheadend that <what you need>, and test it.

Contributing an image Every way to help Get the harness (opens in a new tab)

Writing

Posts about tvheadend

4 min read

How To: Setup Containers on QNAP

The aim of this guide will be to show new users of our containers how to get started on the QNAP platform. I will cover how to go about setting up the user and permissions as well…

Related

Browse all

craft-apps

v0.23.1-ls14

ArtCraft is a suite of open source creative applications written in Rust. This image bundles PhotoCraft (image editor), VectorCraft (vector illustration), FilmCraft (video editor), LightCraft (photo library and raw developer), PdfCraft (PDF workbench), EffectCraft (motion graphics and VFX compositor), DesignCraft (page layout and publishing) and FigCraft (interface design and prototyping) in a single desktop.

0 GitHub starsselkiesarm64

htpcmanager

26a641bf-ls10

Htpcmanager is a front end for many htpc related applications.

0 GitHub starsalpinearm64

minisatip

v2.0.209-ls24

Minisatip is a multi-threaded satip server version 1.2 that runs under Linux and it was tested with DVB-S, DVB-S2, DVB-T, DVB-T2, DVB-C, DVB-C2, ATSC and ISDB-T cards.

0 GitHub starsubuntuarm64

oscam

11991-ls23

Oscam is an Open Source Conditional Access Module software used for descrambling DVB transmissions using smart cards. It's both a server and a client.

0 GitHub starsalpinearm64