Tvheadend
A docker image of Tvheadend Server. For Intel x86_64 architecture.
Pre-seeded Configuration
- The default configuration folder is
VOLUME /config. A docker volume. It is not some.htsfolder or anything else like that. - The
VOLUME /configis pre-seeded from the docker Build contextconfig/. Giving the following default settings at build time:
General
- Default Language(s): English
Access Entries
-
The file:
confg/accesscontrol/def0ad0acc0000000000000000000000 -
The default admin account '*' with no username and no password. Which was created by running
tvheadend -C/--firstrun.
If you don't want the default admin account. Then you may instead pre-seed with your own previously saved tvheadend account files instead. Fork / download the dreamcat4/docker-images github repo. Delete the file def0ad0acc0000000000000000000000 from the confg/accesscontrol folder. And put there your alternative user account(s). Rebuild tvheadend image.
Recording / Default DVR Profile
-
The file:
confg/dvr/config/def00000000000000000000000000000 -
Stream profile - pass through (.TS)
-
Episode Duplicate Detect: true
-
Recoding System Path: /recordings
-
Filename Charset: ASCII
-
Make Subdirectories Per Title: true
-
Include Date In Filename: true
-
Include Episode In Filename: true
-
Put Episode In Filename Before Date And Time: true
-
Remove All Unsafe Characters From Filename: true
-
Use Windows-compatible filenames: true
Recording / Timeshift
- Enabled: true
- On-Demand: true
- Storage Path: /recordings/.timeshift/buffer
- Max. Period (mins): 60 (per client)
- Unlimited size: true
- Max RAM Size (MB): 100
Usage
docker run -v /path/to/your/recordings:/recordings -v /etc/localtime:/etc/localtime:ro \
dreamcat4/tvheadend [extra tvheadend args...]-
The default arguments to start tvheadend are always
tvheadend -u hts -g video -c /config. You can change this by overriding theENTRYPOINTarray. -
Do not make your
/configvolume a host mount/host_folder:/mountpount. If you want this image to copy the tvheadend pre-seed configration data into/config. Else you will need to configure everything yourself from scratch. And there will be no pre-seeded configration. -
You can create your own variant(s) of this basic image, with localized configuration that gets pre-seeded into the tvheadend
/configfolder. See:dreamcat4/tvheadend-uk-atlasfor an example. -
SAT>IP server(s) on your local network will not work with Docker's default NAT style of networking. Tvheadend will log: 'Scan no data failed' or similar messages indicating a failure to communicate with the SAT>IP server. To solve that you can either:
-
Specify the docker networking mode as
--net="host" -
Use
dreamcat4/pipeworkto configure the networking instead.
-
-
To access DVB Tuners attached to your host machine, you will need to specify the
--deviceflag, multiple times. For example:
device:
- /dev/dvb/adapter0/demux0
- /dev/dvb/adapter0/dvr0
- /dev/dvb/adapter0/frontend0
- /dev/dvb/adapter0/net0- The August DVB-T210v1 / Geniatech T220 tuner requires Linux Kernel 3.17 or higher. Other tuners will have different requirements. Run the
w_scanor similar on you host system to check your DVB tuner is working properly... before trying to use it inside Tvheadend.
GUI configuration
Add networks
-
Add Network:
- Type: DVB-T Network
- Name: DVB-T/T2 - uk-Rowridge
- Network Discovery: true
- Skip Initial Scan: false
- Pre-defined Muxes: United Kingdom: uk-Rowridge
- Idle Scan Muxes: true
- Save
-
Add Network:
- Type: DVB-S Network
- Name: DVB-S/S2 - 28.2E:Astra
- Network Discovery: true
- Skip Initial Scan: false
- Pre-defined Muxes: > 28.2E:Astra
- Orbital Position: 28.2E : Astra 2A/2C/2E/2F/Eutelsat 28A
- Idle Scan Muxes: true
- Save
Set up tuners
-
Set up the DVB-T/T2 usb tuners
-
For each tuner set:
- Over-the-air EPG: false
- Networks: DVB-T/T2 - uk-Rowridge
- Priority: -1
- Streaming Priority: -1
- Save
-
(Leave alone)
- Linked Input: Not Linked
-
-
Set up the sat>ip tuners
-
For each tuner set:
- Over-the-air EPG: false
- Satellite Positions: 1
- Save
-
(Leave alone)
- Master Tuner: This Tuner
- Initial Scan: true
- Idle Scan: true
- Linked Input: Not Linked
- Next tune delay: 50
- Force teardown delay: false
-
For each position set:
- Networks: DVB-S/S2 - 28.2E:Astra
-
-
Enable each 'Position' of each sat>ip tuner
-
Enable each of the sat>ip tuners
Eable bouquet
-
Wait for FreeSAT bouquets to appear
-
To force bouquet scan on same mux:
- Wait for first few bouquets to appear
- Find any FreeSAT bouquet
- Similar bouquets are all on same mux
- Name: England HD: -
- Comment: 11426H in > 28.2E:Astra
- Edit:
- Enable: true
- Rescan: true
- Save
- Edit:
- Similar bouquets are all on same mux
- Find any FreeSAT bouquet
- Wait for first few bouquets to appear
-
Find correct FreeSAT bouquet for your local region
grep dvb-freesat://dvbs,28.2E,0110,28 bouquet/* grep 'England HD: South/Meridian S' bouquet/*
-
Name: England HD: South/Meridian S
-
Source: dvb-freesat://dvbs,28.2E,0110,28
-
Seen Services: 261
-
Comment: 11426H in > 28.2E:Astra
-
Edit the Target Regional Bouquet
- Enable: true
- Rescan: true
- Auto-Map to Channels: true
- Map Radio: true
- Create Tag: true
- Save
-
FreeSat bouquet regions:
-
Region(28) BBC 1 South/ITV Merid. South/C4 South & E/C5 Reg.2
-
Region(32) BBC 1 South/ITV Merid. South/C4 South & E/C5 Reg.2
-
Check All Bouquet Channels Were Added
-
Wait for bouquet to map FreeSAT channels
- Can take from 30 minutes to 1 hour
- Can take up to 4 (FOUR) hours to fully map everything
-
Check for healthy bouquets! Example:
- Name: BSkyB Bouquet 13 - Test: London
-
Seen Services: 883
-
Bouquet completion - Check for new mapped Channels
-
The line of Enabled (target) Bouquet should show:
-
Services: 257 <------ before was '0'
-
Seen Services: 261
-
-
Services
- Check for missing channels not in the FreeSAT Bouquet
- Manually map missing un-mapped channels
-
Channels
- Assign Channel Numbers
Enable OTA epg
-
Finish set up: DVB-T/T2 usb tuners
- For each tuner set:
- Over-the-air EPG: true
- Save
- For each tuner set:
-
Finish set up: sat>ip tuners
- For each tuner set:
- Over-the-air EPG: true
- Save
- For each tuner set:
-
Leave alone
Debugging Tvheadend
- Official tvheadend debugging guidelines
Test core file is generated
docker run -it --privileged=true dreamcat4/tvheadend-debug --abort- Must be run in privileged mode, to allow modification of
/procto set the core file path.
To get a stack trace when tvheadend hangs / freezes (Deadlock or Livelock)
If the container name is tvheadend-debug, you can just run:
docker exec -it tvheadend-debug stacktraceAnd it will invoke the stacktrace script, dumping all output to stdout.
To get core files, and other artifact files
This is useful in addition to the full output. So those files can be uploaded as attachments on the issue tracker.
docker run -v ~/tvh_debug:/tmp -it --privileged=true dreamcat4/tvheadend-debug