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.
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 WebSocket for a WebSocket interface to this function.
Downloads a previously-recorded file. Called with the UUID of the recording. Requires appropriate privilege (DVR or streaming).
Flushes the contents of the EPG to disk.
Used by simple.html.
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
.
Outputs an image from the image cache. Requires streaming, recording or web interface privilege.
Used to download help files.
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.
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.
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.
See below for sample output.
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.
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.
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.
$ curl http://192.168.0.1:9981/playlist/auth/tags?auth=8ef7aa08e516060ca4330730c60e00d5b5174920
Used by simple.html.
Used internally for theme selection?
Outputs one of two files describing the SAT>IP server and the services available from it.
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.
Outputs details of encrypted services. Each item contains:
Service ID
CA ID
CA provider ID
Service name
Service type
Service provider name
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.
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.
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.
emm
. Unknown. Default is 0, set to 1 to activate.
User-Agent
. Use unknown.
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.
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.
emm
. Default is 0, set to 1 to activate.
User-Agent
. Use unknown.
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.