Tvheadend documentation is authored and maintained by Tvheadend users. If you see something is incorrect or missing please click the GitBook link below to join our documentation team. The GitBook online app makes changing documentation simple, with changes sent directly to our documentation repo on GitHub as a pull-request that project staff can review and merge.
English language skills are not important for contributions! - It is easier for a native speaker to merge changes and then make edits/corrections than to write everything themselves. If you are unsure where to place content in the current documentation structure please use the WIP section - we will move it later.
Android
It is possible to compile Tvheadend for Android but the current project team does not test or release Android binaries or .apk files. If you are the Android platform maintainer we are seeking? .. rsvp!
Muxes/Scan Files
Web User Interface Customisation
Docker
Tvheadend can run isolated from other host processes in a Docker container. The official Tvheadend container can be pulled from the GitHub container repo:
Community created and supported Tvheadend packages for Synology and QNAP users are available from community package repositories. See below for more information:
Please note that General support issues with Tvheadend are welcome in our forum but installation issues with these packages are best directed to NAS vendor forums.
Using w_scan Scan Files
w_scan is an external utility, not supplied with TVHeadEnd (TVH), that can scan for all available muxes and services.
If the default scan files provided with TVH are unable to locate the muxes or services that a user expects to see in their location, the output from w_scan can also be used as a scan file for TVH.
Example
The following command can be used to create a scan file called au-wscan:
w_scan -f t -c AU -x > au-wscan
Linux
Tvheadend binary packages can be downloaded from or you can configure a local package repo to install and update from by running the following shell commands:
DEB Packages (Debian, Ubuntu, RaspiOS)
Run the following shell command to setup a local apt repo:
Tuners
Before you install Tvheadend software you need to have a working tuner device. There are four types of tuner hardware that Tvheadend can use:
Internal PCI/PCIe tuners
Internal i2s tuners
External USB tuners
Concepts
It helps to understand the basic software concepts for Tvheadend:
Hardware & Software
Tuner is the chipset/hardware needed to interpret a digital television signal and extract from it the programme stream. Tuner hardware is also responsible for communicating with your satellite dish via the LNB when using DVB-S.
Stages
Tvheadend setup normally involves the following stages:
Ensure tuners are available for use
Install Tvheadend software
Create a network
Network tuners
IP sources can also be used. These are discussed elsewhere in our documentation.
PCI/PCIe Tuners
Internal PCI/PCIe tuner cards require support for the tuner in the host OS. Most cards require a driver and separate firmware to work. Some cards will be supported through drivers and firmware available in the upstream Linux kernel and will be able to run on any current Linux distro and version. Other cards require downstream/vendor drivers and these may dictate which distro and version must be used to have support. How to install the right drivers and firmware for your hardware is beyond the scope of this guide so please follow the instructions of the tuner card manufacturer.
Tvheadend can do nothing if tuners are not installed working properly. If you have problems, most original card manufacturers (but not cheap clone-card manufacturers) have active forums where you can report issues and ask for assistance.
i2s Tuners
Internal i2s tuners are normally found in Android or Linux set-top box devices with the required drivers and firmware embedded in the OS image that runs on the device. In theory this means the box requires no hardware setup: which is appealing to users. In practice you may need to update the device to the lastest available firmware to ensure best performance, and client software options may be limited to specific pre-installed or embedded versions of popular apps.
Firmware update options for Android set-top boxes are often limited. If you have problems with internal i2s tuners the original box manufacturer must resolve them.
USB Tuners
External USB tuners are often cheap, work well, and are well-matched to smaller boards and boxes that lack internal PCI slots. However, most USB tuners need more than 500mA so will need external direct power or an external USB hub that supports higher current loads to work properly. Bandwidth can also be a problem and even fast USB3 ports can experience bandwidth problems with mulitple USB devices chained from a single port (and USB bus).
Raspberry Pi 0/1/2/3/4 boards internally share USB bus bandwidth with Ethernet. Multiple USB tuner configs and higher-bandwidth HD streams often run into bandwidth issues.
Network Tuners
External network tuners (SAT>IP devices and similar) cost more than internal PCI/PCIe cards and USB devices but are the firm recommendation of the project team: they are easier to configure and require no fiddling with Linux kernel drivers/firmware to create and maintain a working and reliable system.
The extra up-front cost is saved over time with easier maintenance, and the devices typically have excellent and long-term support from their manufacturers.
parameter is beyond the scope of this document, however, the
-f t
parameter is for scanning DVB-T, the
-c AU
parameter sets to country to Australia and the
-x
parameter is required to produce the output format required by TVH.
Use
w_scan -h
and
w_scan -H
for a full list of parameters.
This file can be copied to the scan file location and once TVH has been restarted, used to scan for services.
Depending upon the exact installation of TVH, scan file can be found in various locations:
/usr/local/share/tvheadend/data/dvb-scan//usr/share/tvheadend/data/dvb-scan/
Please Note: depending upon the parameters used, w_scan can take a very long time to perform a scan.
Run the following shell command to setup a local dnf or yum repo:
Tvheadend aims to provide installable packages for as long as possible to extend the usable life of server and tuner hardware. In practice this means if we can still automate regular build testing for popular distributions and versions we will have binaries available.
Driver is software the operating system uses to talk to the tuner hardware. It can be built into the operating system, or might be something you need install, or even compile, separately.
Firmware is binary microcode that the driver sends to the tuner on initialisation. Card firmware is closed-source software and can be a common cause of problems.
Tvheadend
Network is a software definition of your carrier network that tells tuner hardware how and where to look for a signal, e.g. the network defines a such as DVB-T or DVB-S2, and how it is scanned, where the DVB-S satellite is in orbit, and similar.
Muxes are channel frequencies that transmit multiple digital channel signals in the radio frequency space of a single analogue channel. Digital signals are multiplexed (muxed) together to allow more channels to be broadcast.
Services are the individual data streams on a Mux. They can be TV or Radio programmes, or they can provide data services such as digital teletext or catch-up IPTV services.
Channels are mapped against Services. Channels are what client software access when users think “I’d like to watch BBC One now, please”.
Each configuration component supports many-to-many relationships: meaning one component can be related to multiple components of the next type, and vice versa, e.g. one tuner can support multiple networks and one network can exist on multiple tuners.
The following diagram explains the relationship between these components:
Simply, because 'BBC One' probably exists in multiple different places. It has regional variations on multiple frequencies (different services on different muxes) and if often accessible through more than one piece of hardware (two satellite tuners, or one satellite and one terrestrial tuner). When you select a channel to watch or record, Tvheadend needs to know the mapped path to the right service on the right mux .. to ask the right tuner to get the signal for you.
Digital Video Recorder
This tab shows all finished recordings:
'Finished Recordings' Tab
Menu Bar
The following functions are available:
Button
Function
Grid Items
The main grid items have the following functions:
Details: Shows the status of the recording event:
Icon
Description
The detailed information dialog is as follows:
The columns also provide the following details:
Play: Play the selected recording in your browser via the VLC Plugin or some other external player.
Title: The title of the recording.
Subtitle: Text…
Concepts
Tvheadend is operated primarily through a tabbed web interface. There are some basic navigation concepts that will help you use it effectively:
Page Structure
The web interface uses tabs with similar functions grouped together. Tabs for major configuration functions are located on the top row, with tabs for configuration items related to the currently selected major function located on the row below. In some cases a third row of config options will be shown.
Most tabs have display a menu bar with Add, Save, Edit, Undo functions and a spreadsheet-like grid below. Grid items are frequently editable.
Most configuration items are in this grid. However, some item-specific configuration is accessed through the Add and Edit dialog boxes. For example: the main network configuration tab grid covers parameters common to DVB-S, DVB-T, DVB-C and IPTV networks, but configuration like FEC rolloff or mux URL is only present in dialogs for networks that need these values.
Displaying & Manipulating Columns
Some columns are hidden. If you hover the mouse over a column heading a down-arrow will show, and when clicked a drop-down menu appears allowing you to select which columns are visible and which columns are hidden.
The drop-down menu also allows you to sort results. You can also sort columns by clicking on the column header: first click will sort ascending and a second click will reverse the sort (descending).
The same drop-down menu also allows you to filter results using basic string pattern matching.
Editing Fields
To edit a cell in the grid, double click on it and make changes. After a cell has been changed, a red flag or triangle appears in the top-left corner to indicate it has been changed. Changes can be kept (click Save) or discarded (click Undo).
To change a checkbox or radio button, click once.
To add a new entry press the Add button. The new (empty) entry will be shown in the interface but will not be stored in the server configuration until values are added, the configuration is marked as enabled, and then saved. Changes are applied when saved, not when edited.
Requirements
Tvheadend has physical and software considerations:
Intel compatible (i386/x86_64) or ARM (arm/aarch64) CPU
Minimum 1GB RAM
Minimum 1GB storage for app/configuration data
Columns can be rearranged by dragging the column header to a new position.
Columns can be resized by dragging the edges of the column header to the width position required.
Most grid views support ctrl+click to select multiple fields at the same time, and shift+click to select field ranges.
Large capacity storage for recordings
Tuner device(s) with suitable power and connectivity
Operating System that supports the tuners
Server Hardware
Tvheadend is tested on Intel compatible i386/x86_64 CPUs and ARM SoC arm/aarch64 processors. It will need a minimum of 1GB disk space for application binaries and configuration data, although the total required will depend on the number and type of tuners you have, the number of channels received, the choice of programme guide data, etc.
Tvheadend is intended to be lightweight and will run in less than 1GB RAM on low-powered NAS and Single Board Computer devices. Many users run Tvheadend on older Raspberry Pi boards with 512MB physical RAM and perhaps only 256MB free memory: although more is sensible and will result in a better user experience. Note that transcoding is CPU intensive and this feature runs best on powerful multi-core systems.
Recordings consume large amounts of disk storage. SD quality MPEG2 video will typically use 1GB of disk per-hour, while higher-bitrate HD quality H264 will often consume 5GB+ per-hour. Most users who use Tvheadend to record will plan and provision their Tvheadend server with large capacity local HDD or remote-mounted NAS storage.
You will need one or more tuner devices to receive Cable, Satellite, or Terrestrial broadcast sources, or IP sources. Tuner options are discussed in more detail here.
Server Software
Tvheadend is designed for use on Linux and we provide general purpose binary pacakges and Docker containers that can be used with a large range of Linux distributions and distro versions:
Tvheadend is available as an installable add-on for the Kodi focussed distro LibreELEC
Users needing a more specific combination of Tvheadend capabilities can also compile their own binaries or build containers from our public source code.
Connectivity
Internet access is essential for installation and maintenance of Tvheadend, but is not essential during use. Tvheadend needs an accurate clock for EPG timers to work, but this can be synchronised from the broadcast signal if ntp services are not available. Most broadcast services also provide some form of EPG data "over the air" alongside the broadcast signal.
Server hardware and perhaps tuner hardware will require power and physical access to a broadcast feed from aerial, dish, or cable; or via the LAN if you are using SAT>IP, network tuners, or IP sources.
Architecture
Tvheadend can be run in a single-host configuration where the Tvheadend server runs on the same host as client software, e.g. Kodi, and with media recordings stored locally on the same disk. This is common with compact or lower-budget Tvheadend setups with a smaller number of tuners.
In a multi-host configuration Tvheadend runs on a dedicated server, with client software on a separate device. This allows a compact client device to sit alongside the TV while the Tvheadend server (usually a larger device with multiple tuners) is located somewhere else with convenient access to the physical aerial, dish or coax cables that provide input to your tuners
Level 2
intlconv/charsets
Lists the available character sets.
Episode: The episode number of the record.
Scheduled Start Time: The date and time when the recording was started.
Scheduled Stop Time: The date and time when the recording was stopped.
Duration: The total duration of the recording.
File Size: The size of the recording file on disk.
Channel Name: The name of the channel from which the recording was made.
Owner: Text…
Creator: The name of the user who created the recording.
DVR Configuration : The DVR configuration to be used for this recording.
Schedule Status : The status of the recording (completed.
Errors : Text…
Data Errors : Text…
URL : The URL of the recording.
Comment : Text…
Delete
Delete the selected finished recording records and associated files. You will be prompted for confirmation.
Download
Download the selected finished recordings to local disk. You will be prompted to select the path for the saved file(s).
Help
Display this help page.
The recording has completed
Click to display detailed information about the selected recording
Finished Recording Detail
Virtualisation - Proxmox
Tvheadend can be installed either as a VM (linux guest OS) or as an LXC container.
The TV tuner must be passed through to the VM/container
Proxmox VM - Debian
Host OS: Proxmox 8.3.1
Guest OS: Debian 12.8 (bookworm) amd64
Note: the TV tuner is passed through from the Host to Guest (PCI or USB pass through) - installation of the tuner is done on the VM/Guest OS
Install Debian as a VM with at least the minimum requirements - command-line only installs (without desktop environment) recommended to minimise resource usage
Update Debian to latest package versions with
Install Curl package to allow set up of Apt repository
Set up Apt repository - for DEB packages using Curl
Update Apt package list
Install Tvheadend
Passthrough TV tuner hardware to VM guest OS
(this can be done through the proxmox web GUI)
Install the TV tuner on the VM guest OS
Access the Tvheadend web configuration interface at:
https://<yourtvhserverip>:9981
Proxmox LXC - Debian
Host OS: Proxmox 8.3.1
Container Template (Guest OS): Debian 12 standard (12.2-1-amd64)
Note: the TV tuner is first installed on the Host OS (Proxmox) and then passed through to the LXC container (see below) - the pass through must be the whole enumerated device in /dev/dvb/adapter0/<files> and not /dev/usb or /dev/pci as the LXC does not have the kernel modules to install the device.
Set up an LXC container with at least the minimum requirements
The Debian 12 standard LXC template can be downloaded from the Proxmox web GUI
Update Debian packages to latest version
Note: a lot of packages will be updated as the Proxmox LXC template is quite old
Install Curl package to allow set up of Apt repository
Set up Apt repository - for DEB packages using Curl
Update Apt package list
Install Tvheadend
Passthrough TV tuner hardware to VM guest OS
Passthrough all the devices files under /dev/dvb/adapter0/
Set UID=0 (root) and GID=44 (video) for all devices
- GUI method:
From web GUI, nagivate to container, resources, add, pass through - add the devices:
/dev/dvb/adapter0/demux0
/dev/dvb/adapter0/dvr0
/dev/dvb/adapter0/frontend0
/dev/dvb/adapter0/net0
OR
- Command-line method:
Manually edit the LXC config file at: /etc/pve/lxc/<containerid>.conf
Add in the following lines
/dev/dvb/adapter0/demux0,gid=44,uid=0
/dev/dvb/adapter0/dvr0,gid=44,uid=0
/dev/dvb/adapter0/frontend0,gid=44,uid=0
/dev/dvb/adapter0/net0,gid=44,uid=0
Restart LXC container to allow passthrough
Access the Tvheadend web configuration interface at:
https://<yourtvhserverip>:9981
Compiling TVH with VAAPI Support
for
for
Theme
There are three themes that can be used with the TVH Web User Interface.
From Configuration -> General -> Base, in the 'Web Interface Settings' panel, select one of the following themes from the drop‑down list.
Blue (Default)
Timeshift
ADMIN privilege is required for these functions.
timeshift/config/load
Lists the descriptions, options and defaults for configuring the timeshift capability - see Configuration -> Recording -> timeshift.
In order to access Tvheadend behind a reverse proxy server and still be able to stream services or recordings, it is necessary for the reverse proxy server to add or modify some headers in the HTTP request forwarded to TVH.
X-Forwarded-Proto:
Tvheadend currently (as at April 2025) only supports the HTTP protocol natively. To access TVH via HTTPS, an external reverse proxy server is required to convert the incoming HTTPS request to HTTP and forward it to TVH.
In order for TVH to recognise that it is operating behind a HTTPS reverse proxy server, the proxy server must be configured to add the X-Forwarded-Proto: https header to the request forwarded to TVH.
Adding this header will ensure that documents that contain a TVH URL, such as M3U files, will be prefixed with correct protocol identifier.
Host: / X-Forwarded-Host:
The public-facing host name, port number and path returned by TVH within documents such as an M3U can also be modified. As TVH only recognises the X-Forwarded-Host:header when the Host:header is not present, it is recommended that only the Host:header be modified by the proxy in for following format:
This section provides information on the HTTP API for TvHeadend. It was written from the source code of the development version 4.3.
The examples shown were mostly generated from UK Freeview DVB-T / DVB-T2 and Freesat DVB-S / DVB-S2, using a single tuner in each case. Other sources and multiple input devices may give different results.
CAUTION
This API is an advanced feature of TVheadend, and the functionality is unstable and liable to change. The software does not completely validate its inputs and incorrect or unexpected calls may result in undesired behaviour.
API calls which end in /grid, with the exception of epg/events/grid, have a common set of parameters:
start First entry to include. Default is the first (0).
limit Number of entries to include. Default is 50 - use a large number to get all.
filter A JSON object describing the filter(s) to be applied. See Grid Filters below for syntax.
sort Name of the field to sort the records by. A case-sensitive sort is used.
dir if sort is specified then dir=desc produces a reverse sort.
Grid filters
A filter can be applied to the output using a JSON object. The syntax is:
The "comparison" field is only used with numeric data. A "gt" comparison actually matches on greater-or-equal, and "lt" on less-or-equal.
Boolean values must be specified as "0" or "1" (NOT "true" or "false"). A (case-insensitive) regular expression match is used for strings.
The "intsplit" field is used for integer variables which are used to store a quotient and remainder, and defines how the bits of the variable are allocated.
Multiple filters can be applied to a query ONLY if they refer to different fields, so for example it is not possible to query for EPG events having start times between two values.
Load parameters
API calls which end in /load, with the exception of , have a common set of parameters:
meta If > 0 an extra data structure is output, mostly related to the format of the GUI screen where the information is presented. Default is 0.
list This parameter selects which items in the params array are to be output, based on the value of the 'id' field. Multiple entries can be selected, separated by commas, colons or semicolons. A '-' in front of an entry deselects that item (and implicitly selects all others).
HTTP Proxy Examples
The HTSP api method can be used as a proxy to access the HTTP/JSON API. This allows HTSP-only clients access to any JSON feature, including JSON-only features.
Data exchanged to and from the TVH server is achieved by encapsulating the required HTTP/JSON parameters within the HTSP message.
TVH expects to receive encapsulated JSON data and will respond with a HTSP map representing the JSON data returned.
To execute the HTTP API command:
http://TVH:9981/api/channel/grid
Set the path field to channel/grid and send the request. The args field is not required.
The response will be a HTSP map containing an element named response. This element will be a map containing the JSON response presented as HTSP elements.
Intermediate Request
To execute the HTTP API command:
http://TVH:9981/api/channel/grid?sort=number&dir=desc
Set the path to channel/grid as in the previous example.
The arg field must be set to type map, and in this example, contain two str elements.
Map str element named sort should contain the value number and map str element named dir should contain the value desc.
Advanced Request
To execute the HTTP API command:
http://TVH:9981/api/dvr/entry/create
Set the path to dvr/entry/create.
As with the previous example, the args field must be set to type map.
Method 1 - JSON String
Create a JSON string containing the properties required to complete the request as detailed in the . In this example, to create a new DVR entry.
Within that map, create a str element named conf that contains the required JSON string.
Method 2 - HTSP Map
Instead of creating a JSON string, create a HTSP map where each element name matches the name of the JSON property and contains the required property value.
args should be a map
Input
List details of input devices. ADMIN privilege is required for these functions.
hardware/tree
Lists the parameters, options and settings for input devices.
uuid (Required). If set to 'root', the top-level details of the input device(s) are shown. If the uuid of a device (obtained from the top-level details) is submitted, full information is shown similar to Configuration -> DVB Inputs -> TV Adaptors.
root Function obscure.
hardware/satip/discover
Triggers a discovery process for SAT>IP servers, as Configuration -> General -> SAT>IP Server -> Discover SAT>IP Servers in the GUI. This function is only available if SAT>IP client functionality has been compiled into TVHeadend.
The op parameter must be set to all.
Example: /api/hardware/satip/discover?op=all
Raw
Although no special privilege is needed to use these functions, access control is applied at the inode database level.
classes
Returns a list of all data classes together with readable titles. Requires version 4.3-406 or later.
raw/export
class One of the class names returned by .
uuid A single uuid or JSON array of uuids.
Returns data about the selected object(s). The information is the same as returned by the corresponding grid function (where available) but without the selection and filtering options provided by that function.
raw/import
node A JSON object or array of objects.
Objects being imported must have a uuid and must already exist in the database.
Caclient
API calls related to Conditional Access. ADMIN privilege is necessary for all of these functions.
caclient/builders
Lists the text strings, options and defaults used when configuring Conditional Access devices within TVH (ie Configuration -> CAs -> Add).
caclient/class
Lists the text strings, options and defaults used when configuring Conditional Access within TVH (ie Configuration -> CAs).
caclient/create
Create a new CA instance.
class Name of the class to create, ie one of the classes listed by .
conf A JSON object describing the new device.
caclient/list
List CA clients.
Date/Time Format
The date and time are shown in many places within the Web User Interface. In most places, the format used is based on the default setting of your Browser and Operating System.
If, for example, the date/time format in your 'Upcoming Recordings' looks something like, 'Fri, 02/08/2024 14:05:00' and you wish to shorten it to something like 'Fri, 02-Aug 14:05', you can do the following:
In the WebUI, navigate to Configuration -> General -> Base.
Ensure that your 'Default view level' is set to at least 'Advanced'.
In the 'Web Interface Settings' panel, the 'Custom date Format' field can be used to override the default date/time format by adding:
%ddd, %dd-%MMM %hh:%mm
idnode
These function provide direct access to the internal data structures of TVHeadend. Attempting to modify these internal structures may have unwanted effects including loss of data.
Information is held within TVHeadend in a key-value database. The key for each record is a random 128-bit value called a uuid. The value is a data structure which can be represented in JSON format. The record is called an idnode.
The content of each idnode depends on what it represents; this is indicated by the value of the class parameter.
Although no special privilege is required to call these functions, access control is applied to the data items being referenced.
API Description
TVHeadend provides the API using the HTTP protocol, by default via port 9981 though this can be changed in the TVH config. API functions appear as pseudo-files under the /api/ root of the server filesystem, with parameters passed to the function via either the GET or POST methods.
The call must include a username and password with access permissions to carry out the requested task. The user must also have the ACCESS_WEB_INTERFACE privilege, either directly or inherited from an earlier '*' user. In other words the "Web interface" box must be ticked on the Access Entries screen; without this all calls will fail with a "403 Forbidden" error.
If TVHeadend has been started with the '--http_root' qualifier, the HTTP root must be included in the URL, thus eg
The server does not check that all parameters supplied are valid in the context of the request; unexpected items are ignored. Parameters not in the expected format or not containing the expected data may also be ignored.
Communication
This communication is currently implemented by using htsmsg's. All strings are encoded as UTF-8.
There are two distinct ways for communication within HTSP.
Apart from this there is a number of messages that needs to be exchanged during login, see the login section below.
RPC Communication
There is a normal RPC way of doing things. I.e. the client sends a request and the server responds with a reply. All the RPC methods are listed below as the 'Client to Server' methods. Apart from all message fields listed within each message type the client can add an additional field:
RatingLabel
Functions to query and manipulate the list of parental rating labels ('G', 'M', 'PG', etc).
ratinglabel/class
Lists the text strings, options and defaults used when configuring parental rating labels within TVH (ie Configuration -> Channel/EPG -> Rating Labels -> Add).
CLI Commands
Usage: tvheadend [OPTIONS]
Generic Options
Language
language/list
Produces a list of all known languages and their three-letter ISO639-3 codes. The list is hard-coded within the Tvheadend source.
language/locale
Translations
Main Application Language
Although, individual WebUI users can select their own display language, the core application takes its language configuration from the operating system.
When TVH loads, it inspects, in sequence, the following environmental variables: LC_ALL, LANG and LANGUAGE for a recognised language. Should no language information be present, or the language present is not recognised, TVH will default to
Codec
ADMIN privilege is required for all of these functions except codec_profile/list.
codec/list
Lists available codecs and their properties. This is a very verbose list.
Random Notes
Snippets of stuff that developers have learned that may be useful to other developers but is not yet sufficiently complete or structured for a dedicated page.
WebUI
The WebUI is built on a 'single page application' framework called . The version used appears to be 3.4.1.1 which, is considerably outdated (released circa 2009-2011).
A link to the Ext JS documentation can be found here:
The WebUI appears to be heavily dependent upon the internal idnode
Episode Numbering
TVH accepts three episode numbering schemes via XMLTV.
onscreen
dd_progid
xmltv_ns
Recognised Tags/Attributes
TVHeadEnd only recognises a subset of the total XMLTV schema.
Multiple instances of some tags like 'actor' or 'category' or 'rating' may be present.
Bouquet
ADMIN privilege is required for all of these functions.
bouquet/class
Lists the text strings, options and defaults used when configuring bouquets within TVH (ie Configuration -> Channel/EPG -> Bouquets).
Release / Change Log Mockup
(yyyy-mm-dd)
Title of the PR ( yyyy-mm-dd)
Title of another PR ( yyyy-mm-dd)
Testing Tuners Using Files
If you need to test with a system that you that you don't have access to, for example, testing ATSC functionality on a DVB system, you can use a TS recording to emulate the tuner type.
The TS file should contain the whole mux and not just one service.
A new 'network' will be created for the file as well as a number of 'mux', 'service' and 'channel' objects matching the services found within the TS file.
The contents of the TS file will be played on a continuous loop.
See the instructions for creating for more information.
ESfilter
Functions to report on and control Elementary Stream filters.
There are separate API functions to operate on the different types of filter, but they all work in the same way. In the descriptions below the XXX in the function name can be replaced with video, audio, teletext, subtit (subtitle), ca or other as required.
Satip
ADMIN privilege is required to use these functions.
satips/config/load
Lists the descriptions, options, defaults and current settings for configuring the SAT>IP server capability - see Configuration -> General -> SAT>IP server.
Read the value of one or more idnode records. One (and only one) of these parameters must be specified:
uuid The uuid (or JSON-structured list of uuids) to read.
class The class of records to read, ie one of the classes returned by classes.
If uuid is given, the data to be returned may be qualified by setting one of these parameters to an integer greater than zero:
meta Include meta-data (default values and descriptions of the data items).
grid Return a brief summary of the records.
If class is given, setting the parameter enum to an integer value greater than zero returns only a set of key-value pairs.
In both cases the list parameter can be used to select which items are to be output, based on the value of the 'id' field. Multiple entries can be selected, separated by commas, colons or semicolons. A '-' in front of an entry deselects that item (and implicitly selects all others).
idnode/save
Update an existing idnode.
node The JSON object (or array of objects) containing the update.
Each update must contain the uuid item. Other items supplied replace those in the idnode; they are not merged.
Fields within an idnode may be read-only; for this reason it may not be possible to take the data from idnode/load and use it as input to idnode/save (thanks to Poul Kalff for this information). To check the read-only status of a field, use idnode/class and check for a 'rdonly' flag.
idnode/tree
Read information held in a tree structure (eg for tuner devices).
uuid The uuid of the starting point in the tree structure, or the special value 'root'.
root The uuid of the head of the tree structure. Required if uuid = 'root'.
idnode/class
List information about a specified class; mostly metadata used to configure the TVHeadend UI.
name The name of the class, ie one of the values returned by classes.
idnode/delete
Delete one or more records.
uuid The uuid (or a JSON-formatted list) of the record(s) to be deleted.
idnode/moveup
idnode/movedown
en_US
.
Workflow
Tvheadend uses English (en_US) as the master langauge for the WebGUI and in-GUI help. Changes to source code that add new features and capabilities must also include updates to the master template .potfiles under the intl directory if existing strings are reused or new strings added.
Merged changes to master template .potfiles are automatically replicated to Transifex where we manage the translation process. Our project is here: https://www.transifex.com/projects/p/tvheadend/
If changes reuse existing strings local language files do not require translation. If they add new strings language contributors will be notified of the changes and can provide translations of the new strings in the language(s) they support. Once translated strings are saved, Transifex will automatically open a new pull-request against our GitHub repository with updates to the language .pofiles. Transifex will continue to push updates and will combine updates to multiple languages into the same pull-request as long as the pull-request remains open.
Languages can be added by submitting a language request on Transifex. Once the overall translation state exceeds 80% completed Transifex will submit a pull-request to add new language .pofiles to our GitHub repository. The final stage of addition (other than completing translations) is to edit the list of supported languages in Makefile resources.
Do not submit requests for new languages on Transifex unless you are prepared to personally work on the translations. Translations require effort not magic!
esfilter/XXX/class
Lists the descriptions, options and defaults for configuring the chosen type of filter, ie Configuration -> Stream -> Stream Filters -> {chosen type} -> Add.
esfilter/XXX/grid
Returns the parameters of the defined filters of the chosen type. The usual selection options are available, see Grid Parameters
esfilter/XXX/create
Creates a new filter of the chosen type. ADMIN privilege is required.
conf A JSON object describing the filter.
satips/config/save
Untested. Updates the server from an object in the format produced by satips/config/load.
Both of these URLs return markdown content. The first URL consists of the md file that matches the URL’s class as well as all of the contents of all of the <tvh_include> files present in the main file followed by an Items section containing a description of the properties of the URL’s class.
The second URL contains the static table-of-contents in md format from /docs/markdown/toc.md.
The markdown data is converted into HTML using the third party marked library. This is called from the tvheadend.mdhelp() method in src/webui/static/app/tvheadend.js.
Build Process
The script support/doc/md_to_c.py is called from the Makefile to create the C file src/docs_inc.c. This script is called multiple times for multiple md file locations with all being centralised into a single src/docs_inc.c file.
Each md file (including the toc) is converted to a C const char array. Each element of the array is a line from the source md files and is wrapped in an i18n translation function. The file names from the <tvh_include> lines are extracted and prefixed with the string \xff\x04 via a the MDINCLUDE compiler preprocessor instruction and added to the array.
At the end of src/docs_inc.c, all of the above arrays are then indexed in a structure called tvh_doc_page.
In src/webui/webui.c’ the /markdown URL path is configured to be handled by page_markdown() in src/webui/doc_md.c. There are various functions that are called within this module, however, the \xff\x04 sequence is interpreted by the function md_render() where the <tvh_include> text is inserted into the content to be returned.
Once the text from the md files has been assembled, the md_props() function in src/webui/doc_md.c appends the Items markdown to the content to be returned.
A typical finally assembled result may look like this:
[Content from first include file]Some text or separator.[Content from second include file]Main body of the md file[Content from third include file][Content from the internal object class definition]
All text returned to the browser is passed through the C i18n process (JS has its own i18n process) and is capable of being rendered line-by-line into any language supported by TVH provided that a translation for that text exists.
FAQ
Q: How do I get a playlist for all my channels?
Tvheadend can generate a playlist of all your mapped services (channels). You can download it from the webui at http://<ip>:<port>/playlist, e.g. http://192.168.0.2:9981/playlist.
Q: Why am I getting a playlist when trying to view/stream a channel?
By default Tvheadend’s Play links are playlists, although not all players accept them (e.g. Media Player Classic Home Cinema). You can bypass this by removing the /play/ path from the url.
Q: Tvheadend has scanned for services but some rows in the Service Name column are blank, is that normal?
Yes, not all services are given a name by providers. These services are usually hidden for a reason and may be used for things like encrypted guide data for set-top boxes, interactive services, and so on. If you do not see any service names at all this may indicate an issue with your hardware or configuration.
Q: I get a blank page when trying to view the web interface!
This usually happens when Tvheadend is installed incorrectly. On Debian and Ubuntu systems check the web interface path /usr/share/tvheadend/src/webui/static/ exists and isn’t empty. On other distros the path may be different.
Q: Why can’t I see my tuners in Tvheadend’s interface?
This is normally because they are not installed properly. Check syslog/dmesg (e.g. dmesg | grep dvb) and see that you have startup messages that indicate whether or not the tuners have initialized properly. Similarly, check /dev/dvb to see if the block device files used to communicate with the tuner have been created correctly?. The other major cause of this issue is when you run Tvheadend as a user that does not have permissions to access the tuners, e.g. not a member of the video group.
structures that not only supply the data to the WebUI via JSON, but also data type and formatting information. See the
for more details.
Each page or group of pages in the WebUI has its own JavaScript file, however, these normally contain just some setup and housekeeping functions specific to that area, all of the heaving lifting is done in idnode.js and tvheadend.js based on the idnode(s) in question.
Functions controlling the configuration of the Image Cache. ADMIN privilege is required for all of these functions.
Before version 4.3.1660, these functions were only available if Image Cache support was included at compile time.
imagecache/config/load
Lists the current values, defaults and descriptions of the parameters used to configure the image cache.
imagecache/config/save
TODO
imagecache/config/clean
Delete all files from the image cache and re-load, in the same way as Configuration -> General -> Image Cache -> Clean Image (icon) Cache in the GUI.
clean Required parameter, must be 1 - the value is not used.
imagecache/config/trigger
Trigger a re-load of the image cache, in the same way as Configuration -> General -> Image Cache -> Re-fetch Images in the GUI.
trigger Required parameter, must be 1 - the value is not used.
The response from TVH follows the HTTP protocol and includes an HTTP/1.1 header with status code. If an error occurs the response is in HTML, for example:
The error returned is generic and does not indicate the source of the problem. Authentication failures (incorrect user/pass) will return "401 Unauthorized", lack of privilege "403 Forbidden", non-existent API functions "404 Not Found", incorrect or missing parameters generally "400 Bad Request".
Data is usually returned as JSON, without any CR or LF characters - the examples given have been 'prettified' using json_pp or jq to make them easier to read. Functions which perform an action rather than return data will return an empty JSON object on successful completion.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>404 Not Found</H1>
</BODY></HTML>
RPC request extra fields:
The followings field should be used by the client to match the reply with the request.
All replies are guaranteed to arrive in the same order as the requests.
Even so, probably the best way to implement the request-reply client is by taking advantage of the 'seq' field.
RPC reply extra fields:
Streaming Communication
For streaming of live TV and various related messages the server will continuously push data to the client.
These messages are referred to as asynchronous messages and always have the 'method' field set and never have the 'seq' field set.
Also, the client can enable an additional asyncMetadata mode and by doing so it will be notified by the server when meta data changes. (EPG updates, creation of channels and tags, etc).
Authentication
In Tvheadend, each method has an associated access restriction. Currently there is only one restriction (Streaming). However, this may change in the future.
Privileges for these restrictions may be granted in two ways: Username + Password and/or Source IP address.
Therefore it is possible to gain permissions to the system without entering a username and password.
While this is really useful it also complicates the authentication schema a bit.
Upon connect the initial privileges will be raised based on the source address.
Before any username / password based authentication has taken place the client must have
obtained a challenge (which stays fixed for the session). This is done via the 'hello' method.
In principle it's possible to use two different authentication idioms with HTSP.
Depending on how your application works one or another may be more suitable.
While they do not really differ from a protocol point of view it's worth mentioning a bit about them here:
Initial Login Authentication
The client performs all of its authentication using the 'login' method.
It may choose to send:
Username and password: Privileges will be raised based on these credentials.
Username only: Privileges will be based on just the source address. The username will be used for various logging purposes.
Nothing: Privileges will be based on just the source address.
If no privileges are granted after the login message has been received by the server (i.e. both network and username + password based)
the server will reply with 'noaccess' set to 1. A client that only employs initial login should honor this flag and ask the
user for a username + password and retry by using the 'authenticate' method. I.e. it should not send the 'login' method again.
On-Demand Authentication
The client performs all of its authentication when it needs to.
When using this method, the client will check every RPC reply for the 'noaccess' field.
If it set to 1 it whould ask the user for username + password and retry the request but also
add 'username' and 'digest' to the original message. (See RPC request extra fields above)
Typically it would not send a username or digest during login.
ratinglabel/create
Creates a new parental rating label. Requires ADMIN privilege.
conf A JSON object containing details of the new parental rating label.
ratinglabel/grid
Lists details of parental rating labels. For details of the parameters and selection criteria which can be applied, see Grid Parameters.
ratinglabel/list
Lists the names and uuids of all known parental rating labels.
Notes:
Parental rating labels were added to Tvheadend in December 2023.
Processing of parental rating labels is disabled by default and can be enabled via Configuration -> Channel/EPG -> EPG Grabber.
Tvheadend will automatically create a placeholder record as new labels are encountered.
Parental rating label fields will not appear in other modules, (DVR, EPG) if the processing of parental rating labels is disabled.
Service Configuration
Server Connectivity
Debug Options
Testing Options
-h, --help Show this page
-v, --version Show version infomation
Produces a similar list to language/list but also including the full RFC3066 locale reference for those locales which have been compiled into Tvheadend.
language/ui_locale
Produces a list in the same format as language/locale but containing only those locales which are supported by TVHeadend (ie have translations available).
Lists the text strings, options and defaults used when configuring codec profiles.
codec_profile/create
Add a new codec profile.
class The name of the codec profile.
conf A JSON object describing the codec profile.
codec_profile/list
Set the 'episodeOnscreen' property of the EPG event to the value provided. TVH treats this value as free-form plain-text and no additional series or episode parsing is performed.
Note: If an 'episode-num' tag exists with a 'system' attribute set to 'onscreen', the tag's value will override the EPG event's 'episodeOnscreen' property regardless of the series or episode numbers parsed from other 'episode-num' tags. However, the other properties, for example 'seasonNumber' are set correctly. The 'onscreen' override occurs regardless of the sequence of the 'episode-num' tags.
Set the 'serieslinkUri' property to "ddprogid://xmltv/SH00012345.0000". No additional series or episode parsing is performed.
Set the 'episodeUri' property to "ddprogid://xmltv/EP00012345.0001". Set the 'serieslinkUri' property to "ddprogid://xmltv/EP00012345". Set the 'episodeNumber' property to 1. Set the 'episodeOnscreen' property to "e01".
Set the 'seasonNumber' property to 2.
Set the 'seasonCount' property to 16.
Set the 'episodeNumber' property to 4.
Set the 'episodeCount' property to 25.
Set the 'partNumber' property to 2.
Set the 'partCount' property to 2.
Set the 'episodeOnscreen' property to "s02.e04".
Note: In a number pair separated by a slash, the first number is zero-based and the second number is 1-based. Episode 8 of 12 is represented by '7/12'. Series/episode/part numbers are always zero-based when appearing alone.
Set the 'seasonNumber' property to 2.
Set the 'seasonCount' property to 15.
Set the 'episodeNumber' property to 4.
Set the 'episodeCount' property to 24.
Set the 'episodeOnscreen' property to "s02.e04".
Set the 'seasonNumber' property to 3.
Set the 'episodeNumber' property to 5.
Set the 'episodeOnscreen' property to "s03.e05".
Note: The property names in the above examples refer to the HTML/JSON API.
{
"entries" : [
{
"caption" : "Configuration - Image Cache",
"params" : [
{
"caption" : "Enabled",
"description" : "Select whether or not to enable caching. Note, even with this disabled you can still specify local (file://) icons and these will be served by the built-in webserver.",
"id" : "enabled",
"default" : false,
"type" : "bool",
"value" : false
},
{
"default" : false,
"id" : "ignore_sslcert",
"type" : "bool",
"value" : false,
"description" : "Ignore invalid/unverifiable (expired, self-certified, etc.) certificates",
"caption" : "Ignore invalid SSL certificate"
},
{
"caption" : "Expire time",
"description" : "The time in days after the cached URL will be removed. The time starts when the URL was lastly requested. Zero means unlimited cache (not recommended).",
"type" : "u32",
"value" : 7,
"id" : "expire",
"default" : 0
},
{
"description" : "How frequently the upstream provider is checked for changes.",
"caption" : "Re-fetch period (hours)",
"id" : "ok_period",
"default" : 0,
"type" : "u32",
"value" : 168
},
{
"description" : "How frequently a failed image fetch is retried.",
"caption" : "Re-try period (hours)",
"value" : 24,
"type" : "u32",
"id" : "fail_period",
"default" : 0
}
],
"class" : "imagecache",
"text" : "00000000000000000000000000000000",
"event" : "imagecache"
}
]
}
seq int optional Sequence number. This field will be echoed back by the server in the reply.
username str optional Username, in combination with 'digest' this can be used to raise the privileges
for the session in combination with invocation of a method.
digest bin optional Used to raise privileges.
seq int optional Sequence number. Same as in the request.
error str optional If present an error has occurred and the text describes the error.
noaccess int optional If present and set to '1' the user is prohibited from invoking the method due to
access restrictions.
-c, --config Alternate configuration path
-B, --nobackup Don't backup configuration tree at upgrade
-f, --fork Fork and run as daemon
-u, --user Run as user
-g, --group Run as group
-p, --pid Alternate PID path
-C, --firstrun If no user account exists then create one with
no username and no password. Use with care as
it will allow world-wide administrative access
to your Tvheadend installation until you create or edit
the access control from within the Tvheadend web interface.
-U, --dbus Enable DBus
-e, --dbus_session DBus - use the session message bus instead of the system one
-a, --adapters Only use specified DVB adapters (comma-separated, -1 = none)
--satip_bindaddr Specify bind address for SAT>IP server
--satip_rtsp SAT>IP RTSP port number for server
(default: -1 = disable, 0 = webconfig, standard port is 554)
--nosatip Disable SAT>IP client (deprecated flag, use nosatipcli)
--nosatipcli Disable SAT>IP client
--satip_xml URL with the SAT>IP server XML location
-6, --ipv6 Listen on IPv6
-b, --bindaddr Specify bind address
--http_port Specify alternative http port
--http_root Specify alternative http webroot
--htsp_port Specify alternative htsp port
--htsp_port2 Specify extra htsp port
--useragent Specify User-Agent header for the http client
--xspf Use xspf playlist instead M3U
-d, --stderr Enable debug on stderr
-n, --nostderr Disable debug on stderr
-s, --syslog Enable debug to syslog
-S, --nosyslog Disable syslog (all messages)
-l, --logfile Enable debug to file
--debug Enable debug subsystems
--trace Enable trace subsystems
--subsystems List subsystems
--fileline Add file and line numbers to debug
--threadid Add the thread ID to debug
--libav More verbose libav log
--uidebug Enable web UI debug (non-minified JS)
-A, --abort Immediately abort
-D, --dump Enable coredumps for daemon
--noacl Disable all access control checks
--nobat Disable DVB bouquets
-j, --join Subscribe to a service permanently
--tsfile_tuners Number of tsfile tuners
--tsfile tsfile input (mux file)
--tprofile Gather timing statistics for the code
--thrdebug Thread debugging
Reload your bowser window for this change to be applied.
The following is a list of available formatting code options:
Format Code
Description
%d
Day without zero padding. eg: 1 or 31
%dd
Day with zero padding. eg: 01 or 31
%ddd
Language-specific abbreviated day name. eg: 'Wed' or 'Mi'.
%dddd
Language-specific full day name. eg: 'Wednesday' or 'Mittwoch'.
%M
Month without zero padding. eg: 1 or 12
%MM
Month with zero padding. eg: 01 or 12
Programmers Translation Workflow
Background
Translatable texts within TVH are divided into 3 areas:
Text used within the application to describe object properties and values, etc.
Text used within the main web user interface (WebUI).
Text used within the 'Help' system of the WebUI (Documentation).
All text is entered in English into the program/documentation source files. For successful translation, the English text also must be added to the master language translation files.
This system is very similar to where a msgid tag contains the original English text and a msgstr tag contains the translated text.
msgid "Yes"
msgstr "Oui
Programmer Usage
Within program code written in the 'C' programming language, the N_() macro is used to identify English text that can be translated into another language.
_() is used to return translated text at runtime based on the core application's language setting (from the OS).
tvh_gettext_lang() can be used at runtime to translate a string to any TVH language, not just the current language.
Within the WebUI code written in the 'JavaScript' programming language, the _() function is used to indicate that translation is required.
All of the help system are converted from markdown text files into C static arrays that also eventually use the N_() function before display.
If no translation is available, the original English text passed to N_() or _()will be returned.
Building the .pot Files
The 3 .pot files are updated by running the make intl command which searches the source files for translatable strings and updates the 3 .pot files accordingly.
Build Process
Although there is a single unified build process, translations for each programming language or area referred to above are described separately for clarity.
The list of languages to be processed is determined by the LANGUAGES_ALL variable set in Makefile.common.
Build Process - Main Application (C code) and WebUI Help (Markdown)
Called from the main Makefile, the script support/poc.py processes the intl/tvheadend.XX.po (main application) and intl/docs/tvheadend.doc.XX.po (documentation) files and produces a consolidated tvh_locale_inc.c file containing all of the text as static C char arrays plus an index array. This file will be compiled into the final application binary.
Build Process - WebUI (JavaScript)
Called from Makefile.webui, the script, support/pojs.py converts all of the individual intl/js/tvheadend.js.XX.po files into individual webui/static/intl/tvh.XX.js.gz files. These files are loaded dynamically at runtime by the WebUI based on the user's linguistic preferences.
Creating a Mux Dump
Introduction
A 'Mux Dump' is a special recording where Tvheadend records the entire transmission of a single broadcaster rather than just a specific channel. Mux dumps can be useful for development and debugging purposes.
For most purposes, a mux dump lasting between 1 and 2 minutes should be suitable, however, if you are requested to provide a mux dump, ask the requester to indicate how long the mux dump should be for their purposes.
Performing a Mux Dump
In order to perform a mux dump, you first have to obtain the UUID of the mux that you wish to dump. The is a block of text, 32 characters long, containing only numbers and lower case letters.
Finding the UUID
WebUI Methods
There are many ways to do this, however, one of the easiest is to use the WebUI to navigate to 'Configuration - DVB Inputs - Muxes'. For each mux listed, there will be a 'Play' icon, on the left side of each row.
The process will be different between specific browsers, however, the 'Play' icon will always point to a link that contains the UUID of the mux somewhere.
Simply moving your mouse cursor over this icon should show the link destination, containing the mux UUID, somewhere in the browser window.
Right-clicking on the icon and selection 'Copy link' (or similar) should place some text into your clipboard that contains the UUID.
For example: http://<TVH_IP>:9981/play/ticket/stream/mux/176838fd011c233adfa42d8a07f9ddba?title=177.5MHz%20%2F%20DVB-T%20Network
Using this method, the UUID '176838fd011c233adfa42d8a07f9ddba' can be located between '/mux/' and the question mark.
Also, right-clicking on the icon and selecting 'Save link as' (or similar) should provide you with a prompt for a file name. The default file name provided by your browser should contain the UUID of the mux.
For example:
API Direct Method
A list (in JSON format) of all muxes known to the system can be obtained by issuing the following command:
http://<TVH_IP>:9981/api/mpegts/mux/grid
This list will contain all muxes, enabled and disabled, successfully tuned or not. Each JSON object will represent one mux. You will need to search through this list for the mux on the frequency that you seek and then take note of the UUID associate with that frequency.
Creating the Mux Dump
VLC
If you already have VLC configured as your default m3u application, simply click on the 'Play' icon described above and once VLC starts, press the 'Record' icon in VLC. Manually stop the recording after the required duration has elapsed.
Even if VLC is not your default m3u application, you can still use VLC by opening the 'Media - Open Network Stream' and pasting the link to the mux that you wish to dump as follows:
http://<TVH_IP>:9981/stream/mux/<MUX_UUID>
Hint: If you used the 'Copy link' method described above, you can simply paste that link directly into the 'Network URL' requested by VLC.
Linux Command Line - curl
The following curl command will dump 90 seconds of the specified mux.
The following wget command initiate a dump of the specified mux. However, the dump will have to be manually stopped using CTRL-C when the required time has elapsed.
A mux dump file is normally too large to email or post to the forum. It is up to the requester and user to agree a method for transferring the file. There are, however, several free peer-to-peer file transfer options to choose from.
Object ID Representation
The JSON API represents the unique identifier as a 32 byte character hexadecimal string. For example: 90e9361f38c156df654ecd27b92f398c.
When proxied via the HTSPapi method, the unique identifier is encoded as a 16 byte binary field. When this field is represented as a hexadecimal string, it matches that used by the JSON API.
The HTSP API represents the unique identifier of an object using an unsigned 32 bit big-endian integer.
When represented as a hexadecimal string, the value matches the first 8 characters of the JSON unique identifier.
When evaluated as binary data, it matches the first 4 bytes of the proxied JSON value.
Mixing and Matching API Values
The following table summarises UUID handling by API.
API Used
UUID Value Returned
Encoding
Additional Notes
The 32 bit ID may only contain 31 valid bits under certain circumstances. Based on how TVH creates 32 bit IDs, it is recommended to apply a 0x7fffffff mask for comparison operations between long and short ID forms.
There appears to be no guarantee that the 32 bit ID will be unique among ALL object types.
Tvhlog
ADMIN privilege is required for these functions.
tvhlog/config/load
Lists the details, descriptions, defaults and current values of the items in the GUI screen Configuration -> Debugging -> Configuration -> Settings. See Common Parameters for details of selection parameters.
tvhlog/config/save
Untested. Updates the server from an object in the format produced by .
node The JSON object.
tvhlog/subsystem/grid
List the subsystems available for trace and debug operations.
Also see and .
id - The internal enum for this subsystem. These values may change between systems depending upon the application version and the options used at compile-time but are otherwise constant.
subsystem - The name of the subsystem. These values are to be used in the WebUI when enabling trace/debug operations.
description
Note 1: Users may enter a special all subsystem (not listed) instead of nominating each subsystem individually in the WebUI. This condition can be detected if traceCoount and/or debugCount is equal to totalCount.
Note 2: As at April 2024, the id field is informational only. It is provided to facilitate future API development.
General
HTSP is a TCP based protocol primarily intended for streaming of live TV and related meta data such as channels, group of channels (called tags in HTSP) and electronic program guide (EPG) information.
The transmission and reception of a channel over HTSP is referred to as a subscription. A single HTSP session can handle as many concurrent subscriptions as the bandwidth and CPU permits.
The HTSP server in tvheadend has a payload-aware scheduler for prioritizing more important packets (such as I-frames) before less important ones (such as B-frames). This makes HTSP suitable for long-distance transmissions and/or paths with non-perfect delivery.
(It has been tested with a server in Stockholm and the client in Berlin).
For information about the HTSP wire format please refer to the following page: HTSMSG Binary Format.
If you're looking to develop a new client, there are several existing client implementations from which you might be able to gain knowledge:
(This is a demo client and is WIP, it has limited functionality).
Profile
ADMIN privilege is required to use these functions except for profile/list.
profile/list
Lists the available stream profiles (visible in the GUI at Configuration -> Stream -> Stream Profiles) together with their uuids.
all A user with ADMIN privilege can use this parameter to see details of every profile even if the profile is disabled or they do not have access to them.
htsp If set to 1, list only HTSP profiles. Default is 0 (list all).
To get the contents of a stream profile use , passing it the stream profile's uuid.
profile/class
Lists the options, defaults and descriptions of configuration parameters (Configuration -> Stream -> Stream Profiles) in the GUI.
profile/builders
Lists the options, defaults and descriptions of configuration parameters when adding a new stream profile (Configuration -> Stream -> Stream Profiles -> Add) in the GUI.
profile/create
Create a new stream profile.
class
conf A JSON object containing details of the new profile.
Object Class Relationships
All configuration data within TVHeadEnd (TVH), is stored in object classes. A class may contain multiple objects representing a single configuration item each.
Examples include: channels, recordings, muxes, adapters, autorecs, etc.
Detailing every object class is beyond the scope of this document, however, a list of classes can be obtained via the JSON API as follows: http://[TVH_IP]:9981/api/classes
The UUID is represented in the JSON API as a 32 hexadecimal character string (128 bit). In the HTSP API, an object’s ID is normally represented as an unsigned 32 bit integer that corresponds to the first four bytes (eight hex characters) of the UUID.
Please note: EPG event data is not stored or addressed using UUIDs, however, EPG event entries can contain links to UUIDs of configuration objects.
Objects can be linked to other objects via their UUIDs.
For example: To record a programme, the EPG entry will be linked to a ‘Channel’ object. That channel object will be linked to one or more ‘Service’ objects. Each service object will be linked to a ‘Mux’ object. Each mux object will be linked to a ‘Network’ object. Finally a network object will be linked to one or more ‘Adaptor’ objects.
The following diagram is not exhaustive, but serves to illustrate the relationship between various common object classes.
Objects are stored on disk in JSON-formatted files. These files are located with the subdirectories representing their configuration function and are named to match their UUID.
It is recommended that these files not be edited directly.
WebSocket
Tvheadend has a WebSocket interface on port 9981. It is used by the UI to provide 'live' actions and updates, avoiding the need to refresh the screen.
Example Code
The example below creates a WebSocket connection to the Tvheadend server and listens for updates.
Using this method, the UUID is 'd32ef9ef9c67e0552465f6a86caf1d77' and consists of all of the characters before the '.m3u' in the file name.
If you already receiving functioning services from the mux in question, you can navigate to 'Configuration - DVB Inputs - Services', select one of those functioning services and press the 'Edit' button. Within the edit window, press the 'Read-only Info' drop-down button and copy the value shown in the 'Mux UUID' text box. Press 'Cancel' to close the edit window.
Pathname Substitution Strings and Command Script Variables
TVH has the ability to build a recording file and path name using predefined substitution strings. For example, using $t will include the EPG Title in the file name. Likewise, %t will pass the EPG Title as a command line argument to one of the DVR Profile command scripts.
This feature is implemented in src/dvr/dvr_rec.c.
A number of htsstr_substitute_t arrays contain a list of substitution identifiers and the functions required to perform the required substitution.
The actual substitution is performed by htsstr_substitute (src/htsstr.c) which is passed a substitution array and a substitution key ($ or %) as well as an output variable.
Pathname substitution strings can be applied equally to the file name and to directories in the hierarchy under the base directory specified in the DVR Profile. It should be noted, however, that objects that can provide their own directories, such as AutoRec and Timer DVR objects, must have their directory prefixed with $$ for substitutions to take place. The $$ prefix will be omitted from the final directory name.
- The locale-aware description of the subsystem.
trace - True if this subsystem is currently being traced.
debug - True if this subsystem is currently being debugged.
traceCount - The number of subsystems with trace currently set to true.
debugCount - The number of subsystems with debug currently set to true.
Tvheadend transmits messages on the Websocket interface asynchronously, when either an event occurs or in some cases at scheduled intervals. The output format is JSON.
Each message contains a key "messages" whose value is an array of message objects. Each message object contains a key "notificationClass" which specifies the source of the message, and a series of message-specific key-value pairs.
Object Changes
Some "notificationClass" messages may optionally contain one or more of the following arrays: "create", "change" and "delete". When present, these arrays will contain lists of UUIDs that have been created, modified or deleted as part of the scope of the current notification.
When a "notificationClass" is "epg", the arrays described above will contain EventIds rather than UUIDs and the 'update" array will be present rather than "change". Two additional arrays ('dvr_delete' and 'dvr_update') may also be present to indicate a change in recording status of the EPG event.
With regards to "create" and "change"/"update" notifications, the UUID/EventID will need to be explicitly fetched to obtain the new object property values.
Language-specific abbreviated month name. eg: 'Dec' or 'déc.'.
%MMMM
Language-specific full month name. eg: 'December' or 'décembre'.
%yy
Two-digit year without the century. eg: 02 or 97.
%yyyy
Four-digit year with the century. eg: 2002 or 1997
%h
Hour without zero padding, eg: 1 or 23. (Always 24 hour clock)
%hh
Hour without zero padding, 12 hour clock. eg: 01 or 23. (Always 24 hour clock)
%m
Minute without zero padding. eg: 1 or 59.
%mm
Minute with zero padding. eg: 01 or 59.
%s
Seconds without zero padding. eg: 1 or 59.
%ss
Seconds with zero padding. eg: 01 or 59.
Channel
Functions to query and manipulate the list of channels.
A TVH user can only see via the API those channels which have been enabled and to which access has been allowed. However a user with ADMIN privilege can use the parameter all=1 to see details of every channel, channeltag and category even if they do not have access to them.
channel/class
Lists the text strings, options and defaults used when configuring channels within TVH (ie Configuration -> Channel/EPG -> Channel -> Add).
channel/create
Creates a new channel. Requires ADMIN privilege.
conf A JSON object containing details of the new channel.
channel/grid
Lists details of channels. For details of the parameters and selection criteria which can be applied, see .
channel/list
Lists the names and uuids of all known channels. For disabled channels the channel name is enclosed in braces.
These parameters were added at version 4.3-905:
numbers If non-zero, the LCN appears before the channel name, separated by a space. Default is zero.
sources If non-zero, the source appears after the channel name, in square brackets and separated by a space. Default is zero.
sort Either
channel/rename
Renames a channel. Only available from version 4.3.652. Requires ADMIN privilege.
from The current name of the channel.
to The new name of the channel.
channeltag/class
Lists the text strings, options and defaults used when configuring channels within TVH (ie Configuration -> Channel/EPG -> Channel Tags -> Add).
channeltag/create
Creates a new channel tag. Requires ADMIN privilege.
conf A JSON object containing details of the new channel tag.
channeltag/grid
Lists details of channel tags. For details of the parameters and selection criteria which can be applied, see .
channeltag/list
Lists the names and uuids of all channel tags.
channelcategory/list
Untested. Return a list of the categories of events which appear in the current EPG and which the user is permitted to see. Used internally to populate the 'Category 1-3' drop-down boxes in DVR -> Autorecs -> Add (Expert view only). The function only works if the EPG is sourced from XMLTV.
Access
Functions to list and manipulate access controls. With the exception of access/entry/userlist, ADMIN privilege is required to use these functions.
access/entry/class
Lists the text strings, options and defaults used when configuring access controls within the TVH GUI (ie Configuration -> Users -> Access Entries).
access/entry/create
Creates a new user from a JSON object.
conf The JSON object describing the new user.
access/entry/grid
Lists users and their privileges. See for details of selection parameters.
access/entry/userlist
Outputs a list of usernames. The "*" user and any users with a zero-length name are excluded.
The function is used internally to populate the "Owner" dropdown in Digital Video Recorder -> Finished Recordings -> Edit. It MUST be called by a user without ADMIN privileges, otherwise an empty list is returned.
ipblock/entry/class
Lists the text strings, options and defaults used when configuring access controls within the TVH GUI (ie Configuration -> Users -> IP Blocking Records).
ipblock/entry/create
Creates a new IP-based access record.
conf The JSON object describing the access record.
ipblock/entry/grid
Lists IP-block records. See for details of selection parameters.
passwd/entry/class
Lists the text strings, options and defaults used when configuring access controls within the TVH GUI (ie Configuration -> Users -> Passwords).
passwd/entry/create
Creates a new password record.
conf The JSON object describing the record.
passwd/entry/grid
Lists passwords for users. Note that "password" is in clear-text while "password2" is base64-encoded with a static prefix. See for details of selection parameters.
If authentication for the user is by persistent token (requires TVHeadend > 4.3.1500) the entry has some extra fields:
HTSMSG Binary Format
Message Structure
A message can be of either map or list type. In a map each field has a name, in a list the members do not have names, but the order should be preserved.
The field types are:
Name
ID
Description
Map
1
Sub message of type map
All in all the message structure is quite similar to JSON but most notably; no boolean nor null type exist and HTSMSG supports binary objects.
HTSMSG Binary Format
The binary format is designed to for back-to-back transmission of messages over a network (TCP) connection.
The root message must always be of type map.
Root body
HTSMSG-Field
Field encoding for type: map and list
The data is repeated HTSMSG-Fields exactly as the root body. Note the subtle difference in that for the root-message the length includes the 4 bytes of length field itself whereas in the field encoding the length written includes just the actual payload.
Field encoding for type: s64
Integers are encoded using a very simple variable length encoding. All leading bytes that are 0 is discarded. So to encode the value 100, datalength should be 1 and the data itself should be just one byte [0x64]. To encode 1337; datalength=2, data=[0x39 0x05].
Note that there is no sign extension in this encoding scheme so if you need to encode -1 you need to set datalength=8 and data = [0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff]. This can certainly be thought of as a bug, but it is the way it is.
Field encoding for type: str
Datalength should be the length of the string (NOT including the null terminating character). Thus the null terminator should not be present in data either.
Field encoding for type: bin
Datalength should be the length of the binary object. Data is the binary object itself.
Config
ADMIN privilege is required for all of these functions except config/capabilities and serverinfo.
config/capabilities
Returns a list of some compile-time options which were used to build the software. Requires either 'Web Interface' or 'HTSP Interface' privilege.
config/load
Lists the details, descriptions, defaults and current values of the items in the GUI screen Configuration -> General -> Base. See for details of selection parameters.
config/save
Untested. Updates the server from an object in the format produced by .
node The JSON object.
memoryinfo/class
Lists the details and descriptions of items in the TVH GUI screen Configuration -> Debugging -> Memory Information Entries.
memoryinfo/grid
Lists details of in-memory objects. See for details of selection parameters.
pathlist
Lists all of the api functions supported by the server.
serverinfo
Lists information about the server including the software version number.
Electronic Program Guide
Tvheadend has a built-in Electronic Program Guide (EPG). This is an in-memory database populated with information received over-the-air from DVB networks or from external XMLTV grabbers.
The EPG tab displays a filterable grid containing all events, sorted on start time:
The EPG tool bar shows five input fields which are used to filter/search events. The form uses implicit AND between input fields. This means all filters must match for an event to be displayed.
Filter
Function
Search Title
Display events that match the given title. The filter uses case-insensitive regular expressions. If you don’t know what a regular expression is, this simply means that you can type just parts of the title and filter on that - there’s no need for full, exact matching. If the fulltext checkbox is checked, the title text is matched against title, subtitle, summary and description.
Filter Channel
Display events from the selected channel. Channels in the drop down are ordered by name and can be filtered (by name) by typing in the box.
Filter Tag
Display events from channels which are included in the selected tag. Tags are used for grouping channels together - such as ‘Radio’ or ‘HDTV’ and are configured by the admin. Start typing a tag name to filter the list.
Filter Content Type
Display events that match the given content type tag. Most DVB networks classify their events into content groups. This field allows you to filter based on content type (e.g. “Sports” or “Game Show”). Supported tags are determined by your broadcaster. Again, simply start typing to filter the entries if you have a long list to choose from.
Filter Duration
Display events that fall between the given minimum and maximum durations. This allows you to filter for or against, say, a daily broadcast and a weekly omnibus edition of a programme, or only look for short news bulletins and not the 24-hour rolling broadcasts.
Title, Channel, Tag and Content Type are dependent on your configuration and on what your broadcaster sends. Options for the Duration are as follows:
Filter Range
Example Purpose
00:00:01 to 00:15:00
Very short news bulletins, children’s programmes, etc.
00:15:01 to 00:30:00
Short programmes, e.g. daily soap operas
00:30:01 to 01:30:00
Medium-length programmes, e.g. documentaries
01:30:01 to 03:00:00
Longer programmes, e.g. films
03:00:00 to no maximum
Very long programmes, e.g. major sporting events
For example: if you only want to see Movies from available HD channels you would select ‘HDTV’ in the [Filter tag…] field, and select ‘Movie / Drama’ in the [Filter content type…] field. You could then further limit the search to programmes between 1.5 - 3 hours by selecting ‘01:30:01 to 03:00:00’ in the [Filter duration…] field.
The grid updates dynamically as you change filters. You do not need to press a ‘Search’ button.
You can clear a filter by deleting its contents or by selecting ‘(Clear filter)’ on all filter fields except the Title filter. To clean all filters, press the [Reset All] button.
Buttons
The following buttons are also available:
Button
Function
Reset All
Clears all search filters
Watch TV
Launches Live TV via HTML5 video
Create Autorec
Creates an auto-recording rule based on the current filter criteria
Help
Display this help page
Grid Items
The main grid items have the following functions:
Details: Displays the current status of a recording event for the selected programme
Icon
Description
The programme is scheduled for recording
The programme is currently recording
Click to call up more detailed information about an event
Progress : A bar graph display of how far through a programme we currently are.
Title: The programme main title. You can automatically set a filter to the value of this field by clicking on it (e.g. click on ‘Daily News’ will automatically filter the whole grid to only show programmes with the same name).
SubTitle: The programme minor title or subtitle if included with EPG data. Some providers use this for a programme synopsis and not a true subtitle.
Episode: Episode number, if given by your EPG provider.
Start Time: The scheduled start time of the programme.
End Time: The scheduled end time of the programme.
Duration: The scheduled duration (i.e. start time to end time) of the programme.
Number: The channel number of the broadcasting channel, if defined.
Channel: The name of the broadcasting channel. You can automatically set a filter to the value of this field by clicking on it (e.g. click on ‘Channel 4 HD’ will automatically filter the whole grid to only show programmes from that channel).
Stars: Rating (in stars) of the programme.
Age: Age rating of the programme.
Content Type : Any content/genre information as provided by the EPG provider. You can automatically set a filter to the value of this field by clicking on it (e.g. click on ‘Movie/Drama’ will automatically filter the whole grid to only show programmes of the same type).
Event Details & Recording
If you click on a single event, a popup displays detailed information. You can schedule the event for recording by clicking on the [Record program] button. If the EPG provider includes series-link data the [Record series] button allows you to schedule recording of all entries in the series.
EPG Detail 1
For events without any series link information, an [Autorec] button will be provided to create a pseudo-series link using the autorec feature.
EPG Detail 2
When scheduling recording you can choose the DVR profile used for the recording or autorec rule. This will normally show (default) but you can define different profiles in the Configuration -> Recording -> Digital Video Recorder tab. Profiles allow you to set, e.g. post-broadcast padding to accommodate a channel that always runs late, or a post-processing command to strip adverts from recordings made from a commercial channel.
The [Search IMDB] button runs a search against the programme title on imdb.com, and [Play program] button. This downloads an XSPT or M3U playlist file (depending on startup options) and if your Operating System is correctly configured this will launch an appropriate player application. If not you will need to manually open (double-click) the playlist file to start watching.
Clock on the [X] window button (top-right) to close the popup. The popup is not modal and will remain open and visible. You can open multiple detailed information popups at the same time.
Autorecordings
To record all events matching a specific search query, e.g. to record a favourite show every week, press the [Create AutoRec] button in the top toolbar. A popup with details on the to-be-created "autorec" rule will be shown. To enable the rule, confirm it by clicking the [Yes] button.
Autorec Dialogue Box
Autorec rules are listed in the Digital Video Recorder tab. Edit the rule list if you want to temporarily disable an autorecording or make adjustments to the channel, tag, or similar rule criteria.
Watch TV
Clicking the [Watch TV] button will open an HTML5 player pop-up where you can select the channel to open and stream profile to use. A transcoding stream profile is required to transcode the stream to a format that is supported by your browser, as browsers only support certain formats and codecs.
Supported Container Formats
Browser
MPEG-TS
MPEG-PS
Matroska
WebM
Google Chrome
Mozilla Firefox
Supported Video Codecs
Browser
MPEG2
H.264
VP8
Google Chrome
Mozilla Firefox
Supported Audio Codecs
Browser
MPEG2
DD (AC3)
AAC
Vorbis
Google Chrome
Mozilla Firefox
'Electronic Program Guide' Tab
EPG
Functions to query the Electronic Program(me) Guide.
epg/events/grid
Query the EPG and optionally apply filters.
lang 3-letter ISO639 language code. If not supplied, the language configured for the user is entered; otherwise the system default.
mode If set to the string now then only events currently playing are listed.
title A (case-insensitive) string which must appear in the title to be listed.
fulltext If set to 1 then the title string must match exactly. Default is 0.
channel The channel to show events from, specified either by channel name or uuid. Must be an exact match to the data from , otherwise all channels are returned.
channelTag The (single) channel tag to show events from, specified either by name or uuid. Must be an exact match to the data from , otherwise all tags are returned.
durationMin Shortest event to be listed (seconds).
durationMax Longest event to be listed (seconds).
contentType Integer representing the genre to be listed - see .
filter A JSON object describing the filter(s) to be applied. See for the syntax. String filters can only be applied to the 'channelName', 'title', 'subtitle', 'summary', 'description' and 'extraText' fields.
sort The key to be sorted by. Default is to sort by 'start'.
dir If sort is specified, setting 'dir' to 'desc' reverses the sort order
start First record to be listed from the database, default is 0.
limit Number of records to list. Default is 50 - use a very large number to get all.
new If set to 1 then only events marked as 'new' will be included. Default is 0. The EPG source must identify 'new' events for this filter to work.
cat1, cat2, cat3 XMLTV provides more details of the event category than the OTA EPG, and these parameters can be used to filter by XMLTV category. See .
EPG sources differ in the information which they provide, and there are many more information items possible than are included in the example below. Any items which have no data available will be omitted.
If the event is scheduled to be recorded, these extra items will appear:
Other possible values for dvrState are "recording", "completed", "completedError", "completedWarning" and "completedRerecord". The 'completed' values can only be present if the recording stopped before the scheduled stop time.
epg/events/alternative
Lists alternative broadcasts of the same event.
eventId Identifier of the event, eg taken from .
lang 3-letter ISO639 language code. If not supplied, the language configured for the user is entered; otherwise the system default.
The function looks for broadcasts having the same eventId, rather than using event CRIDs. It does not work on UK DVB-T.
This function does not work on TVH versions older than 4.2.4-5 or 4.3-589.
epg/events/related
Lists broadcasts related to the given event.
eventId Identifier of the event, eg taken from .
lang 3-letter ISO639 language code. If not supplied, the language configured for the user is entered; otherwise the system default.
The function looks for events having the same series link ID as the given event, ie part of the same series of broadcasts. It therefore relies on the EPG provider filling in these details.
Note that the series link ID is unique to an individual set of broadcasts; if the series is repeated on a different channel (or at a different time) the series link will be different.
This function does not work on TVH versions older than 4.2.4-5 or 4.3-589.
From version 4.3.1711, if the given event does not have a series link ID, events in the EPG having the same title are returned.
epg/events/load
Lists details of specific event(s).
eventId Identifier of the event, or a JSON array of event Ids.
The common parameters which apply to other 'load' functions do not work here.
epg/brand/list
A 'Brand' is a commonly-available show, eg "Simpsons". What constitutes a 'Brand' is up to the EPG provider.
This function was removed in version 4.3.1059.
epg/content_type/list
Lists the Content Type IDs extracted from ETSI EN 300 468 together with their descriptions. The Content Type ID appears in the output of as "Genre". IDs described as 'Reserved' or 'User Defined' in the specification are given the description of the previous ID instead.
full If set to 0 (the default) only the broad categories defined by content_nibble_level_1 in the specification are listed. If set to 1 all categories are listed.
Protocol Changes
This information may be outdated. If you have some spare time, please to through the commit History and add the changes to the documentation.
v43
added isNew field to eventAdd
v42
added comment field to addDvrEntry, updateDvrEntry, autorecEntryAdd, autorecEntryUpdate, timerecEntryAdd, timerecEntryUpdate
v41
added full UUID to channelAdd, tagAdd and dvrEntryAdd
added ratingAuthority and ratingCountry to dvrEntryAdd and eventAdd
added audio_type in the subscriptionStart server-to-client method
added getCodecs method
Scan Files
Scan files are used by TVHeadEnd (TVH) during the setup process to create muxes and scan for services available on those muxes.
An excerpt from a scan file may look like this:
[CHANNEL]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 226500000
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = AUTO
CODE_RATE_LP = AUTO
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
INVERSION = AUTO
The location of the scan files may vary based upon the TVH version.
/usr/local/share/tvheadend/data/dvb-scan//usr/share/tvheadend/data/dvb-scan/
Depending on the value of the DELIVERY_SYSTEM, TVH recognises the following parameters.
added gmtoffset
epg events - added subtitle field
autorecEntry structures
added dupDetect and fulltext fields
added errors fields to the stream status
added satpos to the subscription start
added subscriptionError field to subscriptionStatus server-to-client method
ADMIN privilege is required to use all of these functions.
service/mapper/load
Lists the descriptions, options, current values and defaults of the GUI screen Configuration -> DVB Inputs -> Services. -> Map Services.
Further API functions for manipulating DVB services are in the MPEGts section.
service/mapper/save
Untested. Set the Service Mapper options.
node Unknown, possibly the value of class.
service/mapper/stop
Stops a running service mapper operation.
service/mapper/status
Provides the same output as Status -> Service Mapper in the TVH GUI.
service/list
Lists available services. "Available" services includes those which are disabled or encrypted.
enum If set to 1 (as an integer without quotes) a short-form list is output containing each service's uuid and name. If set to 0 (the default) a verbose list is generated.
list If enum is not 1 this parameter selects which items in the params array are to be output, based on the value of the 'id' field. Multiple ids can be selected, separated by commas, colons or semicolons. A '-' in front of an id deselects that item (and implicitly selects all others).
raw/export?class=service provides a simpler version of the same information (but including the streams data), however the API call is about 50% slower.
service/streams
Lists the streams comprising the service.
uuid uuid of the service. This parameter is mandatory; it is not possible to list all services.
service/removeunseen
Remove services which have not been seen recently. This call carries out the same action as Configuration -> DVB Inputs -> Services -> Maintenance in the TVH GUI.
days The number of unseen days before deletion. The default is 7 days, the minimum is 5 days.
type If set to pat the action is the same as "Remove unseen services (PAT/SDT)" in the GUI. Otherwise the action is the same as "Remove all unseen services".
An empty JSON object is always returned.
Status
Lists statistics of input sources and connections. ADMIN privilege is required for all these functions.
status/connections
Lists currently-connected client devices.
status/subscriptions
Lists currently-active subscriptions.
status/inputs
Lists statistics of input devices.
For DVB-T and DVB-S tuners at least, the signal and SNR values are only non-zero while TVH is actively using the device. Some items may be missing if the device is idle.
The meaning of the statistics is below. Not all input sources provide all of the values.
For signal_scale and snr_scale, a value of 1 indicates that the corresponding signal or SNR reading is relative; 65535 = 100%. A value of 2 indicates the reading is absolute; 1000 = 1dB. A value of 0 indicates that the reading is not available or not valid.
The "pids" data is only present in TVH versions 4.3.1420 and later.
status/inputclrstats
Resets the input counters to zero.
uuid The uuid of the input device from . More than one uuid can be specified - syntax?
connections/cancel
Disconnects one or more clients.
id ids of the connections, obtained from . If set to 'all' then all connections are cancelled (new in 4.3.1680).
status/activity
Provide information required for assessing the suitability for entering low-power mode and a suitable time for reawakening. For example, then TVH is used as part of an appliance configuration.
For finer analysis and control, the 'activities' property contains individual scheduling times for the following activities:
DVR Recordings
OTA EPG Grabber
Internal EPG Grabber
Mux Scheduler
Times are presented as standard Unix epoch values. A value of zero indicates that nothing for that activity type is currently scheduled.
It should be noted that the times provided are strictly from the point of view of TVH internal activities and that the calling program must take into account operating system and hardware boot times when determining the precise time to reawaken the system.
Times are only reported for the EPG grabbers if there are enabled grabbers of that type. Likewise, only enabled mux schedulers are reported.
DVR recordings in progress are also included, therefore, the reported DVR time may be in the past.
The connection and subscription counts are duplications of the summaries provided by the ‘status/connections’ and ‘status/subscriptions’ API calls and are included here in order to provide a single consolidated API call for assessing the suitability for entering low-power mode.
Requires v4.3-2405.
Examples
These examples (and any other use of the API which passes username and password in the URL) will only work if TVheadend is configured to use 'basic' or 'basic and digest' authentication.
curl
Parameters passed to TVH using the GET method must be URI-encoded:
To make the output more human-readable, pipe it through json_pp (included in the perl package on many distributions) or jq.
PHP
This simple example lists some details about upcoming timers, sorted in date order. To work through a PHP-enabled web server, the PHP.INI setting "allow_url_fopen" must be ON.
For an example of what can be done with the API in PHP see https://github.com/dave-p/TVHadmin.
Javascript
It is a 'feature' of Javascript that a script can only access remote content from the same source (IP and port number) as the script was loaded from. Hence to call the TVHeadend API from Javascript, the script must be hosted on TVHeadend's built-in web server. To do this, place your script in /usr/share/tvheadend/src/webui/static; it can then be accessed from URL http://user:[email protected]:9981/static/. Note that this is unintended behaviour and may change in the future.
This example carries out the same task as the PHP example above. Your browser will prompt for the TVHeadend user and password.
Python
This example produces the same output as the previous ones.
Manipulate EPG grabbers. ADMIN privilege is required for these functions except for epggrab/channel/list.
epggrab/channel/list
Lists the EPG grabber channels, ie those appearing in Configuration -> Channel / EPG -> EPG Grabber Channels, together with the available option fields and the selections chosen.
Lists the parameters, descriptions, options and defaults for the GUI screen Configuration -> Channel/EPG -> EPG Grabber Channels.
epggrab/channel/grid
Gives details of the EPG grabber channels, ie from Configuration -> Channel / EPG -> EPG Grabber Channels. See Grid Parameters for parameter details.
epggrab/module/list
List EPG Grabber Modules, as shown in the GUI screen Configuration -> Channel/EPG -> EPG Grabber Modules.
epggrab/config/load
Lists the parameters, options, defaults and current settings for the EPG grabber, ie Configuration -> Channel / EPG -> EPG Grabber. See Load Parameters for parameter details.
epggrab/config/save
Updates the EPG Grabber configuration from an object in the same format as provided by epggrab/config/load.
node The JSON object.
epggrab/ota/trigger
Queues a run of the OTA EPG grabber.
trigger Delay in seconds before the run starts. Minimum is one second, maximum is one week.
epggrab/internal/rerun
Run the internal EPG grabbers immediately.
rerun Not used but must be an integer greater than zero.
Functions relating to DVB networks, multiplexes and services. Further service functions can be found in the Service section. ADMIN privilege is required for all these functions.
mpegts/input/network_list
Lists the network(s) associated with a given input device.
uuid The uuid of the specific hardware device.
To find the input device uuid, use hardware/tree?uuid=root, then take the id value from the output and use it as the value of uuid in another call to . From the output of this function select the id corresponding to the specific front-end device required.
mpegts/network/grid
Lists available networks. The standard parameters listed in may be used. The items returned depend on the type of network - terrestrial, satellite, IPTV etc.
mpegts/network/class
Lists the text strings, options and defaults used when configuring the DVB capability within TVH (ie Configuration -> DVB Inputs -> Networks).
mpegts/network/builders
Lists the text strings, options and defaults used when configuring the DVB capability within TVH (ie Configuration -> DVB Inputs -> Network -> Add).
mpegts/network/create
Create a new network.
class Required. The class name matching the class item obtained from a call to .
conf Required. A JSON object containing the settings for this network.
mpegts/network/mux_class
Lists the text strings, options and defaults used when editing a multiplex using Configuration -> DVB Inputs -> Muxes -> Edit.
uuid The value of network_uuid from a call to .
mpegts/network/mux_create
Create a mux for an existing network.
uuid The uuid of the network containing this mux.
conf A JSON object containing the settings for this mux. The contents will depend on the type of network.
A JSON object containing the UUID of the new mux is returned.
mpegts/network/scan
Triggers a scan of the requested network(s).
uuid uuid(s) of the network(s) to scan. More than one may be given; they will be scanned in sequence.
mpegts/mux/grid
Lists available multiplexes. The standard parameters listed in may be used.
hidemode If set to all, only enabled multiplexes are listed. The default is to show all multiplexes.
mpegts/mux/class
Lists the text strings, options and defaults used when configuring the DVB capability within TVH (ie Configuration -> DVB Inputs -> Muxes).
mpegts/service/grid
Lists available mpegts services. The standard parameters listed in Grid Parameters may be used.
hidemode The default is to show only services where the multiplex is enabled and the service has been verified. Setting this parameter to all also hides services which are not enabled, setting it to none shows all services.
dvb_servicetype can be used to determine what kind of service is being broadcast. The possibilities are:
Lists the text strings, options and defaults used when configuring the DVB capability within TVH (ie Configuration -> DVB Inputs -> Services).
mpegts/mux_sched/class
Lists the text strings, options and defaults used when configuring the DVB capability within TVH (ie Configuration -> DVB Inputs -> Mux Schedulers).
mpegts/mux_sched/grid
List the entries as found under Configuration -> DVB Inputs -> Mux Schedulers. The standard parameters listed in may be used.
mpegts/mux_sched/create
Untested. Create a mux schedule, presumably from a structure similar to that from .
dvb/orbitalpos/list
Lists orbital positions and the satellites occupying them. The list is distributed with tvheadend; satellite reception is not necessary to use this API.
dvb/scanfile/list
Lists the available frequency scan tables.
type One of 'dvb-s', 'dvb-t', 'dvb-c', 'atsc-t', 'atsc-c', 'isdb-t'.
satpos For dvb-s, the satellite position in degrees multiplied by 10 with East positive (so 28.2E is written as 282). The position must be accurate within +/- 0.2 degrees.
This function requires the dvb-scan files to be present on the server. They are installed by default (in /usr/share/tvheadend/data/) but are omitted if configure argument '--disable-dvbscan' is used. Distributions may also choose to package them separately.
To access GPU capabilities, a user needs to have the correct permissions. The following will list the group assigned ownership of the render nodes, and list the groups the active user is a member of:
This is: H264, Profile high with decoder (VAEntrypointVLD) , Encoder (VAEntrypointEncSlice) and LowPower encoder (VAEntrypointEncSliceLP) Is important to identify if your GPU has this low power (LP) codecs available. In my case I have low power for: H264 profiles Main, High and Constrained
sudo apt update
sudo apt upgrade
Install gpu tools (required to check the work load on GPU):
sudo apt install intel-gpu-tools
Intel GPU:
sudo apt install i965-va-driver-shaders
Enable GUC/HuC firmware (this is a must for encoding with low power codec):
we need to generate a file: /etc/modprobe.d/i915.conf
with the text (only one line) "options i915 enable_guc=1"
echo -e "options i915 enable_guc=1" | sudo tee -a /etc/modprobe.d/i915.conf
ukn@ukn-lenovo:~/tvheadend$ ./configure Checking support/features checking for cc execinfo.h ... ok checking for cc -mmmx ... ok checking for cc -msse2 ... ok checking for cc -Wunused-result ... ok checking for cc -fstack-protector ... ok checking for cc -fstack-protector-strong ... ok checking for cc -fstack-check ... ok checking for cc -fPIE ... ok checking for cc strlcat ... fail checking for cc strlcpy ... fail checking for cc fdatasync ... ok checking for cc getloadavg ... ok checking for cc atomic32 ... ok checking for cc atomic64 ... ok checking for cc atomic_time_t ... ok checking for cc atomic_ptr ... ok checking for cc bitops64 ... ok checking for cc lockowner ... ok checking for cc qsort_r ... ok checking for cc time_ld ... ok checking for cc time_lld ... fail ^ using time_t format 'ld' checking for cc stime ... fail checking for cc gmtoff ... ok checking for cc recvmmsg ... ok checking for cc sendmmsg ... ok checking for cc gnu_libiconv ... fail checking for cc libiconv ... fail ^ using build-in glibc iconv routines checking for cc ifnames ... ok checking for cc cclang_threadsan ... fail checking for py module gzip ... ok checking for pkg-config ... ok checking for xgettext ... ok checking for msgmerge ... ok checking for gzip ... ok checking for bzip2 ... ok checking for pkg openssl ... ok (detected 3.0.2) checking for cc linux/dvb/version.h ... ok checking for pkg zlib ... fail (detected ) checking for pkg libpcre2-8 ... fail (detected ) checking for pkg libpcre ... fail (detected ) checking for pkg liburiparser ... ok (detected 0.9.6) checking for pkg avahi-client ... ok (detected 0.8) checking for cmake ... ok checking for cc -lstdc++ ... ok checking for pkg libva >=0.38.0 ... ok (detected 1.22.0) checking for pkg libva-drm >=0.38.0 ... ok (detected 1.22.0) checking for cc sys/inotify.h ... ok checking for cc inotify_init1 ... ok checking for cc dvbcsa/dvbcsa.h ... ok checking for cc -ldvbcsa ... ok fetching dvb-scan files ... ok checking for cc epoll_create1 ... ok checking for pkg dbus-1 ... ok (detected 1.12.20)
Compiler: Using C compiler: cc Using LD flags: -ldvbcsa Build for arch: x86_64
Binaries: Using PYTHON: python Using GZIP: gzip Using BZIP2: bzip2
dpkg-deb: building package 'tvheadend-dbg' in '../tvheadend-dbg_4.3-2375~g653bd0400~jammy_amd64.deb'. dpkg-deb: building package 'tvheadend' in '../tvheadend_4.3-2375~g653bd0400~jammy_amd64.deb'. make[1]: Leaving directory '/home/ukn/tvheadend' dpkg-genbuildinfo --build=binary -O../tvheadend_4.3-2375~g653bd0400~jammy_amd64.buildinfo dpkg-genchanges --build=binary -O../tvheadend_4.3-2375~g653bd0400~jammy_amd64.changes dpkg-genchanges: info: binary-only upload (no source code included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included)
$################### log output end ####################
From this last log you need to copy the file name starting "'tvheadend' in '../tvheadend_4.3..." (in your case will have a different number after '4.3-') In my case is: tvheadend-dbg_4.3-2375~g653bd0400~jammy_amd64.deb
Now you are ready to test: open one stream with tvh server and check the Tvheadend log:
2022-12-09 10:53:37.821 transcode: 0001: 01:MPEG2VIDEO: ==> Using profile h264_vaapi 2022-12-09 10:53:37.822 transcode: 0001: 02:AC3: ==> Using profile webtv-aac
To confirm you are using GPU for trancoding you need to send:
sudo intel_gpu_top
When you don't have any streams open you will see all numbers: 0; after you open streams you should see values non-zero in: Render/3D , Video and VideoEnhance.
for Lubuntu 24.04
Setup Intel VAAPI on x86 (64 bits) system from scratch using Lubuntu 24.04
Legend:
<command>— this is a command that should be copied to terminal.
ukn@ukn-lenovo:~$ uname -a — this is the output I got; you should get something similar (except username). Is intended for verification purpose.
rest of the text is informational.
Hardware used in the process:
Lenovo ThinkCentre M720q element with i5-9500T
download ISO LUBUNTU 24.04:
flash ISO to USB 32G using rufus-3.21
Note:
make sure you plug the USB in USB2.0 socket (black).
HDD information will be lost when you install Lubuntu 24.04; make sure you back up any information.
Install Lubuntu to PC with default settings; connect also to internet.
To access GPU capabilities, a user needs to have the correct permissions. The following will list the group assigned ownership of the render nodes, and list the groups the active user is a member of:
This is: H264, Profile high with decoder (VAEntrypointVLD) , Encoder (VAEntrypointEncSlice) and LowPower encoder (VAEntrypointEncSliceLP) Is important to identify if your GPU has this low power (LP) codecs available. In my case I have low power for: H264 profiles Main, High and Constrained
sudo apt update
sudo apt upgrade
Install gpu tools (required to check the work load on GPU):
sudo apt install intel-gpu-tools
Intel GPU:
sudo apt install i965-va-driver-shaders
Enable GUC/HuC firmware (this is a must for encoding with low power codec):
we need to generate a file: /etc/modprobe.d/i915.conf
with the text (only one line) "options i915 enable_guc=1"
echo -e "options i915 enable_guc=1" | sudo tee -a /etc/modprobe.d/i915.conf
ukn@ukn-lenovo:~/tvheadend$ ./configure Checking support/features checking for cc execinfo.h ... ok checking for cc -mmmx ... ok checking for cc -msse2 ... ok checking for cc -Wunused-result ... ok checking for cc -fstack-protector ... ok checking for cc -fstack-protector-strong ... ok checking for cc -fstack-check ... ok checking for cc -fPIE ... ok checking for cc strlcat ... ok checking for cc strlcpy ... ok checking for cc fdatasync ... ok checking for cc getloadavg ... ok checking for cc atomic32 ... ok checking for cc atomic64 ... ok checking for cc atomic_time_t ... ok checking for cc atomic_ptr ... ok checking for cc bitops64 ... ok checking for cc lockowner ... ok checking for cc qsort_r ... ok checking for cc time_ld ... ok checking for cc time_lld ... fail ^ using time_t format 'ld' checking for cc stime ... fail checking for cc gmtoff ... ok checking for cc recvmmsg ... ok checking for cc sendmmsg ... ok checking for cc gnu_libiconv ... fail checking for cc libiconv ... fail ^ using build-in glibc iconv routines checking for cc ifnames ... ok checking for cc cclang_threadsan ... fail checking for py module gzip ... ok checking for pkg-config ... ok checking for xgettext ... ok checking for msgmerge ... ok checking for gzip ... ok checking for bzip2 ... ok checking for pkg openssl ... ok (detected 3.0.13) checking for cc linux/dvb/version.h ... ok checking for pkg zlib ... ok (detected 1.3) checking for pkg libpcre2-8 ... ok (detected 10.42) checking for pkg liburiparser ... ok (detected 0.9.7) checking for pkg avahi-client ... ok (detected 0.8) checking for cmake ... ok checking for cc -lstdc++ ... ok checking for pkg libva >=0.38.0 ... ok (detected 1.22.0) checking for pkg libva-drm >=0.38.0 ... ok (detected 1.22.0) checking for cc sys/inotify.h ... ok checking for cc inotify_init1 ... ok checking for cc dvbcsa/dvbcsa.h ... ok checking for cc -ldvbcsa ... ok fetching dvb-scan files ... ok checking for cc epoll_create1 ... ok checking for pkg dbus-1 ... ok (detected 1.14.10)
Compiler: Using C compiler: cc Using LD flags: -ldvbcsa Build for arch: x86_64
Binaries: Using PYTHON: python Using GZIP: gzip Using BZIP2: bzip2
dpkg-deb: building package 'tvheadend-dbg' in '../tvheadend-dbg_4.3-2375g653bd0400noble_amd64.deb'. dpkg-deb: building package 'tvheadend' in '../tvheadend_4.3-2375g653bd0400noble_amd64.deb'. make[1]: Leaving directory '/home/ukn/tvheadend' dpkg-genbuildinfo --build=binary -O../tvheadend_4.3-2375g653bd0400noble_amd64.buildinfo dpkg-genchanges --build=binary -O../tvheadend_4.3-2375g653bd0400noble_amd64.changes dpkg-genchanges: info: binary-only upload (no source code included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included)
$################### log output end ####################
From this last log you need to copy the file name starting "'tvheadend' in '../tvheadend_4.3..." (in your case will have a different number after '4.3-') In my case is: tvheadend_4.3-2375~g653bd0400~noble_amd64.deb
Now you are ready to test: open one stream with tvh server and check the Tvheadend log:
2022-12-09 10:53:37.821 transcode: 0001: 01:MPEG2VIDEO: ==> Using profile h264_vaapi 2022-12-09 10:53:37.822 transcode: 0001: 02:AC3: ==> Using profile webtv-aac
To confirm you are using GPU for trancoding you need to send:
sudo intel_gpu_top
When you don't have any streams open you will see all numbers: 0; after you open streams you should see values non-zero in: Render/3D , Video and VideoEnhance.
Debugging
General
If you use the packaged version of tvheadend, make sure that you use the debug version of tvheadend (with the debugging symbols). For debian/ubuntu these packages have -dbg suffix, for rpm packages, these symbols are in debuginfo rpm files.
If you're going to be regularly trying development versions of Tvheadend or need to report a crash or deadlock then you should really read this page!
If you are investigating problems within Tvheadend then its worth being familiar with tools such as gdb and valgrind or clang, although these are not covered here.
However one thing that can be useful in investigating crashes within Tvheadend is to ensure that coredumps are generated, this will allow post analysis in gdb without having to actual run Tvheadend within gdb.
You can enable temporarily by running:
To make this permanent put this somewhere in your shell environment setup (.bashrc, .profile, etc...)
Firstly I'd recommend that if you're specifically trying to investigate an issue then you should consider running Tvheadend manually, rather than as a service, as documented below.
Logging
I'd strongly recommend that if you're specifically trying to investigate a crash or other problem in Tvheadend that you enable debugging:
-s will output debug info to syslog
--debug allows you to specify which subsystem to debug
--trace allows you to enable trace (more in-depth) logging on specific subsystems
You can also get Tvheadend to log to it's own file using:
You may also modify the debug settings using WEB GUI as admin - Configuration/Debugging. Note that the information is not saved,
it is just set for run-time (current task).
Debug log path - filename to store log
Debug trace - enable traces
Debug subsystems - comma separated list of subsystems
Trace subsystems - comma separated list of subsystems
The traces must be compiled to the tvheadend binary (see below).
Trace Options
The following options can be passed to tvheadend to provide detailed debugging information while the application is running. Trace debugging has to be enabled at build time with--enable-debugging and can be specified in a CLI command, e.g. tvheadend -u hts -g video --trace <module> or in the web interface (Configuration -> Debugging).
Multiple options can be used, e.g. –-trace cwc,dvr,linuxdvb
Crash reports
Incorrect (not useable) crash reports
In this case, the debug symbols are missing (look to the top of this page). Install the debug version of the tvheadend package.
Correct crash reports
Basic crash debug
You may run tvh in gdb directly using command:
Or attach gdb to the running process:
The 'continue' command will continue the execution of the program. If you need to break the execution and return to gdb, just use 'Ctrl-C'.
You may need to replace tvheadend with the full path to the binary and you will need to replace pid with the PID of the running process. To find that run:
Once you have gdb attached grab a stack trace from every thread using the following command:
Note: "set logging on" will cause GDB to write its output to a file, by default this will be gdb.txt in the current directory.
Enabling coredumps
If you need to investigate some running problem you can always attach (see below) later and if you need to trap crashes, then you can configure your system to generate a core file and then retrospectively analyse this with gdb.
If you're running manually you should enable coredumps in your environment:
I'd recommend you enable this permanently by putting this command in your shell initialisation scripts (.bashrc etc..).
If you're running as a daemon then you should use the -D command line option, this will enable coredumps from the daemon. If you start using sysvinit, upstart etc... then you will need to put this in the configuration file, e.g.:
Finally it's probably worth changing the coredump file format, personally I use the following configuration:
Or put the following in /etc/sysctl.conf:
If you're using a system like Ubuntu that uses apport (and cripples the ability to change the core format) just set core_uses_pid=1 instead.
Note: coredumps are (by default) stored in the current working directory, to make it possible for the daemon to write files the current working directory is set to /tmp when using -D, so check there for core files.
To verify that you have everything configured properly you can use the -A option to force a crash on startup. Do this from the command line or add to /etc/default/tvheadend:
Note: remember to remove the option after you've tested it!
Processing core file.
Once you have a core file you can start up gdb with that coredump, just as if you'd caught the crash while running under gdb:
You may need to replace tvheadend and core above with the proper paths.
For most crashes the most useful information is the back trace, this will provide a stack trace showing where the code crashed and the stack information at the time of the crash:
Note: "set logging on" will cause GDB to write its output to a file, by default this will be gdb.txt in the current directory.
However I'd strongly recommend that you keep a copy of tvheadend binary and core file in case further analysis is required.
Dead or Live Lock
If Tvheadend appears to die but the process is still running, then its quite possible that the process is deadlocked (or possibly live locked).
Use '--thrdebug 1' as the command line option. The deadlock will be printed to the tvheadend's configuration directory to file mutex-deadlock.txt and to the standard task error output (so you can see it through the systemctl service log for example).
GDB
The best way to help investigate such a problem is to get a full stack trace from every thread in the system.
First attach gdb to the running process:
The 'continue' command will continue the execution of the program. If you need to break the execution and return to gdb, just use 'Ctrl-C'.
You may need to replace tvheadend with the full path to the binary and you will need to replace pid with the PID of the running process. To find that run:
Once you have gdb attached grab a stack trace from every thread using the following command:
Note: "set logging on" will cause GDB to write its output to a file, by default this will be gdb.txt in the current directory.
It might also be useful to generate a core file for good measure:
This information may give an indication as to why things are locked, often 2 threads are stuck trying to lock a mutex (probably each holds the opposite lock).
Reporting crash (or lock)
If you're going to report a crash (or lockup) then please try to provide the above information, including a debug log (or whatever logging you have), a core file and the tvheadend binary and basic information about the platform (distribution, version and architecture) you're running on.
Memory leaks or corruption
It may be really difficult to track these problems. There are basically two tools which may help to discover the memory leaks or memory corruptions.
Valgrind
It is very slow, but it may be useable for things which are triggered every time:
clang
There is address and leak sanitizer in the clang toolkit.
The clang / llvm tools are usually split to multiple packages, here is list of required packages for Fedora 26:
The binary must be rebuild using the clang compiler and libraries:
Example build script (build_with_clang.sh):
Make sure to make your script executable.
If you do not see resolved the function names like:
get the correct path for the llvm-symbolizer, i.e. with\
then make sure that you set the external symbolizer like:
The error log should be like:
Mutex profiling
The code blocks are protected using mutexes. Tvheadend has the debug interface to show locks which took too much time now (latest 4.3 code). Use '--thrdebug 10020' where 20 means 20 millisecond threshold to show the problematic mutexes. The output is printed to standard error file descriptor (stderr) by default. If you run tvheadend using systemctl or initd, you may send those messages to a UDP port. Set the TVHEADEND_RTLOG_UDP_PORT environment variable like:
ARGS="/your_configure_arguments/"
SANITIZER=leak # or address
export CFLAGS="-fsanitize=$SANITIZER"
export LDFLAGS="-fsanitize=$SANITIZER"
./configure $ARGS --disable-pie --enable-ccdebug python=python3 cc=clang ld=clang nowerror
make -j4
#!/bin/sh
make distclean
ARGS="--enable-libffmpeg_static --disable-hdhomerun_static"
SANITIZER=leak # or address
export CFLAGS="-fsanitize=$SANITIZER"
export LDFLAGS="-fsanitize=$SANITIZER"
./configure $ARGS --disable-pie --enable-ccdebug python=python3 cc=clang ld=clang nowerror
make -j4
==16673==WARNING: Trying to symbolize code, but external symbolizer is not initialized!
#0 0x7fcda9407680 (/home/tvh/src/tvheadend/build.linux/tvheadend+0x65b680)
#1 0x7fcda943b115 (/home/tvh/src/tvheadend/build.linux/tvheadend+0x68f115)
==27911==ERROR: AddressSanitizer: heap-use-after-free on address 0x60700000d928 at pc 0x56409f916af4 bp 0x7ffc463d6670 sp 0x7ffc463d6668
READ of size 8 at 0x60700000d928 thread T0
#0 0x56409f916af3 in idnode_unlink /home/tvh/git/tvheadend/src/idnode.c:164:94
#1 0x56409f9c9f8a in memoryinfo_unregister /home/tvh/git/tvheadend/src/memoryinfo.h:52:3
#2 0x56409f9c9de2 in streaming_done /home/tvh/git/tvheadend/src/streaming.c:597:3
thread: mutex 0x5562f9f859e0 at src/api/api_idnode.c:134 took 43ms
thread: mutex 0x5562f9f859e0 at src/api/api_idnode.c:134 took 31ms
Other Functions
This section describes other functions which can be accessed via HTTP. They are not part of the HTTP API and so are not preceded by 'api'.
Unless otherwise stated no special privilege is needed to use these functions.
comet/poll
Returns a JSON object containing data used by the Tvheadend UI, including the disk space utilisation.
The "freediskspace" and "totaldiskspace" figures relate to the disk partition holding the recorder Storage Path, "useddiskspace" is the total size of all files stored below that point. These figures may not give the actual storage situation if there are multiple storage devices and mount points.
See for a WebSocket interface to this function.
dvrfile
Downloads a previously-recorded file. Called with the UUID of the recording. Requires appropriate privilege (DVR or streaming).
epgsave
Flushes the contents of the EPG to disk.
eventinfo
Used by simple.html.
favicon.ico
Downloads an icon file. The filename is hard-coded in the source; on installation it is usually placed at /usr/share/tvheadend/src/webui/static/img/logo.png.
HDHomeRun
These functions are only available if HDHomeRun Server has been compiled into Tvheadend. The first two are documented in , the others are required by Plex.
discover.json
lineup.json
lineup_status.json
lineup.post
imagecache
Outputs an image from the image cache. Requires streaming, recording or web interface privilege.
markdown
Used to download help files.
ping
Available on version 4.3-2124 and later. Provides a simple way to check that the server is alive. No authentication is needed to use this function.
play
This function acts as a front-end to the dvrfile and stream functions. It is invoked using the following forms:
The function examines the 'User-Agent' string sent by the client. If the user-agent is on a preset list (or is not present), data transfer starts immediately; if not then a playlist is returned to the client.
The User-Agent list is "MPlayer", "curl/", "wget/", "TVHeadend", "Lavf" and any string containing "shoutcastsource".
If ticket is added to the URL, for example:
the url in the returned playlist will contain an authentication ticket, removing any need to enter credentials in order to access the data. However the ticket is only valid for five minutes so the playlist cannot be re-used after that time.
When playing streams, the parameters for the underlying stream function can also be used.
playlist
This is a complex function which outputs lists of content available from the server, in various formats and filtered in several ways. The syntax for invoking the function depends on the required output and not all combinations of inputs are valid.
Note: The hostname portion of the URLs returned within the resulting playlist, for example m3u, will be the same as the hostname supplied with the http request.
List all tags
See below for sample output.
List all channels or recordings
The value of <x> in the URL specifies the format of the output. The options are e2, m3u or satip, with m3u the default if the item is omitted. For recordings only m3u is available.
For channels, a parameter sort can be added. This can take the value 'name' or 'numname', to sort the output by channel name or channel number respectively.
See below for notes including the values of <y> in the URL, and sample outputs.
List filtered channels or recordings
The value of <x> in the URL specifies the format of the output. The options are e2, m3u or satip, with m3u the default if the item is omitted. For recordings only m3u is available.
See below for notes including the values of <y> in the URL, and sample outputs.
Notes
The list of recordings includes all entries in the DVR logs, including failed and missed recordings and recordings to be made in the future (ie timers). Unplayable recordings have 'bandwidth=0' in the output.
The value of <y> in the URLs, if supplied, specifies whether the channel list or playlist should include authentication in the URL. If <y> is ticket, each entry includes an access-control 'ticket' - these tickets are only valid for five minutes, they are different for each channel/recording listed, and calling the playlist again will output a different set of tickets.
Alternatively, if Persistent Authentication is in use (TVHeadend versions > 4.3.1485), the value of <y> may be set to auth. The auth code must be appended to the URL as a parameter, eg.
Outputs one of two files describing the SAT>IP server and the services available from it. SAT>IP server must be compiled into Tvheadend.
simple.html
A rudimentary user interface to TVHeadend. It shows the contents of the recorder log (both completed and future recordings) and allows entries to be cancelled or deleted. A search box allows the EPG to be scanned for matching entries; clicking on an entry opens an information page which contains a button allowing the event to be recorded. Requires RECORDER privilege.
special/srvid2
Outputs details of encrypted services. Each item contains:
Service ID
CA ID
CA provider ID
Service name
state
Outputs the TVHeadend version number and a (text) list of channels. This function requires Admin privilege.
The binary hash is only filled-in if the server runs on an x86 processor.
status.xml
Outputs the current status of the server, including CPU load average, recordings in progress (or minutes to the next recording) and the number of active subscriptions. Needs 'Web interface' or 'Recorder' privilege.
stream
Starts the streaming of live data from a channel, service or mux. The parameters which can be applied depend on the source:
profile. The streaming profile to use. If the specified profile does not exist or can not be used the 'htsp' profile is used if available.
qsize. Streaming buffer size. Default is 1500000 bytes.
User-Agent. Use unknown.
profile. The streaming profile to use. If the specified profile does not exist or can not be used the 'htsp' profile is used if available.
qsize. Streaming buffer size. Default is 1500000 bytes.
descramble. If set to 0 Tvheadend does not descramble the service.
qsize. Streaming buffer size. Default is 10000000 bytes.
pids. A comma-separated list of pids to stream, or the word 'all' to stream the raw mux. The default is to stream all.
udpstream
Controls the streaming of live data from a channel or service to a UDP address and port. This function requires Tvheadend version 4.3.2038 or later.
The following parameters are mandatory:
address. The IP address of the device to receive the UDP stream.
port. The destination port address.
The remaining parameters for the start function depend on the source:
profile. The streaming profile to use. If the specified profile does not exist or can not be used a 'Not Allowed' error is output.
qsize. Streaming buffer size. Default is 1500000 bytes.
User-Agent. Use unknown.
profile. The streaming profile to use. If the specified profile does not exist or can not be used a 'Not Allowed' error is output.
qsize. Streaming buffer size. Default is 1500000 bytes.
descramble. If set to 0 Tvheadend does not descramble the service.
xmltv
Outputs the EPG in XML format, filtered in various ways.
The final variation lists the complete EPG together with a channel list. Example:
If Persistent Authentication is in use (TVHeadend versions > 4.3.1485), the auth code must be appended to the URL as a parameter.
Same as channelAdd, but all fields (except channelId) are optional.
channelDelete
A channel has been deleted on the server.
Message fields:\
tagAdd
A new tag has been created on the server.
Message fields:\
tagUpdate
Same as tagAdd, but all fields (except tagId) are optional.
tagDelete
A tag has been deleted from the server.
Message fields:\
dvrEntryAdd
(Added in version 4)
A new recording has been created on the server.
Message fields:\
Valid values for state:\
Valid values for subscriptionError:\
dvrEntryUpdate
Message fields:\
dvrEntryDelete
(Added in version 4)
A recording has been deleted from the server.
Message fields:\
autorecEntryAdd
(Added in version 13)
A new autorec recording has been created on the server.
Message fields:\
autorecEntryUpdate
(Added in version 13)
Message fields:\
autorecEntryDelete (Added in version 13)
Message fields:\
timerecEntryAdd
(Added in version 18)
A new autorec recording has been created on the server.
Message fields:\
timerecEntryUpdate
(Added in version 18)
Message fields:\
timerecEntryDelete
(Added in version 18)
Message fields:\
eventAdd
(Added in version 6)
Message fields:\
contentType previously had the major DVB category in the bottom 4 bits,
however in v6 this has been changed to properly match DVB, so top 4 bits
as major category and bottom 4 bits has sub-category. Clients requesting
v5 or lower will get the old output.
eventUpdate
(Added in version 6)
Message fields:\
eventDelete
(Added in version 6)
Message fields:\
initialSyncCompleted
(Added in version 2)
Sent after all the initial metadata has been sent when session has been set to async mode.
Message fields:\
subscriptionStart
Asynchronous message output when a new subscription is successfully started.
Message fields:\
Stream message fields:\
Sourceinfo message fields:\
Video Stream types:\
Audio Stream types:\
Subtitle Stream types:\
subscriptionGrace
Notifies client about the grace timeout (timeout for stream activation). It can be issues multiple times.
For example a configuration with satellite rotors requires more than 120 seconds to tune, so users
should be notified..
Message fields:\
subscriptionStop
A subscription has been stopped.
Message fields:\
Valid values for subscriptionError:\
subscriptionSkip
(Added in version 9)
A subscription has been skipped.
Message fields:\
subscriptionSpeed
(Added in version 9)
A subscription's playback speed has changed.
This can happen even without a speed request, should playback reach either end of the buffer.
Message fields:\
subscriptionStatus
Subscription status update.
Message fields:\
Valid values for subscriptionError:\
queueStatus
The queueStatus message is sent every second during normal data delivery.
The transmit scheduler have different drop thresholds for different frame types.
If congestion occurs it will favour dropping B-frames before P-frames before I-frames.
All audio is recognized as I-frames.
Message fields:\
signalStatus
The signalStatus message is sent every second during normal data delivery.
The optional fields may not have been implemented or may not be supported by the active adapter.
Message fields:\
timeshiftStatus
Provide status every second about the timeshift buffer.
$ curl http://192.168.0.1:9981/xmltv/channels
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE tv SYSTEM "xmltv.dtd">
<tv generator-info-name="TVHeadend-4.3-1670~ge37c696de-dirty" source-info-name="tvh-Tvheadend">
<channel id="7e7b77801531c803f5ce8f4d5003f44c">
<display-name>Channel 5+1</display-name>
</channel>
...
<programme start="20181231151500 +0000" stop="20181231161500 +0000" channel="7e7b77801531c803f5ce8f4d5003f44c">
<title lang="eng">Dirty Dancing</title>
<desc lang="eng">Classic starring Patrick Swayze and Jennifer Grey. A spoiled 17-year-old learns a lot about life from the hotel dance instructor during a family summer holiday. (1987)[S]</desc>
<category lang="en">Movie / Drama</category>
</programme>
...
</tv>
channelId u32 required ID of channel.
channelIdStr str required Full UUID of channel (Added in version 41).
channelNumber u32 required Channel number, 0 means unconfigured.
channelNumberMinor u32 optional Minor channel number (Added in version 13).
channelName str required Name of channel.
channelIcon str optional URL to an icon representative for the channel
(For v8+ clients this could be a relative /imagecache/ID URL
intended to be fed to fileOpen() or HTTP server)
(For v15+ clients this could be a relative imagecache/ID URL
intended to be fed to fileOpen() or HTTP server)
eventId u32 optional ID of the current event on this channel.
nextEventId u32 optional ID of the next event on the channel.
tags u32[] optional Tags this channel is mapped to.
services msg[] optional List of available services (Added in version 5)
name str required Service name
type str required Service type
caid u32 optional Encryption CA ID
caname str optional Encryption CA name
providername str optional Service provider (Added in version 38)
channelId u32 required ID of channel.
tagId u32 required ID of tag.
tagIdStr str required Full UUID of tag (Added in version 41).
tagName str required Name of tag.
tagIndex u32 optional Index value for sorting (default by from min to max) (Added in version 18).
tagIcon str optional URL to an icon representative for the channel.
tagTitledIcon u32 optional Icon includes a title
members u32[] optional Channel IDs of those that belong to the tag
tagId u32 required ID of tag.
id u32 required ID of dvrEntry.
idStr str required Full UUID of dvrEntry (Added in version 41).
channel u32 optional Channel of dvrEntry.
start s64 required Time of when this entry was scheduled to start recording.
stop s64 required Time of when this entry was scheduled to stop recording.
startExtra s64 required Extra start time (pre-time) in minutes (Added in version 13).
stopExtra s64 required Extra stop time (post-time) in minutes (Added in version 13).
retention s64 required DVR Entry retention time in days (Added in version 13).
priority u32 required Priority (0 = Important, 1 = High, 2 = Normal, 3 = Low, 4 = Unimportant, 5 = Not set) (Added in version 13).
eventId u32 optional Associated EPG Event ID (Added in version 13).
autorecId str optional Associated Autorec UUID (Added in version 13).
timerecId str optional Associated Timerec UUID (Added in version 18).
contentType u32 optional Content Type (like in the DVB standard) (Added in version 13).
title str optional Title of recording
subtitle str optional Subtitle of recording (Added in version 20).
summary str optional Short description of the recording (Added in version 6).
description str optional Long description of the recording.
state str required Recording state
error str optional Plain english error description (e.g. "Aborted by user").
owner str optional Name of the entry owner (Added in version 18).
creator str optional Name of the entry creator (Added in version 18).
subscriptionError str optional Subscription error string (Added in version 20).
streamErrors str optional Number of recording errors (Added in version 20).
dataErrors str optional Number of stream data errors (Added in version 20).
path str optional Recording path for playback.
files msg optional All recorded files for playback (Added in version 21).
filename str optional File name.
fsid ??? unknown TBA. (Maybe the inode.)
size s64 unknown TBA. (Probably file size in bytes.)
info msg unknown Information about the streams in this file.
type str unknown Stream type name.
width u32 unknown Video stream width.
height u32 unknown Video stream height.
duration u32 unknown Duration (Units TBA).
aspect_num u32 unknown Aspect ration numerator.
aspect_den u32 unknown Aspect ration denominatorTBA.
language str unknown 3 byte language code.
audio_type u32 optional Only present for audio streams.
audio_version u32 unknown TBA.
composition_id u32 unknown TBA.
ancillary_id u32 unknown TBA.
start s64 unknown TBA.
stop s64 unknown TBA.
dataSize s64 optional Actual file size of the last recordings (Added in version 21).
enabled u32 optional Enabled flag (Added in version 23).
ageRating u32 optional Minimum age rating (Added in version 36).
ratingLabel str optional Parental rating label text (Added in version 37).
ratingIcon str optional Parental rating label icon (Added in version 37).
ratingCountry str optional Parental rating label country (Added in version 41).
ratingAuthority str optional Parental rating label authority (Added in version 41).
configId str optional DVR Configuration UUID (Added in version 40).
comment str optional User Comment (Added in version 42).
channelName str optional Name of the channel.
removal u32 optional TBA. (Something to do with retention.)
playcount u32 optional TBA. (Probably the number of times the recording has been played.)
playposition u32 optional TBA. (Probably the last played position.
image str optional Path to artwork.
fanartImage str optional TBA. (Probably path to fan art.)
copyrightYear u32 optional TBA. (Probably the year produced.)
duplicate u32 optional TBA.
seasonNumber u32 optional Season number.
seasonCount u32 optional Season count.
episodeNumber u32 optional Episode number.
episodeCount u32 optional Episode count.
partNumber u32 optional Part number.
partCount u32 optional Part count.
episodeOnscreen str optional Textual representation of the season/episode number suitable for display.
TODO
noFreeAdapter No free adapter for this service.
scrambled Service is scrambled.
badSignal Bad signal status.
tuningFailed Tuning of this service failed.
subscriptionOverridden Subscription overridden by another one.
muxNotEnabled No mux enabled for this service.
invalidTarget Recording/livestream cannot be saved to filesystem or recording/streaming configuration is incorrect.
userAccess User does not have access rights for this service.
userLimit Maximum number of streaming connections set in user's profile reached.
Same as dvrEntryAdd, but all fields (except id) are optional.
id u32 required ID of recording to delete.
id str required ID (string!) of dvrAutorecEntry.
enabled u32 required If autorec entry is enabled (activated).
name str required Name of the autorec entry (Added in version 18).
minDuration u32 required Minimal duration in seconds (0 = Any).
maxDuration u32 required Maximal duration in seconds (0 = Any).
retention u32 required Retention time (in days).
daysOfWeek u32 required Bitmask - Days of week (0x01 = Monday, 0x40 = Sunday, 0x7f = Whole Week, 0 = Not set).
priority u32 required Priority (0 = Important, 1 = High, 2 = Normal, 3 = Low, 4 = Unimportant, 5 = Not set).
approxTime u32 required Minutes from midnight (up to 24*60).
start s32 required Exact start time (minutes from midnight) (Added in version 18).
startWindow s32 required Exact stop time (minutes from midnight) (Added in version 18).
startExtra s64 required Extra start minutes (pre-time).
stopExtra s64 required Extra stop minutes (post-time).
title str optional Title.
fulltext u32 optional Fulltext flag (Added in version 20).
directory str optional Forced directory name (Added in version 19).
channel u32 optional Channel ID.
owner str optional Owner of this autorec entry (Added in version 18).
creator str optional Creator of this autorec entry (Added in version 18).
dupDetect u32 optional Duplicate detection (see addAutorecEntry) (Added in version 20).
broadcastType u32 optional Broadcast type (0 = any, 1 = new/premiere/unknown, 2 = repeated, 3 = new/premiere) (Added in version 39).
configId str optional DVR Configuration UUID (Added in version 40).
comment str optional User Comment (Added in version 42).
Same as autorecEntryAdd but all fields (except id) are optional.
id str required Autorec Entry ID (string!)
title str required Title for the recordings.
directory str optional Forced directory name (Added in version 19).
enabled u32 required Title for the recordings.
name str required Name for this timerec entry.
channel u32 required Channel ID.
daysOfWeek u32 optional Bitmask - Days of week (0x01 = Monday, 0x40 = Sunday, 0x7f = Whole Week, 0 = Not set).
priority u32 optional Priority (0 = Important, 1 = High, 2 = Normal, 3 = Low, 4 = Unimportant, 5 = Not set).
start u32 required Minutes from midnight (up to 24*60) for the start of the time window (including)
stop u32 required Minutes from modnight (up to 24*60) for the end of the time window (including, cross-noon allowed)
retention u32 optional Retention in days.
owner str optional Owner of this timerec entry.
creator str optional Creator of this timerec entry.
configId str optional DVR Configuration UUID (Added in version 40).
comment str optional User Comment (Added in version 42).
Same as timerecEntryAdd but all fields (except id) are optional.
id str required Timerec Entry ID (string!)
eventId u32 required Event ID
channelId u32 required The channel this event is related to.
start u64 required Start time of event, UNIX time.
stop u64 required Ending time of event, UNIX time.
title str optional Title of event.
summary str optional Short description of the event (Added in version 6).
description str optional Long description of the event.
serieslinkId u32 optional Series Link ID (Added in version 6).
episodeId u32 optional Episode ID (Added in version 6).
seasonId u32 optional Season ID (Added in version 6).
brandId u32 optional Brand ID (Added in version 6).
contentType u32 optional DVB content code (Added in version 4, Modified in version 6*).
ageRating u32 optional Minimum age rating (Added in version 6).
starRating u32 optional Star rating (1-5) (Added in version 6).
firstAired s64 optional Original broadcast time, UNIX time (Added in version 6).
seasonNumber u32 optional Season number (Added in version 6).
seasonCount u32 optional Show season count (Added in version 6).
episodeNumber u32 optional Episode number (Added in version 6).
episodeCount u32 optional Season episode count (Added in version 6).
partNumber u32 optional Multi-part episode part number (Added in version 6).
partCount u32 optional Multi-part episode part count (Added in version 6).
episodeOnscreen str optional Textual representation of episode number (Added in version 6).
image str optional URL to a still capture from the episode (Added in version 6).
dvrId u32 optional ID of a recording (Added in version 5).
nextEventId u32 optional ID of next event on the same channel.
ratingLabel str optional Parental rating label text (Added in version 37).
ratingIcon str optional Parental rating label icon (Added in version 37).
ratingCountry str optional Parental rating label country (Added in version 41).
ratingAuthority str optional Parental rating label authority (Added in version 41).
isNew str optional Flag to indicate whether the programme is new to air (Added in version 43).
Same as eventAdd but all fields (except eventId) are optional.
eventId u32 required Event ID
subscriptionId u32 required Subscription ID.
streams msg[] required Array of messages with stream information
sourceinfo msg optional Source information.
index u32 required Index for this stream
type str required Type of stream
meta bin optional Codec metadata (private data, libav - extradata) (Added in version 17)
language str optional Language for stream
Video components only:
width u32 optional Width of video in pixels
height u32 optional Height of video in pixels
aspect_num u32 optional Aspect ratio numerator (Added in version 5) *Can be incorrect and should not be relied upon*
aspect_den u32 optional Aspect ratio denominator (Added in version 5) *Can be incorrect and should not be relied upon*
Audio components only:
audio_type u32 optional Audio type - 0=Normal; 1=Clean effects; 2=Hearing impaired; 3=Visually impaired commentary; 4-255=Reserved (Added in version 11)
channels u32 optional Number of audio channels (Added in version 5)
rate u32 optional Audio bitrate (Added in version 5)
Subtitle components only:
composition_id u32 optional ??? (Added in version 5)
ancillary_id u32 optional ??? (Added in version 5)
adapter str optional Adapter name
mux str optional Transponder name
network str optional Network name
provider str optional Provide name (like 'Sky UK')
service str optional Service name
satpos str optional Satellite position name (Added in version 20).
MPEG2VIDEO MPEG2 video, meta field is present (configuration blocks)
H264 H264 video, meta field is present (configuration blocks)
HEVC HEVC video, meta field is present (configuration blocks)
MPEG2AUDIO MPEG2 audio (MP2)
AC3 AC3 audio
AAC ADTS framed AAC (one AAC packet per ADTS frame), meta field is present (MPEG4 config)
EAC3 Enhanced AC3 audio
VORBIS Vorbis audio, meta field is present with the main vorbis header
subscriptionId u32 required Subscription ID.
status str optional Error message if subscription stopped unexpectedly.
subscriptionError str optional Subscription error code (Added in version 20).
see dvrEntryAdd
subscriptionId u32 required Subscription ID.
error u32 optional The last skip command caused an error.
absolute u32 optional Indicates the output is absolute (Note: should always be 1 at the moment)
time u64 optional The time the subscription has skipped to.
size u64 optional The position in the file we've skipped to (Note: not currently used).
subscriptionId u32 required Subscription ID.
speed u32 required The new speed of the subscription
subscriptionId u32 required Subscription ID.
status str optional English clear text of error status. Absence of this field means that the status is OK.
subscriptionError str optional Subscription error code (Added in version 20).
see dvrEntryAdd
subscriptionId u32 required Subscription ID.
packets u32 required Number of data packets in queue.
bytes u32 required Number of bytes in queue.
delay u32 optional Estimated delay of queue (in µs).
Bdrops u32 required Number of B-frames dropped
Pdrops u32 required Number of P-frames dropped
Idrops u32 required Number of I-frames dropped
delay s64 required Delta between first and last DTS (Added in version 9)
subscriptionId u32 required Subscription ID.
feStatus str required Frontend status.
feSNR u32 optional Signal to noise ratio.
feSignal u32 optional Signal status percentage.
feBER u32 optional Bit error rate.
feUNC u32 optional Uncorrected blocks.
subscriptionId u32 required Subscription ID.
full u32 required Indicates whether the buffer is full
shift s64 required Current position relative to live
start s64 optional PTS of the first frame in the buffer
end s64 optional PTS of the last frame in the buffer
subscriptionId u32 required Subscription ID.
frametype u32 required Type of frame as ASCII value: 'I', 'P', 'B'
stream u32 required Stream index. Corresponds to the streams reported in the subscriptionStart message.
dts s64 optional Decode Time Stamp in µs.
pts s64 optional Presentation Time Stamp in µs.
duration u32 required Duration of frame in µs.
payload bin required Actual frame data.
Client to Server (RPC) methods
hello
Used to identify the client toward the server and to get the session challenge used to hash passwords into digests. The client can request a different version of the HTSP protocol with this method. If no 'hello' message is sent the server assumes latest version is to be used.
Client/Server should select lowest common version, if this is not possible connection should be terminated.
Request message fields:
Reply message fields:
Note: possible values for servercapability[]:
authenticate
This can be used to issue authentication without doing anything else.
If no privileges are gained it will return with 'noaccess' set to 1.
Request message fields:
Reply message fields:
api
(Added in version 24)
This is a proxy to HTTP API.
Request message fields:
Reply message fields:
Also see: and .
getDiskSpace
(Added in version 3)
Return diskspace status from Tvheadend's PVR storage
Request message fields:
Reply message fields:
Also see: .
getSysTime
(Added in version 3)
Return system time on the server.
Request message fields:
Reply message fields:
enableAsyncMetadata
When this is enabled the client will get continuous updates from the server about added, update or deleted channels, tags, dvr and epg entries.
An interactive application that presents the user with information about these things should probably enable this and the implement the various server to client methods.
Request message fields:
Reply message fields:
Once the reply as been sent the initial data set will be provided, and then updates will arrive asynchronously after that. The initial data dump is sent using the following messages:
getChannel
(Added in version 14)
Request information about the given channel.
Request message fields:
Reply message fields:
Also see:
getEvent
Request information about the given event. An event typically corresponds to a program on a channel.
The language field in the request allows preference for languages to be requested for the various string fields.
Request message fields:
Reply message fields:
Also see:
getEvents
(Added in version 4)
Request information about a set of events. If no options are specified the entire EPG database will be returned.
Request message fields:
Reply message fields:
epgQuery
(Added in version 4)
Query the EPG (event titles) and optionally restrict to channel/tag/content type.
Request message fields:
Reply message fields:
if full == 1
else
getEpgObject
Get detailed EPG Object info.
Request message fields:
Reply message fields:
getDvrConfigs
(Added in version 16)
Return a list of DVR configurations.
Reply message fields:
Message fields:
Also see:
addDvrEntry
(Added in version 4)
Create a new DVR entry. Either eventId or channelId, start and stop must be specified.
Request message fields:
Reply message fields:
updateDvrEntry
(Added in version 5)
Update an existing DVR entry.
Request message fields:
Reply message fields:
cancelDvrEntry
(Added in version 5)
Cancel an existing recording, but don't remove the entry from the database.
Request message fields:
Reply message fields:
deleteDvrEntry
(Added in version 4)
Delete an existing DVR entry from the database.
Request message fields:
Reply message fields:
getDvrCutpoints
(Added in version 12)
Get DVR cutpoints.
Request message fields:
Reply message fields:
Cutpoint fields:
addAutorecEntry
(Added in version 13)
Create a new Autorec DVR entry. Title must be specified.
Request message fields:
Reply message fields:
updateAutorecEntry
(Added in version 25)
Update an existing Autorec DVR entry.
Request message fields:
Reply message fields:
deleteAutorecEntry
(Added in version 13)
Delete an existing autorec DVR entry from the database.
Request message fields:
Reply message fields:
addTimerecEntry
(Added in version 18)
Create a new Timerec DVR entry. Title must be specified.
Request message fields:
Reply message fields:
updateTimerecEntry
(Added in version 25)
Update an existing Timerec DVR entry.
Request message fields:
Reply message fields:
deleteTimerecEntry
(Added in version 18)
Delete an existing timerec DVR entry from the database.
Request message fields:
Reply message fields:
getTicket
(Added in version 5)
Get a ticket to allow access to a channel or recording via HTTP
Request message fields:
Reply message fields:
subscribe
Request subscription to the given channel.
Request message fields:
Reply message fields:
unsubscribe
Stop a subscription.
Request message fields:
Reply message fields:
subscriptionChangeWeight
(Added in version 5)
Change the weight of an existing subscription
Request message fields:
Reply message fields:
subscriptionSkip
(Added in version 9)
Skip a timeshift enabled subscription. The response will be asynchronous subscriptionSkip().
Request message fields:
Reply message fields:
subscriptionSeek
(Added in version 9)
Synonym for subscriptionSkip
subscriptionSpeed
(Added in version 9)
Set the playback speed for the subscription. The response will be asynchronous subscriptionSpeed().
Request message fields:
Reply message fields:
subscriptionLive
(Added in version 9)
Return a timeshifted session to live. Reply will be asynchronous subscriptionSkip().
Request message fields:
Reply message fields:
subscriptionFilterStream
(Added in version 12)
Enable or disable specified streams by index.
Request message fields:
Reply message fields:
getProfiles
(Added in version 16)
Return a list of stream profiles (configurations).
Reply message fields:
Message fields:
getCodecs
(Added in version 11, Removed in version 16)
Return a list of encoders (codecs).
Reply message fields:
fileOpen
(Added in version 8)
Open a file within the Tvheadend file system. This is now the preferred method (in place of HTTP) for accessing recordings.
Accessing recordings via HTSP will overcome the limitations of standard HTTP streaming which cannot handle both skipping and growing files (i.e. in-progress recordings) at the same time.
htspversion u32 required The server supports all versions of the protocol up to and including this number.
servername str required Server software name.
serverversion str required Server software version.
servercapability str[] required Server capabilities (Added in version 6)
challenge bin required 32 bytes randomized data used to generate authentication digests
webroot str optional Server HTTP webroot (Added in version 8)
Note: any access to TVH webserver should include this at start of URL path
cwc Descrambling available
v4l Analogue TV available
linuxdvb Linux DVB API available
imagecache Image caching available
timeshift Timeshifting available (Added in version 9).
None
noaccess u32 optional If set to 1, no privileges were granted.
response msg[] required Structured response (like in JSON HTTP replies)
None
freediskspace s64 required Bytes available.
totaldiskspace s64 required Total capacity.
None
time s64 required UNIX time.
timezone s32 required Hours west of GMT. (deprecated, does not work reliable, use gmtoffset instead)
gmtoffset s32 optional Minutes east of GMT.
epg u32 optional Set to 1, to include EPG data in async, implied by epgMaxTime (Added in version 6).
lastUpdate s64 optional Only provide metadata that has changed since this time (Added in version 6).
epgMaxTime s64 optional Maximum time to return EPG data up to (Added in version 6)
language str optional RFC 2616 compatible language list (Added in version 6)
None
tagAdd optional
channelAdd optional
tagUpdate optional
dvrEntryAdd optional
eventAdd optional (Added in version 6)
initialSyncComplete required
channelId u32 required Channel ID.
see channelAdd
eventId u32 required Event ID.
language str optional RFC 2616 compatible language list (Added in version 6)
see eventAdd
eventId u32 optional Event ID to begin from (Optional since version 6)
channelId u32 optional Channel ID to get data for (Added in version 6)
numFollowing u32 optional Number of events to add (Optional since version 6)
maxTime u64 optional Maximum time to return data up to (Added in version 6)
language str optional RFC 2616 compatible language list (Added in version 6)
events msg[] required List of events, using response message fields from eventAdd
query str required Title regular expression to search for
channelId u32 optional [[ChannelId]] to restrict search to
tagId u32 optional [[TagId]] to restrict search to
contentType u32 optional DVB content type to restrict search to
minduration u32 optional Minimal duration in seconds (Added in version 13)
maxduration u32 optional Maximal duration in seconds (Added in version 13)
language str optional RFC 2616 compatible language list for title (Added in version 6)
full u32 optional Output full event list rather than just IDs
events msg[] optional List of events, using response message fields from eventAdd
eventIds u32[] optional List of eventIds that match the query
id u32 required Object ID
type u32 optional Object type
uuid str required DVR configuration ID
name str required DVR configuration Name
comment str required DVR configuration Comment
eventId u32 optional Event ID (Optional since version 5).
channelId u32 optional Channel ID (Added in version 5)
start s64 optional Time to start recording (Added in version 5)
stop s64 optional Time to stop recording (Added in version 5)
retention u32 optional Retention time in days (Added in version 13)
creator str optional Name of the event creator (Added in version 5, obsoleted in version 18 - applications are not allowed to change credential)
priority u32 optional Recording priority (Added in version 5)
startExtra s64 optional Pre-recording buffer in minutes (Added in version 5)
stopExtra s64 optional Post-recording buffer in minutes (Added in version 5)
title str optional Recording title, if no eventId (Added in version 6)
subtitle str optional Recording subtitle, if no eventId (Added in version 20)
description str optional Recording description, if no eventId (Added in version 5)
configName str optional DVR configuration name or UUID
enabled u32 optional Enabled flag (Added in version 23).
ageRating u32 optional Minimum age rating (Added in version 36).
comment str optional User Comment (Added in version 42).
success u32 required 1 if entry was added, 0 otherwise
id u32 optional ID of created DVR entry
error str optional English clear text of error message
id u32 required DVR Entry ID
channelId u32 optional New channel ID (Added in version 22)
start s64 optional New start time
stop s64 optional New stop time
title str optional New entry title
subtitle str optional New entry subtitle (Added in version 21)
description str optional New entry description (Added in version 6)
startExtra s64 optional New pre-record buffer (Added in version 6)
stopExtra s64 optional New post-record buffer (Added in version 6)
configName str optional New DVR configuration name or UUID
retention u32 optional Retention in days (Added in version 13)
priority u32 optional Recording priority (Added in version 13)
enabled u32 optional Enabled flag (Added in version 23).
comment str optional User Comment (Added in version 42).
success u32 required 1 if update as successful, otherwise 0
error str optional Error message if update failed
id u32 required dvrEnryId to delete
success int required 1 if entry was cancelled
error str optional Error message if cancellation failed
id u32 required DVR Entry ID
success u32 required 1 if entry was removed
error str optional Error message if the delete fails
id u32 required DVR Entry ID
cutpoints msg[] optional List of cutpoint entries, if a file is found and has some valid data.
start u32 required Cut start time in ms.
end u32 required Cut end time in ms.
type u32 required Action type:
0=Cut, 1=Mute, 2=Scene,
3=Commercial break.
enabled u32 optional Enabled flag (Added in version 19).
title str required Title for the recordings.
fulltext u32 optional Full text flag (Added in version 20).
directory str optional Forced directory name - missing or empty = auto (Added in version 19).
name str optional Name of this autorec entry (Added in version 18).
configName str optional DVR Configuration Name / UUID.
channelId u32 optional Channel ID.
minDuration u32 optional Minimal duration in seconds (0 = Any).
maxDuration u32 optional Maximal duration in seconds (0 = Any).
daysOfWeek u32 optional Bitmask - Days of week (0x01 = Monday, 0x40 = Sunday, 0x7f = Whole Week, 0 = Not set).
priority u32 optional Priority (0 = Important, 1 = High, 2 = Normal, 3 = Low, 4 = Unimportant, 5 = Not set).
approxTime u32 optional Minutes from midnight (up to 24*60) (window +- 15 mintes) (Obsoleted from version 18).
start s32 optional Minutes from midnight (up to 24*60) for the start of the time window (including) (Added in version 18).
startWindow s32 optional Minutes from modnight (up to 24*60) for the end of the time window (including, cross-noon allowed) (Added in version 18).
startExtra s64 optional Extra start minutes (pre-time).
stopExtra s64 optional Extra stop minutes (post-time).
dupDetect u32 optional Dup Detect (0 = all, 1 = diff episode, 2 = diff subtitle, 3 = diff description, 4 = once per week, 5 = once per day) (Added in version 20).
comment str optional User Comment.
broadcastType u32 optional Broadcast type (0 = any, 1 = new/premiere/unknown, 2 = repeated, 3 = new/premiere) (Added in version 39).
success u32 required 1 if entry was added, 0 otherwise
id str optional ID (string!) of created autorec DVR entry
error str optional English clear text of error message
id str required Autorec DVR Entry ID (string!)
title str optional Title for the recordings
(Rest same as for addAutorecEntry)
None (errors only propagated via HTTP status code)
id str required Autorec DVR Entry ID (string!)
success u32 required 1 if entry was removed
error str optional Error message if the delete fails
enabled u32 optional Enabled flag (Added in version 19).
title str required Title for the recordings.
directory str optional Forced output directory name (Added in version 19).
name str optional Name for this timerec entry.
configName str optional DVR Configuration Name / UUID.
channelId u32 optional Channel ID.
daysOfWeek u32 optional Bitmask - Days of week (0x01 = Monday, 0x40 = Sunday, 0x7f = Whole Week, 0 = Not set).
priority u32 optional Priority (0 = Important, 1 = High, 2 = Normal, 3 = Low, 4 = Unimportant, 5 = Not set).
start u32 optional Minutes from midnight (up to 24*60) for the start of the time window (including)
stop u32 optional Minutes from modnight (up to 24*60) for the end of the time window (including, cross-noon allowed)
retention u32 optional Retention in days.
comment str optional User Comment.
success u32 required 1 if entry was added, 0 otherwise
id str optional ID (string!) of created timerec DVR entry
error str optional English clear text of error message
id str required Timerec DVR Entry ID (string!)
title str optional Title for the recordings
(Rest same as for addTimerecEntry)
None (errors only propagated via HTTP status code)
id str required Timerec DVR Entry ID (string!)
success u32 required 1 if entry was removed
error str optional Error message if the delete fails
channelId u32 optional Channel to gain access for
dvrId u32 optional DVR file to gain access for
path str required The full path for access URL (no scheme, host or port)
ticket str required The ticket to pass in the URL query string
channelId u32 required ID for channel.
subscriptionId u32 required Subscription ID. Selected by client. This value is not interpreted by the server in any form.
The value is used from now on in all messages related to the subscription.
weight u32 optional Weighting of this subscription (same as recording priority).
90khz u32 optional Request PTS/DTS in default 90kHz timebase, default is 1MHz (Added in version 7)
normts u32 optional Request PTS/DTS normalisation (Added in version 7)
Note: this will mean missing timestamps are added, first packet should be ~0 and will always be an i-frame.
Note: this is implied if timeshiftPeriod is enabled
Note: from version 17, this is always enabled and this parameter is ignored.
queueDepth u32 optional Change the default packet queue lengths, default 500000 bytes (Added in version 7)
Note: I-frame depth is 3*queueDepth, P-frame is 2*queueDepth and B-frame is queueDepth
timeshiftPeriod u32 optional The number of seconds to keep in the timeshift buffer (Added in version 9)
Note: this may be bounded by server configuration settings
profile str optional Select stream profile (Added in version 16).
90khz u32 optional Indicates 90khz timestamps will be used
normts u32 optional Indicates timestamps will be normalised (and fixed)
timeshiftPeriod u32 optional The actual timeshiftPeriod to be used
subscriptionId u32 required Subscription ID.
None
subscriptionId u32 required Subscription ID.
weight u32 optional The new subscription weight.
None
subscriptionId u32 required Subscription ID.
absolute u32 optional The skip request is absolute
time u64 optional Specify skip using time (units are as for PTS)
size u64 optional Specify skip using size (Not currently used)
uuid str required Profile ID
name str required Profile Name
comment str required Profile Comment
encoders list[str] optional Supported encoders
file str required File path to open
/dvrfile/ID will open the file associated with DVR entry ID
/imagecache/ID will open the file associated with imagecache entry ID (Note: only works for HTSPv10+)
id u32 required The file handle used for further file operations
size u64 optional The size of the file in bytes
mtime u64 optional The last time the file was modified
id u32 required The file handle used for further file operations
size u64 required The amount of data to read
offset u64 optional Offset into the file to read (default is current position)
data bin required The data read from the file (size may be less than requested)
id u32 required The file handle to be closed
None
id u32 required The file handle to be stat'd
size u64 optional The size of the file in bytes
mtime u64 optional The last time the file was modified
id u32 required The file handle to be stat'd
offset u64 required The position to seek in the file
whence str required Where to seek relative to (default=SEEK_SET)
SEEK_SET Seek relative to start of file
SEEK_CUR Seek relative to current position in file
SEEK_END Seek relative (backwards) to end of file
offset u64 optional The new absolute position within the file
DVR
This section includes functions to manipulate recorder objects; timers, autorecs and recordings. Unless noted otherwise, RECORDER privilege is required for all these functions - the 'Basic' tick-box in the 'Video Recorder' drop-down on the Access Entry screen. Other tick-boxes will be needed for some functions.
dvr/config/class
Lists the text strings, options and defaults used when configuring the DVR capability within TVH (ie Configuration -> Recording). Requires either RECORDER or ADMIN privilege.
dvr/config/grid
Lists the configuration sets available for the TVH server together with their options. Configurations are identified by their name parameter; the default config has the name blank. Requires either RECORDER or ADMIN privilege.
dvr/config/create
Creates a new configuration set. Requires ADMIN privilege.
name configuration name. Must be supplied and cannot be blank
conf parameter set, passed as a JSON object
dvr/entry/class
Lists the text strings, options and defaults used when editing an upcoming recording.
dvr/entry/grid
Lists all of the recordings that TVH knows about, ie it combines the output of grid_upcoming, grid_finished, grid_failed and grid_removed. Use the status parameter to tell them apart.
See for parameter details, and note the default is to return only the first 50 items.
dvr/entry/grid_upcoming
Lists all of the currently-scheduled recordings. See for parameter details, and note the default is to return only the first 50 items.
duplicates Set to 0 to exclude duplicate timers. Default is 1.
The data is derived from the EPG when the timer was scheduled. From version 4.3.1013 the item "disp_extratext" is included to deal with the inconsistent use of "subtitle" and "summary" fields by broadcasters.
The values of start_real and stop_real take into account the recorder padding and warm-up time currently set.
The value of rating_label_uuid points to a current parental rating label record.
dvr/entry/grid_finished
Lists recordings which have completed and which are still in the TVH logs. See for parameter details, and note the default is to return only the first 50 items.
The values of start_real and stop_real take into account the recorder padding and warm-up time currently set - not the values which were set when the recording was made. If this is a segmented recording (a programme split into two or more parts with for example a news bulletin in between) the value of stop_real is the end time of the final segment, while stop is the end time of he first segment.
Because legislation can change over time, the value of rating_label_uuid is blank for finished DVR entries, the 'saved' tags should be used instead.
dvr/entry/grid_failed
Lists failed recordings. See for parameter details.
If you merge the 'failed' and 'completed' recordings into a single list, the only way to tell which list the entries originally came from is by using the status field.
dvr/entry/grid_removed
Lists removed recordings. See for parameter details.
Under some circumstances an unsuccessful recording may appear here rather than under failed recordings. For example when EIT-based accurate recording is being used and the 'running' status is never received.
If TVH is configured to delete the log record when a recording is deleted this function will not return them.
dvr/entry/create
Creates a new timer from a JSON object.
conf The JSON object describing the timer. Items not specified are derived from the default profile of the user. An example of the minimum useful JSON is shown below.
The function returns the uuid of the created timer on success.
It is also possible using this function to add a file created elsewhere into the TVH database as a completed recording. Items needed in the JSON are:
It is important that the start and stop times are in the past, otherwise TVH will try to create a timer to record the event. (Thanks to "ullix tv" for this information.) Also note that the ability to add a pre-recorded file is unintended behaviour - see .
dvr/entry/create_by_event
Creates a new timer using details from the EPG. Input parameters are:
config_uuid this is the uuid parameter from the output of
event_id this is the eventId parameter for the event, taken from
These functions provide the same capability as the Re-record button in Digital Video Recorder -> Finished Recordings. "Allow" sets the recording to be re-done, "deny" cancels a scheduled rerecording, "toggle" reverses the rerecord state.
uuid the uuid of the finished or failed recording, or a JSON object containing an array of uuids.
dvr/entry/stop
Gracefully stops a running recording.
uuid The uuid value from the timer's entry in dvr/entry/grid.
dvr/entry/cancel
Deletes a timer or aborts a running recording.
uuid The uuid value from the timer's entry in dvr/entry/grid.
If the timer is running, the recording is kept on disk but classified as a 'failed' recording.
NOTE To delete a series use , passing parameter uuid from the entry in . As with the UI, deleting a series deletes all pending timers for that series.
These three functions affect the "previously recorded" status of a timer. If set, either directly or via a call to the toggle function, the timer is marked as completed and the file flagged as deleted. If unset, a new timer is created.
These functions provide the same capability as the Previously Recorded button in Digital Video Recorder -> Upcoming/Current Recordings. It can be used to 'hide' re-runs to prevent them being re-recorded.
dvr/entry/remove
Removes a completed recording from storage.
uuid The recording's uuid value from .
dvr/entry/filemoved
Informs TVH that a recording has been relocated (by external means) within the filesystem. Requires ADMIN privilege.
src The original full path to the file
dst The new full path to the file
dvr/entry/move/finished
Move a finished recording entry to the "Finished Recordings" category, presumably from "Failed Recordings". The actual file is not moved.
uuid The uuid of the entry, or an array of entries passed as a JSON object.
dvr/entry/move/failed
Move a finished recording entry to the "Failed Recordings" category, presumably from "Finished Recordings". The actual file is not moved.
uuid The uuid of the entry, or an array of entries passed as a JSON object.
dvr/autorec/class
Lists the text strings, options and defaults used when creating or editing a series timer.
dvr/autorec/grid
Lists autorecs (series timers). See for parameter details.
dvr/autorec/create
Create a new series timer by specifying search parameters. To create a timer using CRIDs use .
conf A JSON object specifying the selection parameters for the timer.
config_uuid The uuid parameter from the output of . Parameter config_name may be passed instead.
dvr/autorec/create_by_series
Creates a new series timer using CRIDs. Input parameters are:
config_uuid The uuid parameter from the output of
event_id The eventId parameter for one event in the series, taken from
NOTE To delete a series use , passing parameter uuid from the entry in . As with the UI, deleting a series deletes all pending timers for that series.
dvr/timerec/class
Lists the text strings, options and defaults used when creating or editing a time-based recording.
dvr/timerec/grid
Lists time-based recordings. See for parameter details.
dvr/timerec/create
Create a new time-based timer.
conf A JSON object specifying the selection parameters for the timer.
A JSON object is returned containing the UUID of the timerec.
{
"entries": [
{
"uuid": "bc85208b236701a63568cb62d5506e08",
"enabled": true,
"create": 1561451356,
"watched": 0,
"start": 1562099400,
"start_extra": 0,
"start_real": 1562099340,
"stop": 1562103000,
"stop_extra": 0,
"stop_real": 1562103000,
"duration": 3600,
"channel": "9a20ebf5ec10a3c49c2c021cc2698ecc",
"channelname": "BBC TWO HD",
"image": "",
"fanart_image": "",
"title": {
"eng": "Inside the Bank of England"
},
"disp_title": "Inside the Bank of England",
"disp_subtitle": "",
"summary": {
"eng": "1/2. Filmed with unprecedented access, this episode goes inside the Bank to show how it prints our cash, ensures our money holds its value and sets the UKs interest rate. [S,AD] [HD]"
},
"disp_summary": "1/2. Filmed with unprecedented access, this episode goes inside the Bank to show how it prints our cash, ensures our money holds its value and sets the UKs interest rate. [S,AD] [HD]",
"description": {
"eng": "1/2. Filmed with unprecedented access, this episode goes inside the Bank to show how it prints our cash, ensures our money holds its value and sets the UKs interest rate. [S,AD] [HD]"
},
"disp_description": "1/2. Filmed with unprecedented access, this episode goes inside the Bank to show how it prints our cash, ensures our money holds its value and sets the UKs interest rate. [S,AD] [HD]",
"disp_extratext": "1/2. Filmed with unprecedented access, this episode goes inside the Bank to show how it prints our cash, ensures our money holds its value and sets the UKs interest rate. [S,AD] [HD]",
"pri": 6,
"retention": 0,
"removal": 0,
"playposition": 0,
"playcount": 0,
"config_name": "4e3a1e13acd2d5a9c129e7b00f6c986e",
"owner": "tvheadend",
"creator": "tvheadend",
"filename": "",
"errorcode": 0,
"errors": 0,
"data_errors": 0,
"dvb_eid": 3842,
"noresched": false,
"norerecord": false,
"fileremoved": 0,
"uri": "crid://fp.bbc.co.uk/m/4586",
"autorec": "24fcfd056fc32b86f0abd9fc6a57d17d",
"autorec_caption": "Inside the Bank of England (Inside the Bank of England - Created from EPG query)",
"timerec": "",
"timerec_caption": "",
"parent": "",
"child": "",
"content_type": 2,
"copyright_year": 0,
"broadcast": 295634,
"episode_disp": "",
"url": "",
"filesize": 0,
"status": "Scheduled for recording",
"sched_status": "scheduled",
"duplicate": 0,
"first_aired": 0,
"comment": "Auto recording: Inside the Bank of England - Created from EPG query",
"category": [],
"credits": {},
"keyword": [],
"genre": [
32
],
"age_rating": 11,
"rating_label_saved": "PG,
"rating_icon_saved": "file:///my/file/location/acma-pg.png",
"rating_country_saved": "AUS",
"rating_authority_saved": "ACMA",
"rating_label_uuid": "a82438515ecc857dbf2509517ff3fe40",
"rating_icon": "imagecache/37",
"rating_label": "PG"
}, ...
],
"total": 4
}
{
"entries": [
{
"uuid": "07ac8ed6d7d8744a4217c7b7005d5d7a",
"enabled": true,
"create": 1581300276,
"watched": 0,
"start": 1581937200,
"start_extra": 0,
"start_real": 1581937110,
"stop": 1581940800,
"stop_extra": 0,
"stop_real": 1581940800,
"duration": 3600,
"channel": "16460c1b17ee679e0fc3cdb851edd294",
"channel_icon": "imagecache/223",
"channelname": "YESTERDAY",
"image": "",
"fanart_image": "",
"title": {
"eng": "Abandoned Engineering"
},
"disp_title": "Abandoned Engineering",
"disp_subtitle": "",
"disp_summary": "",
"description": {
"eng": "Pyramiden Norway: A town with a supernatural atmosphere, a collection of imposing buildings in southern Australia, and the remains of curious-looking basins emerging from the waves. [AD,S]"
},
"disp_description": "Pyramiden Norway: A town with a supernatural atmosphere, a collection of imposing buildings in southern Australia, and the remains of curious-looking basins emerging from the waves. [AD,S]",
"disp_extratext": "Pyramiden Norway: A town with a supernatural atmosphere, a collection of imposing buildings in southern Australia, and the remains of curious-looking basins emerging from the waves. [AD,S]",
"pri": 6,
"retention": 0,
"removal": 0,
"playposition": 0,
"playcount": 0,
"config_name": "1ccca1a328ecdcab3f88640dda5b6209",
"owner": "linvdr",
"creator": "linvdr",
"filename": "/video/tvheadend/Abandoned Engineering-4.ts",
"errorcode": 0,
"errors": 0,
"data_errors": 0,
"dvb_eid": 0,
"noresched": true,
"norerecord": false,
"fileremoved": 0,
"uri": "crid://onid-2/QQK596",
"autorec": "",
"autorec_caption": "",
"timerec": "",
"timerec_caption": "",
"parent": "",
"child": "",
"content_type": 2,
"copyright_year": 0,
"broadcast": 0,
"episode_disp": "",
"url": "dvrfile/07ac8ed6d7d8744a4217c7b7005d5d7a",
"filesize": 997310108,
"status": "Completed OK",
"sched_status": "completed",
"duplicate": 0,
"first_aired": 0,
"comment": "Auto recording: New: Abandoned Engineering - Created from EPG query",
"category": [],
"credits": {},
"keyword": [],
"genre": [],
"age_rating": 13,
"rating_label_saved": "M",
"rating_icon_saved": "file:///my/file/location/acma-m.png",
"rating_country_saved": "AUS",
"rating_authority_saved": "ACMA",
"rating_label_uuid": "",
"rating_icon": "imagecache/35",
"rating_label": "M"
}, ...
"total": 101
}
"total" : 1,
"entries" : [
{
"parent" : "",
"channelname" : "BBC Four HD",
"start" : 1513112400,
"stop_real" : 1513116000,
"description" : {
"eng" : "2/3. Series in which Sam Willis reveals stories of invasion in Britain, including the Barbary Corsaire pirates and the tale of King Louis the Lion, who invaded in the 13th century. [HD] [S]"
},
"comment" : "Auto recording: Created from EPG query",
"disp_title" : "New: Invasion! with Sam Willis",
"child" : "",
"uri" : "crid://fp.bbc.co.uk/247LP4",
"image" : "",
"dvb_eid" : 62795,
"autorec_caption" : " (Created from EPG query)",
"removal" : 0,
"url" : "dvrfile/22d9847b550b8fe9e39e01bda2e41777",
"owner" : "tvheadend",
"copyright_year" : 0,
"playposition" : 0,
"filename" : "/video/tvheadend/New: Invasion! with Sam Willis.ts",
"start_real" : 1513112355,
"start_extra" : 0,
"duration" : 3600,
"category" : [],
"creator" : "tvheadend",
"playcount" : 0,
"sched_status" : "completed",
"status" : "Too many data errors",
"autorec" : "5cf012bf5c78e23d3c89c59c172414cb",
"errors" : 0,
"norerecord" : false,
"broadcast" : 0,
"noresched" : true,
"keyword" : [],
"config_name" : "ffb7136480e16dac47c8e71bd7686537",
"disp_subtitle" : "2/3. Series in which Sam Willis reveals stories of invasion in Britain, including the Barbary Corsaire pirates and the tale of King Louis the Lion, who invaded in the 13th century. [HD] [S]",
"enabled" : true,
"stop_extra" : 0,
"pri" : 6,
"retention" : 0,
"subtitle" : {
"eng" : "2/3. Series in which Sam Willis reveals stories of invasion in Britain, including the Barbary Corsaire pirates and the tale of King Louis the Lion, who invaded in the 13th century. [HD] [S]"
},
"disp_description" : "2/3. Series in which Sam Willis reveals stories of invasion in Britain, including the Barbary Corsaire pirates and the tale of King Louis the Lion, who invaded in the 13th century. [HD] [S]",
"fileremoved" : 0,
"filesize" : 2171129092,
"credits" : {},
"title" : {
"eng" : "New: Invasion! with Sam Willis"
},
"content_type" : 2,
"genre" : [],
"errorcode" : 0,
"stop" : 1513116000,
"channel_icon" : "",
"data_errors" : 510410,
"timerec" : "",
"channel" : "7bd448424af369b19f22511b1ece023c",
"uuid" : "22d9847b550b8fe9e39e01bda2e41777",
"timerec_caption" : "",
"first_aired" : 0,
"duplicate" : 0
}
]
}
These options allow the transcode deinterlace configuration to be fine-tuned. Most notably, the deinterlace filters can now be configured with field-rate deinterlacing, which causes (for example) 25fps interlaced input at a 90kHz timebase to produce 50fps output with a 180kHz timebase.
To maintain MPEG-TS compliance, the output timebase is fixed at 90kHz, and both the adjusted output frame rate (e.g. 50fps) and frame timestamps are rescaled accordingly before encoding. For accuracy, this rescaling is performed dynamically using libav functions such as av_rescale_q(), based on the timebase of the final filter in the AVFilterContext chain and the timebase of the output AVCodecContext. This approach supports fractional frame rates and remains robust against future changes to the filter configuration, including various combinations of deinterlace options.
When field-rate deinterlacing is selected, this produces frames with (for example) correct timing of 50fps playback in a 90kHz container, ensuring that the transcoded output stream preserves the intended cadence and temporal fidelity of the original interlaced source.
(2025-07-21)
Release: (2025-07-20)
move filter_hw_denoise and filter_hw_sharpness to tvh_codec_profile_video
fixes: https://github.com/tvheadend/tvheadend/issues/1818 also fixes a logical define bug: filter_denoise and filter_sharpness should be transferred for all HW accels (not only for VAAPI)
(2025-07-20)
Release: (2025-07-18)
Add Season number and Episode number to file name formatting strings.
(2025-07-18)
Release: (2025-07-17)
Implement age ratings on XMLTV
Update xmltv.c
Apply suggestion from @Copilot
Test for epgdb_processparentallabels to avoid false positives
Add branch in case rating_label exists but system is null
Fallback to rl_display_age before rl_age
Co-Authored-By: Copilot
(2025-07-16)
Release: (2025-07-17)
Add Scene Markers to recordings at scheduled EPG event start/stop times.
(2025-07-17)
Release: (2025-07-16)
Fix builds on debian buster
(2025-07-16)
Release: (2025-07-12)
Fix broken squash-autocomment
(2025-07-11)
Release: (2025-07-05)
Add 'sudo make install' to the Linux build notes.
(2025-07-05)
Release: (2025-07-03)
Cloudsmith supports fedora 42 now
(2025-07-03)
Release: (2025-06-27)
Update coverity secret check to new ENV file
(2025-06-27)
Release: (2025-06-21)
Update online help text
Format Strings used in DVR Profiles cannot be used when creating Autorecs. See Forum issue 9160.
(2025-06-21)
Release: (2025-06-12)
fix memory leak 3 - transcoding
fix memory leak 3 - transcoding
(2025-06-12)
Release: (2025-06-10)
Recognise checkbox for feature proposals properly
(2025-06-10)
Release: (2025-06-10)
User's DVR Configuration profile not used when scheduling recordings via HTSP
(2025-06-10)
Release: (2025-06-10)
remove coded_width and coded_height from encoding
according to AVCodecContext documentation this is only used for decoding, oavctx is used for encoding
(2025-06-10)
Release: (2025-06-09)
Add missing coverity env
(2025-06-09)
Release: (2025-06-09)
Fix coverity builds
(2025-06-09)
Release: (2025-06-06)
repo: cleanup CONTRIBUTING.md
Signed-off-by: Christian Hewitt
(2025-06-06)
Release: (2025-06-06)
intl: js: change freenode to Libera.Chat
Signed-off-by: Christian Hewitt
(2025-06-06)
Release: (2025-06-06)
ci: disable coverity on forks
Signed-off-by: Christian Hewitt
(2025-06-06)
Release: (2025-06-04)
HTSP: Expose is_new flag in EPG event data
This commit adds the is_new flag to the EPG event data sent to HTSP clients. By including this property, clients such as Kodi (with the pvr.hts addon) can now detect whether a broadcast is marked as new and set corresponding flags (e.g. EPG_TAG_FLAG_IS_NEW in Kodi).
This enhances the metadata available to clients and supports improved EPG event handling and display.
A corresponding pull request will also be submitted to the pvr.hts project to make use of this flag when obtaining EPG event guide data from Tvheadend.
(2025-06-04)
Release: (2025-06-04)
Coverity CID 552897
(2025-06-04)
Release: (2025-06-02)
Add API call 'status/activity'.
(2025-06-02)
Release: (2025-06-02)
transcode: gracefully handle common hardware decoder errors
When using VAAPI hardware decoding, certain malformed or corrupt frames at the start of the stream may cause the ffmpeg h/w decoder to emit AVERROR(EIO) or AVERROR(EINVAL) early in the picture decoding phase.
In these cases, libav will log errors such as:
[ ERROR]:libav: AVCodecContext: Failed to upload decode parameters: 18 (invalid parameter). [ ERROR]:libav: AVCodecContext: Failed to end picture decode after error: 18 (invalid parameter). [ ERROR]:libav: AVCodecContext: hardware accelerator failed to decode picture
Currently, Tvheadend treats these errors as fatal, resulting in the transcoder stream being torn down via tvh_stream_stop() and interrupting client playback, typically leaving only audio and a black screen.
(2025-06-02)
Release: (2025-06-02)
fix for video stream detection
PR https://github.com/tvheadend/tvheadend/pull/1772 is not covering all video streams. The proper implementation is to use the macro SCT_ISVIDEO()
Update VAAPI transcoding as recommended by ffmpeg 6.1.1/doc/examples/… (#1792)
Update VAAPI transcoding as recommended by ffmpeg 6.1.1/doc/examples/vaapi_*.c
(2025-05-19)
Release: (2025-05-19)
Add Sub-Title Processing Options for DVB OTA EPG
(2025-05-19)
Release: (2025-05-18)
update audio abuffersink from deprecated channel_layouts to ch_layouts and deprecated FF_PROFILE_* --> AV_PROFILE_*
update audio abuffersink from deprecated channel_layouts to ch_layouts and deprecated FF_PROFILE_* --> AV_PROFILE_*
(2025-05-18)
Release: (2025-05-17)
iptv: handle relative key URL
(2025-05-17)
Release: (2025-05-15)
[Docker]: Tag alpine master as latest
(2025-05-15)
Release: (2025-05-14)
allow NVENC, VAAPI and MMAL to coexist in the same build
allow NVENC, VAAPI and MMAL to coexist in the same build.
give the user the capability for prioritise hw decoder or to match the hw decoder with hw encoder
refactor source code: remove duplicate source code in codec.js
(2025-05-14)
Release: (2025-05-14)
wizard: increase buffer size to silence -Wformat-truncation on GCC 15
GCC 15.1 introduces stricter checks around snprintf-like functions under -Wformat-truncation, even when the format string itself is under developer control. This triggers a false positive in hello_changed() when building with -Werror=format-truncation:
error: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Werror=format-truncation=]
note: output between 1 and 33 bytes into a destination of size 32
This warning is triggered due to a theoretical edge case in tvh_strlcatf()
(2025-05-13)
Release: (2025-05-14)
fix read/write of PT_DYN_INT
PT_DYN_INT should be read and write as int (32 bits)
(2025-05-14)
Release: (2025-05-14)
Show recording file name
(2025-05-14)
Release: (2025-05-13)
Fix crash when updating 'disp_summary'
(2025-05-13)
Release: (2025-05-13)
Global setting for 'Items per page'
(2025-05-13)
Release: (2025-05-13)
lovcombo-all.js: Fix autorec create/edit TypeError with Firefox 134 (#1786)
Firefox 134 added the RegExp.escape() method (https://tc39.es/proposal-regex-escaping/#sec-regexp.escape) with a standards-compliant implementation that throws TypeError if any value other than a String is passed in. This differs from the existing polyfill that simply returns the argument unmodified if it isn't a String. In TVHeadend, the day-of-the-week selector (as used in the Autorec and Timer configuration) uses Integers as keys for options, causing an Integer to get passed to RegExp.escape() on line 300 of lovcombo-all.js. Because of the non-standards- compliant permissive behaviour of the polyfill, this previously didn't cause an issue. However, with Firefox 134 (and an upcoming version of Safari), the added standards-compliant method causes a TypeError to be thrown on every attempt to create or edit a timer or autorec, causing the edit window to not be shown. To solve the issue, pass the response from r.get(this.valueField) through the String() constructor to ensure anything that gets passed in is a String. This has been tested with Firefox and Chrome with both Integer and String keys.
(2025-05-13)
Release: (2025-05-13)
Translation for 'en_US' updated. intl: Translate tvheadend.doc.pot in en_US
100% translated source file: 'tvheadend.doc.pot' on 'en_US'.
(2025-05-13)
Release: (2025-05-13)
Fix Cloudsmith uploads
(2025-05-12)
Release: (2025-05-13)
httpc.c: Fix HTTPS with OpenSSL 3.5 (#1813)
The TLS Client Hello message is larger in OpenSSL 3.5 and will not fit in the previous hc_io_size of 1024 bytes. This causes the TLS Client Hello message to be truncated, resulting in HTTPS requests stalling and eventually timing out. To fix this, increase hc_io_size to 2048 bytes.
(2025-05-13)
Release: (2025-05-13)
Remove links to old Wiki (#1793)
Remove links to old Wiki. Fixes #1660 Also remove references to CIC and CLA, and other content where a more recent version exists on the documentation site.
Remove more obsolete links.
(2025-05-13)
Release: (2024-11-13)
Check for hidden fields before reading them. Fixes #1782.
(2024-11-12)
Release: (2024-10-08)
iptv: allow to limit UDP ports for unicast inputs
(2024-10-08)
Release: (2024-10-08)
Translation for 'en_US' updated. intl: Translate intl/tvheadend.pot in en_US
100% translated source file: 'intl/tvheadend.pot' on 'en_US'.
Remove HTSP client version test for rating labels and string UUIDs
(2024-09-23)
Release: (2024-09-06)
bouquet: fix overzealous channel removals in merged multi-network setup
(2024-09-06)
Release: (2024-09-06)
HTSP: deliver 'comment' with autorecEntry(Add|Update), timerecEntry(Add|Update). Allow setting 'comment' with 'updateDvrEntry'.
(2024-09-06)
Release: (2024-09-06)
Fixup updating comment in _dvr_entry_update. Only overwrite existing title if comment is not NULL. Follows the same logic now as other updates done in this function.
(2024-09-06)
Release: (2024-09-06)
Add country and authority to HTPS messages containing rating labels.
(2024-09-06)
Release: (2024-08-28)
HTSP: Expose DVR configuration id in 'dvrEntryAdd', 'dvrEntryUpdate', 'autorecEntryAdd', 'autorecEntryUpdate', 'timerecEntryAdd', 'timerecEntryUpdate'.
(2024-08-28)
Release: (2024-08-25)
HTSP: Expose broadcast type in 'autorecEntryAdd' and 'autorecEntryUpdate'. Handle broadcast type in 'addAutorecEntry' and 'updateAutorecEntry'.
(2024-08-25)
Release: (2024-08-25)
Fix mapping HTSP field 'broadcastType' to internal field. Must be 'btype'.
(2024-08-25)
Release: (2024-08-24)
Fix FTBFS introduced by 76d8fc8bc5455322558c764c84755ebbba254ad5
Older versions of GCC don't like declaring a variable in the middle of a switch/case and will fail with "error: a label can only be part of a statement and a declaration is not a statement".
(2024-08-24)
Release: (2024-08-23)
fix bug in AAC channel layout configuration tab
fix bug in AAC channel layout configuration tab There are few issues:
first entry in combo should be AUTO (with value 0) - in original code was set to 1 (and overwritten later)
l->nb_channel is not the best way to cycle though layouts available. At the end I think is accessing some region outside of the struct (because I see is lopped also after 7.1). The way I knew how to fix was to add the filter (l->nb_channels < 32). Maybe changing the while to for will be a better option.
(2024-08-23)
Release: (2024-08-23)
HTSP: Expose service provider name with channel information.
(2024-08-22)
Release: (2024-08-22)
Update Fedora versions for cloudsmith uploads
(2024-08-22)
Release: (2024-08-12)
Update linuxdvb_satconf.c - lnb poweroff requires power save
Extend description to make it clear that lnb_poweroff also requires "power save" setting.
(2024-08-12)
Release: (2024-08-12)
update vaapi - vainfo
add enable vainfo detection checkbox in config
defined PT_DYN_INT to load integer field from function
PT_DYN_INT must be paired with dyn_i
(2024-08-12)
Release: (2024-08-10)
Enforce issue templates on GitHub
(2024-08-10)
Release: (2024-08-04)
Replace deprecated channels/channel_layout
(2024-08-04)
Release: (2024-07-21)
Translation for 'en_US' updated. intl: Translate intl/js/tvheadend.js.pot in en_US
100% translated source file: 'intl/js/tvheadend.js.pot' on 'en_US'.
(2024-07-21)
Release: (2024-07-14)
Rework fullscreen request method detection
(2024-07-13)
Release: (2024-07-13)
Add dependency for recent Fedora versions
(2024-07-13)
Release: (2024-06-27)
Remove tvheadend user on purge
This fixes #1722 on my test system.
(2024-06-27)
Release: (2024-06-27)
Refactor null value handling.
(2024-06-27)
Release: (2024-06-25)
Replace deprecated interlaced_frame, top_field_first and key_frame
(2024-06-25)
Release: (2024-06-23)
Remove useless NULL-assignment in http.c
Found by coverity
(2024-06-23)
Release: (2024-06-23)
Fix potential null-pointer dereference in muxer_mkv.c
(2024-06-23)
Release: (2024-06-23)
Remove useless NULL-check in ratinglabels.c
Found by coverity
(2024-06-23)
Release: (2024-06-18)
Use safer htsmsg_add_str2 when copying de->de_directory
de->de_directory may be null. htsmsg_add_str passes str unchecked to underlying strlen function. __strlen_avx2 will segfault if str is null.
htsmsg_add_str2 checks the value of args before passing them to htsmsg_add_str, which should prevent this.
Fixes #1712
(2024-06-18)
Release: (2024-06-15)
XMLTV: Rating Labels: Use 'NONE' when 'system' attribute is missing
(2024-06-15)
Release: (2024-06-07)
Allow setting a custom grace period for LinuxDVB adapters
When using Astrometa to tune to DVB-T2 muxes in Poland, the scans are reported as complete but the found services have zero elementary services due to the scan period being too short in order to fetch PMTs.
This change allows overriding the default grace period of 5 seconds with a custom value. I successfully scanned all services with this setting changed to 15 for this particular adapter/mux combination.
(2024-06-06)
Release: (2024-06-06)
Extend CORS origin help/hover message
Clarify that the value should be a URL, prefixed with http:// or https://, and not "bare" domains, which currently silently fail to save. Fixes (partially) #1700.
(2024-06-06)
Release: (2024-06-06)
dvr: Added missing directory to rerecord-entry
Previously if you had a directory set on a recording and this recording needed to be rerecorded, the directory was not kept in the new entry.
(2024-06-06)
Release: (2024-06-06)
Always compile x265 as PIC
(2024-06-06)
Release: (2024-06-06)
tvhdhomerun: Add ISDB to type check in tvhdhomerun_device_create
This commit adds support for ISDB in the type check of the tvhdhomerun_device_create function in tvhdhomerun.c. This allows the function to handle ISDB type devices, which previously would have been changed to a DVB device on startup every time despite overrides.
(2024-06-05)
Release: (2024-06-05)
Docker/Alpine: Remove USB group
The USB group has been removed from upstream alpine in commit bb00d0e4f345 ("main/alpine-baselayout: remove mem and usb group") which was a fixup on commit f16d0754d601 ("main/alpine-baselayout: remove unused/moved users and groups")
Lets remove it here as well as we cannot join the group any longer.
Besides, device access is probably better managed with host specific udev rules.
Signed-off-by: Olliver Schinagl
(2024-06-05)
Release: (2024-04-26)
Correct M3U playlist logo tag
(2024-04-26)
Release: (2024-04-26)
Fix echo target for superuser file in Debian postinst
aba5e60792177d6a2a867445559f4806973b3258 was causing the username and password to get printed to the console instead of being put in the correct file. Also, use the modern $() syntax instead of `` and quote all variable assignments.
(2024-04-26)
Release: (2024-04-25)
Properly escape json in setup
(2024-04-25)
Release: (2024-04-25)
satip: Ignore additional parameters
Instead or erroring, ignore additional parameters, as required by the specs in 3.5.11 where it says "Unknown attributes shall be ignored by the server"
(2024-04-24)
Release: (2024-04-21)
configure: fix parsing args if values contain "="
Currently, when the value of an option passed to the configure script as argument contains an equal sign "=", the part of the string up to the second equal sign is used as option. This commit changes how the string is split, so that always only the part up to the first equal sign is interpreted as option.
"${var%=}" removes everything from the last equal sign, "${var%%=}" removes everything from the first equal sign.
This allows to pass CFLAGS, which usually contain equal signs, like "--cflags=-march=armv6 -mfloat-abi=hard -mfpu=vfp"
For reference: https://github.com/tvheadend/tvheadend/issues/1665
Signed-off-by: MichaIng
(2024-04-20)
Release: (2024-04-20)
Update WebUI to allow debug/trace subsystem selection from a list.
(2024-04-20)
Release: (2024-04-13)
Add subsystems to JSON API.
(2024-04-13)
Release: (2024-04-08)
Fix detection of unknown version numbers in support/version
Fixes: #1683
(2024-04-08)
Release: (2024-03-24)
webui: Fix year being replaced incorrectly when using custom date format
fixes regression in 2ca8a19
(2024-03-24)
Release: (2024-03-24)
Update manpage
Replace freenode with libera
Change copyright info
(2024-03-24)
Release: (2024-03-22)
Translation for 'pl' updated. intl: Translate intl/docs/tvheadend.doc.pot in pl
100% translated source file: 'intl/docs/tvheadend.doc.pot' on 'pl'.
(2024-03-22)
Release: (2024-03-18)
Translation for 'pl' updated. intl: Translate intl/docs/tvheadend.doc.pot in pl
98% of minimum 80% translated source file: 'intl/docs/tvheadend.doc.pot' on 'pl'.
Sync of partially translated files: untranslated content is included with an empty translation or source language content depending on file format
(2024-03-18)
Release: (2024-03-14)
Update README.md
Existing (page not found) : https://cloudsmith.io/tvheadend/tvheadend
CI: remove NODIRTY option as those builds may be dirty
(2024-03-09)
Release: (2024-03-08)
Revert accidental package renaming
(2024-03-08)
Release: (2024-03-08)
Create special tvheadend-armv6l and tvheadend-dbg-armv6l packages
Fixes: #1665
(2024-03-08)
Release: (2024-03-07)
Translation for 'pl' updated. intl: Translate intl/tvheadend.pot in pl
100% translated source file: 'intl/tvheadend.pot' on 'pl'.
(2024-03-07)
Release: (2024-03-03)
update to libvpx 1.14.0-patch
added patch
(2024-03-03)
Release: (2024-03-01)
ci: added more info logging to cloudsmith.sh
(2024-03-01)
Release: (2024-03-01)
Improve autorec duplicate handling
(2024-03-01)
Release: (2024-03-01)
Translation for 'pl' updated. intl: Translate intl/js/tvheadend.js.pot in pl
100% translated source file: 'intl/js/tvheadend.js.pot' on 'pl'.
(2024-03-01)
Release: (2024-02-24)
Replace broken links, update copyright year
(2024-02-23)
Release: (2024-02-23)
Translation for 'pl' updated. intl: Translate intl/tvheadend.pot in pl
100% translated source file: 'intl/tvheadend.pot' on 'pl'.
(2024-02-23)
Release: (2024-02-22)
Run enforce-pr-rebase whenever a PR is updated
(2024-02-21)
Release: (2024-02-22)
Translation for '(#1655)' updated. transifex: Updates for project Tvheadend and language pl (#1655)
intl: Translate intl/js/tvheadend.js.pot in pl
100% translated source file: 'intl/js/tvheadend.js.pot' on 'pl'.
intl: Translate intl/tvheadend.pot in pl
100% translated source file: 'intl/tvheadend.pot' on 'pl'.
(2024-02-22)
Release: (2024-02-22)
Give comment-on-labels.yml permissions to write to PRs
(2024-02-22)
Release: (2024-02-22)
Add OpenCollective donate link to Wizard
(2024-02-22)
Release: (2024-02-21)
Make sure we spawn the best matching executable and not the first match
Fixes: #1632
(2024-02-21)
Release: (2024-02-21)
Replace poison memset by memset_s to avoid compiler optimising it out
(2024-02-20)
Release: (2024-02-21)
Translation for 'pl' updated. intl: Translate intl/tvheadend.pot in pl
100% translated source file: 'intl/tvheadend.pot' on 'pl'.
(2024-02-20)
Release: (2024-02-21)
ci: change CLOUDSMITH_OWNER from a var to a secret
(2024-02-21)
Release: (2024-02-21)
Fix Auto-PR comment on squash-label
(2024-02-21)
Release: (2024-02-20)
Add some ERRNOs for DVR & Config
(2024-02-20)
Release: (2024-02-20)
Add missing tvheadend-prefix in JS file
Fixes 2ca8a19e4c8761af1a6653fed09af658e9cd5b67
(2024-02-19)
Release: (2024-02-20)
Show SeriesLink for AutoRecs
(2024-02-20)
Release: (2024-02-20)
Shorten time for stale issues before a warning is applied
(2024-02-19)
Release: (2024-02-19)
Add missing htmsg_destroy() call in hdhomerun_server_discover
(2024-02-19)
Release: (2024-02-19)
Add support for 12-hour custom date formats
(2024-02-19)
Release: (2024-02-19)
Replace single-bit signed integers with unsigned integers
Single bit signed integers contain a single sign-byte and zero value bytes according to the C99 standard. This is not intended here.
(2024-02-19)
Release: (2024-02-12)
CI: Ensure we clone the whole repo
We have to make sure we clone the whole repo, so that git describe works as expected. Without it, we get version 0.0.0, not what we want.
Signed-off-by: Olliver Schinagl
(2024-02-11)
Release: (2024-02-10)
container: Add container support
This commit adds support for containerisation of TVHeadend. It adds the actual technology agnostic container file, an entry point and healthcheck for it and a github workflow component to publish it.
TODO: Healthcheck script is not yet working. TODO: Add decent documentation
Signed-off-by: Olliver Schinagl
(2024-02-10)
Release: (2024-02-10)
transcoding: access the codec name only when codec pointer is valid
this fixes #1635
(2024-02-09)
Release: (2024-02-08)
dvr: Fix incorrect usage of strerror
strerror takes the errno directly as its argument, negating it will result in an "Unknown error".
Signed-off-by: Tianyi Liu
(2024-02-08)
Release: (2024-02-07)
Add "recordings" to the backup exclude list
Since https://github.com/tvheadend/tvheadend/pull/1540, enabled by https://github.com/tvheadend/tvheadend/pull/1535 and https://github.com/tvheadend/tvheadend/pull/1538, we have been storing the recordings in a subdirectory of the configuration directory by default. Because of this, the recordings are getting stored in the configuration backup. This causes the backups to take forever and fill the disk (see https://github.com/tvheadend/tvheadend/issues/1625). Instead, exclude the "recordings" directory from the backup to prevent this.
(2024-02-07)
Release: (2024-02-06)
descrambler: Fix Sky-UK descrambling
(2024-02-05)
Release: (2024-02-06)
Correct description of Change Parameters flag
The Change Parameters flag on the Access Entries screen for a user determines whether that user's settings will override any previously-set parameters (for example from a wildcard user) - it does not affect the ability of subsequent users to override settings in turn. The exception is the 'Rights' settings where all matched users with the Change flag set are ORed together.
(2024-02-06)
Release: (2024-02-05)
Translation for 'en_US' updated. transifex: Translate tvheadend.js.pot in en_US
100% translated source file: 'tvheadend.js.pot' on 'en_US'.
(2024-02-05)
Release: (2024-02-04)
Mark PRs needing squashing as stale after a while
(2024-02-03)
Release: (2024-02-04)
Automatically comment on PRs needing squash
(2024-02-03)
Release: (2024-02-04)
satipcli: Rename flag to include client reference
We have both a satip client and server. However the nosatip flag, is for the client. Make this more clear by renaming it to the internal variable nosatipcli. Since we do not want to break the user facing API, we keep the commandline argument nosatip, but add an alias for the future.
We can do better in the future with the rest of the satip reference, but lets keep this to a minimum for now.
Double-quote all variables when assigned or used as arguments
(2024-02-02)
Release: (2024-02-02)
Add stale-bot for issues/PRs needing more info
(2024-02-02)
Release: (2024-02-02)
main: Warn about unexpected configuration location
When using the --fork flag, and no user or config arguments are supplied, the configuration folder will end up with whatever the default daemon user has set, which is often /sbin set as the homedir.
This is weird, but not 'wrong' per say. Lets warn the user that forking can have an unexpected side effect.
Signed-off-by: Olliver Schinagl
(2024-02-02)
Release: (2024-02-01)
Use sigaction() instead of signal()
The behaviour of signal() is not consistent or defined when using it to set signal handlers (see "Portability" in https://man7.org/linux/man-pages/man2/signal.2.html). Previously we got away with this, but starting with GCC 14, using signal() apparently causes certain syscalls to be restarted after the signal is caught. One of these is the read() currently on line 63 of fsmonitor.c. The result is that read() doesn't return when the fsmonitor thread receives a signal, resulting in the thread never shutting down, resulting in TVHeadend hanging on any attempt to terminate it.
Instead, use sigaction(), which has defined behaviour when setting signal handlers. Since invoking sigaction() requires several lines, a helper was added to tvh_thread.c to avoid code duplication.
(2024-02-01)
Release: (2024-01-31)
Add timeshift support for audio-only channels
(2024-01-31)
Release: (2024-01-31)
templates: add log section to bug_report.yml
Signed-off-by: Christian Hewitt
(2024-01-31)
Release: (2024-01-30)
Add missing Lithuanian string template (#1608)
(2024-01-30)
Release: (2024-01-28)
ci: fix cloudsmith.sh & add to CI workflow
(2024-01-28)
Release: (2024-01-21)
update to ffmpeg 6.1.1
update to ffmpeg 6.1.1
(2024-01-21)
Release: (2024-01-11)
descrambler: apply ICAM update from Chris230291
(2024-01-11)
Release: (2024-01-11)
descrambler: avoid dlopen()
(2024-01-11)
Release: (2024-01-05)
descrambler: support ICAM if detected in libdvbcsa
(2024-01-04)
Release: (2024-01-05)
linuxdvb: add DVB-S2X parameters
(2024-01-05)
Release: (2024-01-01)
ci: fix raspios detection in cloudsmith.sh
Signed-off-by: Christian Hewitt
(2024-01-01)
Release: (2023-12-26)
ci: rename build.yml to reduce confusion
Signed-off-by: Christian Hewitt
(2023-12-26)
Release: (2023-12-18)
Makefile.ffmpeg nvenc update
FFNVCODEC_VER = 11.1.5.0 -> 12.1.14.0
(2023-12-18)
Release: (2023-12-13)
Remove references to Tvheadend Foundation.
(2023-12-13)
Release: (2023-12-13)
Transifex updates for project Tvheadend (#1587)
transifex: Translate tvheadend.js.pot in es
100% translated source file: 'tvheadend.js.pot' on 'es'.
transifex: Translate tvheadend.js.pot in en_GB
100% translated source file: 'tvheadend.js.pot' on 'en_GB'.
(2023-12-13)
Release: (2023-12-11)
tfx: fix URLs in tvheadend/js files
Signed-off-by: Christian Hewitt
(2023-12-11)
Release: (2023-12-06)
ci: remove references to doozer
Signed-off-by: Christian Hewitt
(2023-12-06)
Release: (2023-12-06)
WebUI: Update donation string as a test to Transifex feed
(2023-12-06)
Release: (2023-12-06)
ci: schedule weekly coverity scans
Signed-off-by: Christian Hewitt
(2023-12-06)
Release: (2023-12-06)
ci: add concurrency to the main CI workflows
Signed-off-by: Christian Hewitt
(2023-12-06)
Release: (2023-12-06)
ci: remove the test-compile workflow
Signed-off-by: Christian Hewitt
(2023-12-06)
Release: (2023-12-06)
ci: don't trigger cloudsmith on .github changes
Signed-off-by: Christian Hewitt
(2023-12-06)
Release: (2023-12-01)
ci update build config
(2023-12-01)
Release: (2023-12-01)
gitignore: add debian/.debhelper folder
(2023-12-01)
Release: (2023-11-28)
Fix builds on stretch
(2023-11-28)
Release: (2023-11-21)
Add rpi-bookworm to targets
(2023-11-21)
Release: (2023-11-20)
Update ffmpeg to 5.1.4
(2023-11-20)
Release: (2023-10-15)
6310 Set 'okay' default to True
(2023-10-14)
Release: (2023-10-14)
Removed nested function 'appendPidRange' from within function 'tvhdhomerun_frontend_update_pids' and converted it to a normal function 'tvhdhomerun_frontend_update_pids_appendPidRange'.
Nested functions are a non-standard extension to C that may only be supported by the gcc compiler.
(2023-10-14)
Release: (2023-08-12)
support/mkbundle: switch from distutils to setuptools
Fixes build error with python-3.12:
Traceback (most recent call last): File "support/mkbundle", line 48, in import distutils.spawn ModuleNotFoundError: No module named 'distutils'
Signed-off-by: Bernd Kuhls
(2023-08-11)
Release: (2023-08-12)
webui/dvr: Add age_rating in recording details dialogs
The details dialogs in the various recording tabs do not open anymore with the error Uncaught TypeError: params[25] is undefined in the JS console as the age_rating wasn't requested for those, only for the overview columns.
While we are at it lets also display the value in the same way the similar looking (but completely different implemented…) EPG dialog does.
As %li isn't supported equally, we must ensure we always use PRItime_t.
Signed-off-by: Olliver Schinagl
(2023-08-06)
Release: (2023-08-02)
Add 'age rating' field to recording metadata
(2023-08-02)
Release: (2023-07-30)
Fix time for 32bit systems again
In issue #6257 an issue mentioning that time_t isn't properly supported when printing on 32-bit systems, specifically on FreeBSD. However, intel 32-bit systems suffer from a similar fate:
src/rtsp.c:333:30: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'time_t' {aka 'long long int'} [-Werror=format=] 333 | snprintf(buf, sizeof(buf), "npt=%" PRItime_t "-", position); | ^~~~~~~ ~~~~~~~~ | | | time_t {aka long long int}
In commit 76a6263f1be4 ("fix for 64bit time_t on 32bit systems") was attempted to be fixed by turning it into a PRId64, which was reverted again in commit 9e1eb89be731 ("Revert "fix for 64bit time_t on 32bit systems""), sadly without a reason as to why in the commit message.
We should however, migrate to 64bit timestamps on all platforms anyway, due to the Y2038 problem. Debian is heavily working on this issue too.
This commit is just the first step, in that we ensure our time_t is always 64bits.
(2023-07-30)
Release: (2023-07-30)
OTA Genre translation squashed v2
(2023-07-30)
Release: (2023-07-19)
Bug Fix: OTA EIT Parental Rating
(2023-07-19)
Release: (2023-06-23)
Fix spelling errors encountered during previous work
(2023-06-23)
Release: (2023-04-17)
update to ffmpeg 5.1.3
update to ffmpeg 5.1.3
(2023-04-17)
Release: (2023-04-02)
tvhmeta: Fix tvhmeta authentication to the tvheadend API.
Construct and add an Authorisation header to the request, when a username and password are provided to tvhmeta.
This fixes #6260.
(2023-04-02)
While this behaviour is somewhat tolerable during live TV viewing—where the user can manually resolve the issue by changing channels—it is significantly more disruptive in recording scenarios, as it results in recordings containing only audio and no video.
However, when the same streams are run directly through FFmpeg’s CLI, FFmpeg does not abort on these errors — it logs them and continues transcoding. This makes FFmpeg's failure handling more robust than Tvheadend's.
To identify which errors should be considered recoverable, the transcoder was instrumented to log the exact AVERROR codes encountered during decoding failures. A stress test was then run using a channel-hopping script that switched channels every 5 seconds over several hours. The failure rate was approximately 1%, and in all cases, the decoding failures were either AVERROR(EIO) or AVERROR(EINVAL). Allowing the stream to continue after these specific errors proved effective — playback resumed, and only a minor picture glitch was visible at the affected frame, with no need to tear down the video stream.
This patch updates tvh_context_decode() to include AVERROR(EIO) and AVERROR(EINVAL) in the list of tolerated decode errors, aligning Tvheadend's behaviour with FFmpeg’s more forgiving approach.
FFmpeg’s internal decoder logic in vaapi_h264.c and decode.c supports this tolerance model. For example, in decode_simple_internal() and submit_frame(), errors like EIO may occur during av_hwframe_transfer_data() or vaEndPicture(), but are not considered fatal. Instead, FFmpeg logs the issue and decoding continues on the next frame.
where combining strings like
"en,fr,de"
could approach the buffer limit of 32 bytes. While truncation is unlikely in practice, the warning is still emitted aggressively by the new FORTIFY logic.
Increase the buffer from 32 to 64 bytes to silence the warning and ensure headroom. This avoids having to disable the diagnostic, while still keeping the logic and usage intact. This is a defensive fix with no behavioural change, and aligns with similar mitigations used in other projects facing the same issue with GCC >= 13 and especially 15+.
The next steps would be to use difftime where possible instead of subtractions, and ensure all stored timestamps have room for 64bit time_t (htsmsg_get_u32_or_default for example breaks this presumption already).
To keep this issue small, and tackle one problem at a time, lets just fix time_t first. We do still have 15 years to fix the other issues.
Note, that this patch leaves out FreeBSD specifics, as it is unclear what is specific about 32bit FreeBSD. It should be using the same glibc headers after all. If not, we can always add if needed, but adding useless code doesn't help anyone generally.
video hw accel should only be applied for video streams ()
Update VAAPI transcoding as recommended by ffmpeg 6.1.1/doc/examples/… (#1792) ()
Add Sub-Title Processing Options for DVB OTA EPG ()
update audio abuffersink from deprecated channel_layouts to ch_layouts and deprecated FF_PROFILE_* --> AV_PROFILE_* ()
iptv: handle relative key URL ()
[Docker]: Tag alpine master as latest ()
Show recording file name ()
fix read/write of PT_DYN_INT ()
httpc.c: Fix HTTPS with OpenSSL 3.5 (#1813) ()
Global setting for 'Items per page' ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'en_GB' updated. ()
Translation for 'en_US' updated. ()
Fix crash when updating 'disp_summary' ()
Fix CI Builds 2/2 ()
Fix Cloudsmith uploads ()
Check for hidden fields before reading them. Fixes #1782. ()
iptv: allow to limit UDP ports for unicast inputs ()
Translation for 'en_GB' updated. ()
Translation for 'en_US' updated. ()
update libvpx v.1.14.1 ()
Fix - Audio transcoding not working #1663 ()
fixes #1733 ()
Remove HTSP client version test for rating labels and string UUIDs ()
Add full UUID to channel, chTag and dvrEntry. ()
Add country and authority to HTPS messages containing rating labels. ()
HTSP: deliver 'comment' with autorecEntry(Add|Update), timerecEntry(Add|Update). Allow setting 'comment' with 'updateDvrEntry'. ()
Fixup updating comment in _dvr_entry_update. Only overwrite existing title if comment is not NULL. Follows the same logic now as other updates done in this function. ()
bouquet: fix overzealous channel removals in merged multi-network setup ()
HTSP: Expose DVR configuration id in 'dvrEntryAdd', 'dvrEntryUpdate', 'autorecEntryAdd', 'autorecEntryUpdate', 'timerecEntryAdd', 'timerecEntryUpdate'. ()
HTSP: Expose broadcast type in 'autorecEntryAdd' and 'autorecEntryUpdate'. Handle broadcast type in 'addAutorecEntry' and 'updateAutorecEntry'. ()
Fix mapping HTSP field 'broadcastType' to internal field. Must be 'btype'. ()
Fix FTBFS introduced by 76d8fc8bc5455322558c764c84755ebbba254ad5 ()
Update Fedora versions for cloudsmith uploads ()
HTSP: Expose service provider name with channel information. ()
Update linuxdvb_satconf.c - lnb poweroff requires power save ()
Enforce issue templates on GitHub ()
Fix function passed to avio_alloc_context() (ffmpeg 7) ()
Replace deprecated channels/channel_layout ()
Translation for 'en_GB' updated. ()
Translation for 'en_US' updated. ()
Allow node16 for GitHub Actions ()
Add dependency for recent Fedora versions ()
Rework fullscreen request method detection ()
Refactor null value handling. ()
Remove tvheadend user on purge ()
Replace deprecated av_init_packet() ()
Replace deprecated interlaced_frame, top_field_first and key_frame ()
Remove useless NULL-assignment in http.c ()
Fix potential null-pointer dereference in muxer_mkv.c ()
Remove useless NULL-check in ratinglabels.c ()
Use safer htsmsg_add_str2 when copying de->de_directory ()
XMLTV: Rating Labels: Use 'NONE' when 'system' attribute is missing ()
dvr: Added missing directory to rerecord-entry ()
Extend CORS origin help/hover message ()
Make builds parallel and add bookworm and ubuntu 24.04 builds ()
Update x265 to 3.6 ()
Add current pcloud cert ()
Update nasm ()
Update libx264 ()
Update libogg and libfdkaac ()
Always compile x265 as PIC ()
tvhdhomerun: Add ISDB to type check in tvhdhomerun_device_create ()
Correct M3U playlist logo tag ()
Fix echo target for superuser file in Debian postinst ()
Properly escape json in setup ()
satip: Ignore additional parameters ()
Update WebUI to allow debug/trace subsystem selection from a list. ()
Add subsystems to JSON API. ()
Fix detection of unknown version numbers in support/version ()
webui: Fix year being replaced incorrectly when using custom date format ()
Update manpage ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Update README.md ()
CI: remove NODIRTY option as those builds may be dirty ()
Create special tvheadend-armv6l and tvheadend-dbg-armv6l packages ()
Improve armv6l-packages and remove various outdated references/commands ()
Revert accidental package renaming ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
update to libvpx 1.14.0-patch ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
ci: added more info logging to cloudsmith.sh ()
Improve autorec duplicate handling ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Replace broken links, update copyright year ()
Add OpenCollective donate link to Wizard ()
Give comment-on-labels.yml permissions to write to PRs ()
ci: change CLOUDSMITH_OWNER from a var to a secret ()
Make sure we spawn the best matching executable and not the first match ()
Fix Auto-PR comment on squash-label ()
Run enforce-pr-rebase whenever a PR is updated ()
Add some ERRNOs for DVR & Config ()
Show SeriesLink for AutoRecs ()
Replace poison memset by memset_s to avoid compiler optimising it out ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
ci: Enforce rebasing PRs before merging ()
Replace single-bit signed integers with unsigned integers ()
Add missing htmsg_destroy() call in hdhomerun_server_discover ()
Add support for 12-hour custom date formats ()
Add missing tvheadend-prefix in JS file ()
Shorten time for stale issues before a warning is applied ()
ci: Use correct version of merge commit block action ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Remove broken codeball ()
Add automatic labels to PRs ()
docs: Fix broken Readme.md badge for builds ()
ci: Block merge or autosquash commits in PRs ()
intl: update translation templates from code ()
ci: use CURL for cloudsmith.sh and enable RPM upload ()
CI: Ensure we clone the whole repo ()
transcoding: access the codec name only when codec pointer is valid ()
dvr: Fix incorrect usage of strerror (
Correct description of Change Parameters flag ()
Translation for 'pt' updated. ()
Translation for 'pt' updated. ()
Translation for 'pt' updated. ()
Translation for 'pt' updated. ()
Translation for 'pt' updated. ()
Translation for 'pt' updated. ()
Translation for 'en_US' updated. ()
descrambler: Fix Sky-UK descrambling ()
Sanitise filename in content-disposition header ()
Fix audio-only timeshift memory usage ()
Automatically comment on PRs needing squash ()
Mark PRs needing squashing as stale after a while ()
Remove sweep-ai again as it is not useful at all ()
Add stale-bot for issues/PRs needing more info ()
Configure Sweep (#1612) ()
templates: add log section to bug_report.yml ()
Add timeshift support for audio-only channels ()
Add missing Lithuanian string template (#1608) ()
ci: fix cloudsmith.sh & add to CI workflow ()
src: filesystem permission fixes ()
ci: fix broken cloudsmith python ()
templates: add config.yml ()
templates: add bug_report.yml ()
templates: add feature_proposal.yml ()
ci: fix cloudsmith for python3.5 ()
update to ffmpeg 6.1.1 ()
descrambler: avoid dlopen() ()
descrambler: apply ICAM update from Chris230291 ()
linuxdvb: add DVB-S2X parameters ()
descrambler: support ICAM if detected in libdvbcsa ()
ci: fix raspios detection in cloudsmith.sh ()
ci: rename build.yml to reduce confusion ()
Makefile.ffmpeg nvenc update ()
Remove references to Tvheadend Foundation. ()
tfx: fix URLs in tvheadend/c files ()
tfx: fix URLs in tvheadend/docs files ()
tfx: fix URLs in tvheadend/js files ()
webui: change donation button to opencollective ()
webui: remove old doc references to paypal ()
github: add FUNDING.yml with OpenCollective link ()
Update copyright year and correct current surname ()
hdhomerun: Add HDHomeRun server support for LiveTV only (#4461) ()
ci: don't trigger cloudsmith on .github changes ()
ci: remove references to travis ()
ci: remove references to doozer ()
ci: add concurrency to the main CI workflows ()
ci: schedule weekly coverity scans ()
ci: remove the test-compile workflow ()
WebUI: Update donation string as a test to Transifex feed ()
Add Parental Rating Labels ()
ci update build config ()
gitignore: add debian/.debhelper folder ()
update ffmpeg to 6.0.1 ()
update x264 to c196240 ()
update libvpx to 1.13.1 ()
Fix builds on stretch ()
Add rpi-bookworm to targets ()
Update ffmpeg to 5.1.4 ()
Correct handling of Remove and Ignore settings ()
Removed nested function 'appendPidRange' from within function 'tvhdhomerun_frontend_update_pids' ()
6310 Set 'okay' default to True ()
Fix htsstr_argsplit (treat quotes inside an argument correctly) ()
support/mkbundle: switch from distutils to setuptools ()
Fix bug #6293 – Missing EIT EPG Content Type ()
Fix some build and add more targets ()
otamux: Make sure we use PRItime_t ()
CI: Run the full build with cloudsmith only on master ()
Add 'age rating' field to recording metadata ()
OTA Genre translation squashed v2 ()
Bug Fix: OTA EIT Parental Rating ()
Revert non-portable function to previous code ()
Fix configuration-loading logic to account for forking operation ()
Fix spelling errors encountered during previous work ()
Fix portability: Do not use linux/limits.h ()
config: Deal with configuration before anything else ()
Fix Fedora CI build ()
Disable broken codeball ()
Update config for Fedora 37/38 ()
Add Fedora RPM build to Github Actions ()
dvr_rec: Fix a buffer overflow in filename generation ()
update to ffmpeg 5.1.3 ()
tv_meta_tvdb.py: Fix 'language' typo. ()
Remove references to CLA which is no longer available ()
tvhmeta: Fix tvhmeta authentication to the tvheadend API. ()
updated 'AVCodec' to 'const AVCodec' ()
remove deprecate struct vaapi_context and the vaapi.h ()
allow NVENC, VAAPI and MMAL to coexist in the same build (
httpc.c: Fix HTTPS with OpenSSL 3.5 (#1813) ()
Global setting for 'Items per page' ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'en_GB' updated. ()
Translation for 'en_US' updated. ()
Fix crash when updating 'disp_summary' ()
Fix CI Builds 2/2 ()
Fix Cloudsmith uploads ()
Check for hidden fields before reading them. Fixes #1782. ()
iptv: allow to limit UDP ports for unicast inputs ()
Translation for 'en_GB' updated. ()
Translation for 'en_US' updated. ()
update libvpx v.1.14.1 ()
Fix - Audio transcoding not working #1663 ()
fixes #1733 ()
Remove HTSP client version test for rating labels and string UUIDs ()
Add full UUID to channel, chTag and dvrEntry. ()
Add country and authority to HTPS messages containing rating labels. ()
HTSP: deliver 'comment' with autorecEntry(Add|Update), timerecEntry(Add|Update). Allow setting 'comment' with 'updateDvrEntry'. ()
Fixup updating comment in _dvr_entry_update. Only overwrite existing title if comment is not NULL. Follows the same logic now as other updates done in this function. ()
bouquet: fix overzealous channel removals in merged multi-network setup ()
HTSP: Expose DVR configuration id in 'dvrEntryAdd', 'dvrEntryUpdate', 'autorecEntryAdd', 'autorecEntryUpdate', 'timerecEntryAdd', 'timerecEntryUpdate'. ()
HTSP: Expose broadcast type in 'autorecEntryAdd' and 'autorecEntryUpdate'. Handle broadcast type in 'addAutorecEntry' and 'updateAutorecEntry'. ()
Fix mapping HTSP field 'broadcastType' to internal field. Must be 'btype'. ()
Fix FTBFS introduced by 76d8fc8bc5455322558c764c84755ebbba254ad5 ()
Update Fedora versions for cloudsmith uploads ()
HTSP: Expose service provider name with channel information. ()
Update linuxdvb_satconf.c - lnb poweroff requires power save ()
(2024-08-10)
Enforce issue templates on GitHub ()
(2024-08-04)
Fix function passed to avio_alloc_context() (ffmpeg 7) ()
Replace deprecated channels/channel_layout ()
(2024-07-21)
Translation for 'en_GB' updated. ()
Translation for 'en_US' updated. ()
(2024-07-14)
(2024-07-13)
Allow node16 for GitHub Actions ()
Add dependency for recent Fedora versions ()
Rework fullscreen request method detection ()
(2024-06-27)
(2024-06-27)
Refactor null value handling. ()
Remove tvheadend user on purge ()
(2024-06-25)
Replace deprecated av_init_packet() ()
Replace deprecated interlaced_frame, top_field_first and key_frame ()
(2024-06-23)
(2024-06-23)
(2024-06-23)
Remove useless NULL-assignment in http.c ()
Fix potential null-pointer dereference in muxer_mkv.c ()
Remove useless NULL-check in ratinglabels.c ()
(2024-06-18)
Use safer htsmsg_add_str2 when copying de->de_directory ()
(2024-06-15)
XMLTV: Rating Labels: Use 'NONE' when 'system' attribute is missing ()
(2024-06-07)
(2024-06-06)
(2024-06-06)
(2024-06-06)
(2024-06-06)
dvr: Added missing directory to rerecord-entry ()
Extend CORS origin help/hover message ()
Make builds parallel and add bookworm and ubuntu 24.04 builds ()
Update x265 to 3.6 ()
Add current pcloud cert ()
Update nasm ()
Update libx264 ()
Update libogg and libfdkaac ()
Always compile x265 as PIC ()
(2024-06-05)
tvhdhomerun: Add ISDB to type check in tvhdhomerun_device_create ()
(2024-04-26)
(2024-04-26)
Correct M3U playlist logo tag ()
Fix echo target for superuser file in Debian postinst ()
(2024-04-25)
(2024-04-25)
Properly escape json in setup ()
satip: Ignore additional parameters ()
(2024-04-21)
(2024-04-20)
Update WebUI to allow debug/trace subsystem selection from a list. ()
(2024-04-13)
Add subsystems to JSON API. ()
(2024-04-08)
Fix detection of unknown version numbers in support/version ()
(2024-03-24)
(2024-03-24)
webui: Fix year being replaced incorrectly when using custom date format ()
Update manpage ()
(2024-03-22)
Translation for 'pl' updated. ()
(2024-03-18)
Translation for 'pl' updated. ()
(2024-03-14)
Update README.md ()
(2024-03-09)
CI: remove NODIRTY option as those builds may be dirty ()
(2024-03-08)
(2024-03-08)
Create special tvheadend-armv6l and tvheadend-dbg-armv6l packages ()
Improve armv6l-packages and remove various outdated references/commands ()
Revert accidental package renaming ()
(2024-03-07)
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
(2024-03-03)
update to libvpx 1.14.0-patch ()
(2024-03-01)
(2024-03-01)
(2024-03-01)
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
ci: added more info logging to cloudsmith.sh ()
Improve autorec duplicate handling ()
(2024-02-24)
(2024-02-23)
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Replace broken links, update copyright year ()
(2024-02-22)
(2024-02-22)
(2024-02-22)
(2024-02-22)
Add OpenCollective donate link to Wizard ()
Give comment-on-labels.yml permissions to write to PRs ()
(2024-02-21)
(2024-02-21)
(2024-02-21)
(2024-02-21)
(2024-02-21)
ci: change CLOUDSMITH_OWNER from a var to a secret ()
Make sure we spawn the best matching executable and not the first match ()
Fix Auto-PR comment on squash-label ()
Run enforce-pr-rebase whenever a PR is updated ()
(2024-02-20)
(2024-02-20)
(2024-02-20)
(2024-02-20)
Add some ERRNOs for DVR & Config ()
Show SeriesLink for AutoRecs ()
Replace poison memset by memset_s to avoid compiler optimising it out ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
(2024-02-19)
(2024-02-19)
(2024-02-19)
ci: Enforce rebasing PRs before merging ()
Replace single-bit signed integers with unsigned integers ()
Add missing htmsg_destroy() call in hdhomerun_server_discover ()
Add support for 12-hour custom date formats ()
Add missing tvheadend-prefix in JS file ()
Shorten time for stale issues before a warning is applied ()
ci: Use correct version of merge commit block action ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Translation for 'pl' updated. ()
Remove broken codeball ()
Add automatic labels to PRs ()
docs: Fix broken Readme.md badge for builds ()
ci: Block merge or autosquash commits in PRs ()
intl: update translation templates from code ()
ci: use CURL for cloudsmith.sh and enable RPM upload ()
(2024-02-12)
CI: Ensure we clone the whole repo ()
(2024-02-10)
(2024-02-10)
transcoding: access the codec name only when codec pointer is valid ()
(2024-02-08)
dvr: Fix incorrect usage of strerror (
(2024-02-07)
(2024-02-06)
(2024-02-06)
Correct description of Change Parameters flag ()
(2024-02-05)
Translation for 'pt' updated. ()
Translation for 'pt' updated. ()
Translation for 'pt' updated. ()
Translation for 'pt' updated. ()
Translation for 'pt' updated. ()
Translation for 'pt' updated. ()
Translation for 'en_US' updated. ()
descrambler: Fix Sky-UK descrambling ()
(2024-02-04)
(2024-02-04)
(2024-02-04)
(2024-02-04)
(2024-02-04)
(2024-02-03)
Sanitise filename in content-disposition header ()
Fix audio-only timeshift memory usage ()
Automatically comment on PRs needing squash ()
Mark PRs needing squashing as stale after a while ()
Remove sweep-ai again as it is not useful at all ()
(2024-02-02)
(2024-02-02)
(2024-02-02)
(2024-02-02)
Add stale-bot for issues/PRs needing more info ()
Configure Sweep (#1612) ()
(2024-02-01)
(2024-01-31)
(2024-01-31)
templates: add log section to bug_report.yml ()
Add timeshift support for audio-only channels ()
(2024-01-30)
Add missing Lithuanian string template (#1608) ()
(2024-01-28)
ci: fix cloudsmith.sh & add to CI workflow ()
src: filesystem permission fixes ()
ci: fix broken cloudsmith python ()
templates: add config.yml ()
templates: add bug_report.yml ()
templates: add feature_proposal.yml ()
ci: fix cloudsmith for python3.5 ()
(2024-01-21)
update to ffmpeg 6.1.1 ()
(2024-01-11)
(2024-01-11)
descrambler: avoid dlopen() ()
descrambler: apply ICAM update from Chris230291 ()
(2024-01-05)
(2024-01-05)
linuxdvb: add DVB-S2X parameters ()
descrambler: support ICAM if detected in libdvbcsa ()
(2024-01-01)
ci: fix raspios detection in cloudsmith.sh ()
(2023-12-26)
ci: rename build.yml to reduce confusion ()
(2023-12-18)
Makefile.ffmpeg nvenc update ()
(2023-12-13)
(2023-12-13)
Remove references to Tvheadend Foundation. ()
(2023-12-11)
tfx: fix URLs in tvheadend/c files ()
tfx: fix URLs in tvheadend/docs files ()
tfx: fix URLs in tvheadend/js files ()
webui: change donation button to opencollective ()
webui: remove old doc references to paypal ()
github: add FUNDING.yml with OpenCollective link ()
Update copyright year and correct current surname ()
hdhomerun: Add HDHomeRun server support for LiveTV only (#4461) ()
(2023-12-06)
(2023-12-06)
(2023-12-06)
(2023-12-06)
(2023-12-06)
(2023-12-06)
ci: don't trigger cloudsmith on .github changes ()
ci: remove references to travis ()
ci: remove references to doozer ()
ci: add concurrency to the main CI workflows ()
ci: schedule weekly coverity scans ()
ci: remove the test-compile workflow ()
WebUI: Update donation string as a test to Transifex feed ()
Add Parental Rating Labels ()
(2023-12-01)
(2023-12-01)
ci update build config ()
gitignore: add debian/.debhelper folder ()
update ffmpeg to 6.0.1 ()
update x264 to c196240 ()
update libvpx to 1.13.1 ()
(2023-11-28)
Fix builds on stretch ()
(2023-11-21)
Add rpi-bookworm to targets ()
(2023-11-20)
Update ffmpeg to 5.1.4 ()
Correct handling of Remove and Ignore settings ()
(2023-10-15)
(2023-10-14)
Removed nested function 'appendPidRange' from within function 'tvhdhomerun_frontend_update_pids' ()
6310 Set 'okay' default to True ()
Fix htsstr_argsplit (treat quotes inside an argument correctly) ()
(2023-08-12)
(2023-08-12)
support/mkbundle: switch from distutils to setuptools ()
(2023-08-09)
Fix bug #6293 – Missing EIT EPG Content Type ()
Fix some build and add more targets ()
(2023-08-06)
otamux: Make sure we use PRItime_t ()
CI: Run the full build with cloudsmith only on master ()
(2023-08-02)
Add 'age rating' field to recording metadata ()
(2023-07-30)
(2023-07-30)
OTA Genre translation squashed v2 ()
(2023-07-19)
Bug Fix: OTA EIT Parental Rating ()
Revert non-portable function to previous code ()
(2023-06-23)
Fix configuration-loading logic to account for forking operation ()
Fix spelling errors encountered during previous work ()
Fix portability: Do not use linux/limits.h ()
config: Deal with configuration before anything else ()
Fix Fedora CI build ()
Disable broken codeball ()
Update config for Fedora 37/38 ()
Add Fedora RPM build to Github Actions ()
dvr_rec: Fix a buffer overflow in filename generation ()
(2023-04-17)
update to ffmpeg 5.1.3 ()
tv_meta_tvdb.py: Fix 'language' typo. ()
(2023-04-02)
Remove references to CLA which is no longer available ()
tvhmeta: Fix tvhmeta authentication to the tvheadend API. ()
updated 'AVCodec' to 'const AVCodec' ()
remove deprecate struct vaapi_context and the vaapi.h ()