Added: RTSP and Live Stream Server: Both are now able to deliver channel logos in the same way as the Web Server with http://[IP]:[Port]/logos/?chid=[ChannelID] or http://[IP]:[Port]/logos/[LogoFilename]
Added: API: /api/timerdelete.html now allows to delete multiple timers at once by specifying a comma-separated list of timer IDs in the id =... parameter.
Added: API: The version element of the /api/version.html XML output provides a new ires attribute. As to future light and demo versions, It specifies restrictions as integer bit field. Currently are defined:
Bit 0 set: Read only / guest mode access.
Bit 1 set: No EPG update available as task.
Bit 2 set: No automatic timer creation available as task.
Added: API: /api/epg.html supports additional parameters:
The channel=... parameter now allows to specify a comma-separated list of EPG Channel IDs, e.g. channel=562954315180093,562954314656614,...
ch=... can be used as alias for channel=...
The new xgrab=filename parameter specifies a grab file that must be located in the config sub-directory of the configuration folder. It provides a list of EPG Channel IDs for which EPG data shall be fetched. The recommended file extension is .grab. The grab file content must comply to the INI format, with [Channels] as section and EPG Channel ID=Channel Name pairs. Such files can be created with XgrabDMS. Example:
562954315180093=Das Erste HD
If the filename specified by the xgrab parameter is empty, the channels for which EPG data shall be fetched can be selected by additional filter parameters (similar to /api/getchannelsxml.html):
None of the following parameters: All channels from the channel list
fav=1 or favonly=1: Only favourites
tvonly=1: Only TV channels
radioonly=1: Only radio channels
epgonly=1: Only channels for which EPG data is available
root=[root name]: Only channels from the channel list root folder with the given name (as UTF-8)
The new xmltv=1 parameter lets the Media Server create XMLTV compliant output. The utc=1 parameter and all search options are supported. All channels specified by a grab file or channels parameter (see above) are written as <channel> element to the XMLTV output, regardless whether EPG data is available for them or not. If no xgrab and no channel parameter is present, the DMS does not write <channel> elements to the XMLTV output.
The new source=x parameter, where x is an integer value, specifies to be excluded EPG data sources with the following flag values: DVB EPG = 1 (Bit 0), MHW EPG = 2 (Bit 1), External EPG = 4 ((Bit 2). The default is 0, which means, all sources are allowed. If more than one source is allowed, external EPG takes priority over MHW over DVB EPG. The source parameter also applies if no channels are specified (neither by a xgrab nor by a channel or ch parameter).
Fix: API: If no channels were specified and EPG data for a channel was available from different sources, /api/epg.html delivered duplicates (e.g. the same program twice from DVB and external EPG data). Now only the first available source that is allowed by the source parameter is considered, with external over MHW over DVB EPG priority. The fix does not take effect in case of TS Stream channels for which both native DVB EPG data and external EPG data with different EPG Channel IDs is available (DVB and hash based).
Added: Channel List Download: A new tweak “Live stream M3U configuration” (→ launch DMSTweaker.bat) allows to specify which additional information shall be included in downloaded M3U files that contain live stream URLs for playing channels. Add the following numbers together for getting the desired set of tags:
1 = add the category to the channel name.
2 = category as group-title tag (only when the category changes).
4 = category as group-title tag for every item.
8 = channel logo URL as tvg-logo tag.
16 = EPG channel ID as tvg-id tag (for XMLTV data).
32 = channel name as tvg-name tag.
64 = channel number as tvg-chno tag.
Previous DMS versions always used 1 (category + channel name). The new default is 0 (channel name only). Example: 2 + 8 + 16 + 32 = 58 adds all tags to M3U items that are usually required for IPTV clients that get the EPG as XMLTV from the Media Server. The tweak applies to M3U channel lists that can be downloaded from the Links page and Media page of the Desktop Web Interface or from the Info page and Live TV section of the Mobile Web Interface (→ swipe a category or channel to the left).
Added: API/Channel List Download: The new URL parameter tags=n, where n is a bit field as integer number, allows to configure the content of downloaded M3U files in the same way as the tweak described above. If specified it overrides the tweak setting and is applicable to the following URLs:
http://[Web Server IP]:[Web Server Port]/channels.m3u
http://[Web Server IP]:[Web Server Port]/transcodedchannels.m3u
http://[Web Server IP]:[Web Server Port]/rtspchannels.m3u
Change: API/Channel List Download: Commas in group-title and tvg-name tags are not removed anymore, particularly for conformity of tvg-name with the <display-name> element of the /api/ epg.html XMLTV output. However, commas are now replaced by blanks in the channel name at the end of EXTINF lines, in order to avoid truncated names in VLC and the Kodi Simple IPTV add-on. The hyphen as separator between category and channel name in case of live stream M3U configuration = 1 has been replaced by a comma, thus enabling category display in the VLC playlist (see here).
Change: API: The EPG search preset ID, used in /api/searchedit.html as id parameter, now refers to a unique and persistent integer ID, not to the list index of search presets anymore. Particularly the user configurable default search preset can be referenced and changed by specifying id=-1 and an empty preset name. Search preset IDs are created in the same way as timer IDs (see below). In the /api/searchlist.html output the ID appears as new attribute of the search element. The change is indicated by the attribute ver=2 (instead of 1) of the searches element.
Added: API: /api/searchlist.html provides a new integer parameter content=n, that specifies what shall be included in the XML output: n= 0 or 1 or missing: The stored search presets are listed without default preset (as before), n=2: only the default preset is listed,. n=3: the default and the stored presets are listed.
Added: API: /api/searchadd.html and /api/searchedit.html provide new boolean parameters that are used for the “record series” function:
(searchadd) recseries=1 removes season/episode information from the search phrase and copies the result to the name and series field, thus saving (DVBViewer-)clients to detect and remove this part of the EPG title when performing the “Record Series” function. However, the name and series field can be set differently if they are specified.
(searchadd) checkdup=1 lets the Media Server check for duplicates and discard a new item if a search preset with the same name and search phrase already exists.
(searchadd/edit) record=1 lets the Media Server immediately create timers for the referenced or to be added search preset, independently from the autorecording property. The server does not respond until the timers creation is completed.
Added: API: /api/timerrestart.html?id=x stops and deletes an ongoing recording that was started by the timer with the given integer ID and immediately restarts it. The function does nothing If the timer is no recording timer or the recording has not been started yet. It is used by the “Delete and Restart” menu items of DVBViewer clients.
Fix: API: If /api/timerlist.html was called right after a recording start, the xml output contained an empty recording path for the corresponding timer, causing timer list synchronization issues in DVBViewer clients.
Added: API: The /api/timerlist.html XML output contains new elements and attributes. They are only present in case of an ongoing recording that was started by the timer:
The new attribute Duration of the Recordstat element indicates the duration of the recording rounded to seconds.
The new element RecID specifies the integer ID of the recording in the recording database.
Added: API: /api/timerlist.html supports new filter parameters that allow to list recording timers selectively. Here is a complete list of all parameters:
utf8=n specifies whether the xml content shall be output as UTF-8. n is an integer with the following meaning: 0 = local ANSI character set, 1 = UTF-8, 2 = UTF-8 including the channel name in the channel ID.
id=n specifies the integer id of a single timer that shall be output (= IntID attribute in the Timer element). By default all timers are listed.
recid=n specifies the integer ID of an ongoing recording for outputting a single timer that created the recording with this ID. The recording ID of a timer is 0 if If no ongoing recording is associated with it.
reconly=1 limits the output to timers that are currently associated with ongoing recordings.
enabledonly=1 limits the output to active timers, that are not disabled.
Added: API: A simple key-value store allows add-ons to use the Media Server for storing settings permanently. Basically /api/store.html works like storing values in an INI file by using the UTF-8 string parameters action, sec (= section), key (or its alias id) and value. The following actions are supported:
action=write: Writes the value specified by &sec=...&key=...&value=... to the store. The default value is an empty string. Please note that add-ons should use unique section names (e.g. GUIDs) in order to avoid naming conflicts.
action=read (default if action is missing): Reads the value specified by &sec=...&key=... and returns it as plain text in the HTTP message body. The parameter &value=... can optionally specify a default value that is returned if the section or key does not exist. If no default is specified the API returns an empty HTTP message body in this case. If &key=... is omitted or empty the Media Server returns the whole section content as key=value pairs separated by CR/LF.
action=delete: Deletes the key specified by &sec=...&key=..., or if key is omitted or empty, the whole section specified by &sec=....
action=updatefile: Writes the current state of the store to the file \config\AddOnStore.xml in the configuration folder, if there are changes. This is done automatically when the Media Server is stopped or sleep mode / hibernate is triggered.
Change: API: In case of /api/getconfigfile.html?file=config\service.xml the Media Server does not deliver the file anymore, but the current state of the settings from memory, thus reflecting changes that have not been saved to disk yet.
Fix: API: In contrast to the Web Interface /api/searchadd.html and /api/searchedit.html did not sort the list of search presets alphabetically after changes.
Added: Streaming / Subtitles: The Media Stream Server and Web Server are now able to deliver SRT subtitle files that are associated with video files. This applies to all /upnp/video/ URLs. For obtaining the SRT file the client must use the same URL, but replace the video file extension (e.g. .mkv) by .srt. Example: /upnp/video/388.mkv → /upnp/video/388.srt. A query part can be omitted. The Media Server preferably delivers the SRT file that carries the same filename as the video file, or if not available, the first found SRT file whose filename begins with the video filename. Example: movie.mkv → movie.srt (first choice) or movie.eng.srt. If no matching SRT file is available the server responds with 404 not found.
Change/Added: API: /api/sideload.html now also allows to download files from recording directories (previously only from media directories) and to specify a file ID for fetching files with the same name, but a different extension. Here is a summary of the parameters that can be used:
video/audio/photo/rec=1 specifies the media type. The default is video.
file=name specifies the UTF-8 name of the file that shall be downloaded. Specifying a path by using backslashes is not allowed. If name contains asterisk characters the API regards it as file mask and enumerates all matching files separated by CR/LF as plain UTF-8 text. *.* means all files in the directory.
dirid=n specifies the directory. n is the integer ID of the media directory. It can be retrieved with ./api/mediafiles.html. Please note that the Media Server does not provide IDs for recording directories so that a recording ID must be used here as substitute. In case of recordings there is no difference between dirid and fileid (see below).
fileid=n specifies the directory where a media file located. n is the integer ID of the media file, as used in the corresponding UPnP URL. It can be retrieved with /api/mediafiles.html as objid, or with /api/recordings.html as recording ID. fileid can be used in the same way as dirid, but additionally allows to specify a file extension as file name (with a dot as first character). In this case the Media Server delivers a file with the name of the specified media file plus the specified extension. Example: /api/sideload.html?rec=1&fileid=10&file=.log downloads the log file belonging to the recording with ID 10. /api/sideload.html?fileid=5&file=.srt fetches the SRT subtitle file belonging to the video file with ID = 5.
download=1 forces browsers to download the file instead of displaying it (e.g. XML files).
Change: API: The EPG Channel ID of the channel associated with timers is now written as additional attribute EPGID of the Channel element to the /api/timerlist.html output.
Change: API: /api/mediafiles.html has been extended particularly for retrieving the sub-directories of a given directory. The extended API is also available as mediafiles2.html that triggers a “not found” error in previous versions that don't support the new content parameter. Here is a summary of the parameters that can be used:
video/audio/photo=1 selects the database. The default is video.
dirid=n selects the directory whose content shall be retrieved, where n is the integer ID of the directory. dirid=1 selects the virtual root directory that contains the (physical) user-specified directories for the media type. The default is -1 (= unspecified). It yields the same result as &dirid=1&content=2&recursive=1, which means all directories including sub-directories are enumerated in the XML output or all files in the M3U output.
content=1/2/3 selects what shall be enumerated in the XML output: 1 = files (default), 2 = directories, 3 = directories and files.
recursive=1 lets the API walk recursively through the sub-directories beginning with the given directory and collect all contained elements depending on the content parameter.
thumbs=1 adds the thumbnail URL to the XML enumeration of files, e.g. <thumb>thumbnails/video/2658235242_SM.jpg</thumb>. In case of video this request also starts the creation of thumbnails if they don't exist yet. Since it is done asynchronously in another (FFmpeg) process thumbnails may not be available immediately. Generally thumbnails should not be assumed as being available.
m3u=1 creates an M3U playlist containing URLs for all files in the given directory. The recursive parameter is supported, the content and thumbs parameters are ignored. The default is XML output.
Added: API: /api/recdelete.html now allows to send multiple recording IDs as comma separated list in order to delete multiple recordings at once, e.g. recid=12,17,3... However, a returned error status code (404 Not Found, 423 Locked, 500 Internal Server Error) only refers to the last failed delete action. The API must be used with single IDs if per-recording information about successful / failed deletion is required.
Added: API: api\tasks.html?action=cancel cancels an ongoing delayed system task (Shutdown, Hibernate, Standby...). Previously this task was only available via api/shutdown.html. Due to their similarity the two APIs have been merged. api/shutdown.html now does exactly the same as api/tasks.html and is deprecated, which means, it may be removed in future versions.
Added: API: api/tasks.html provides a new parameter that enables listing all available internal tasks as XML including the ones that are not visible in the web interfaces: /api/tasks.html?all=1.
Fix: API: /api/getchannelsxml.html did not consider filter parameters (fav, favonly, tvonly, radioonly, epgonly) if the rootsonly or groupsonly parameter were used, but used the corresponding user defined settings (see here).
Change: API: /api/getchannelsxml.html does not merge categories of the same name from the Video and Audio sections of a root folder to one group anymore. This means that a group name may appear twice within a root. Furthermore it does not merge the favorites root with another channel list root of the same name anymore, so that a root name may appear twice. The tvonly, radioonly and epgonly parameters are now considered in the rootsonly and groupsonly output (previously only the fav and favonly parameters). The output creation has been speeded up considerably.
Added: API: /api/searchadd.html and /api/searchedit.html provide a new parameter recradioformat (besides recformat) that specifies the radio recording format. Possible values are 0 (MP2 / MP3 / AAC / AC3 elementary stream) and 1 (transport stream). The recformat parameter now only affects TV recording (previously TV and radio).
Added: API: /api/searchadd.html and /api/searchedit.html provide a new boolean parameter incremoved that corresponds to the new “Include removed recordings” checkbox in the Web Interfaces. It is set to true by default and lets the Media Server optionally check auto-timers against removed recordings that are still present as “disabled” entries in the database (see above).
Added: Tasks: Possibility to create Process Tasks containing SQLite statements that are executed by the Media Server on the recording database either automatically as after-recording task or, if there are no placeholders, manually on the web interface task page (see here). Please note the following points:
Knowledge about the SQLite query language is required! Please use the SQLite Browser for opening SvcDatabase.db3 (located in the Database subdirectory of the configuration folder) and getting insight in the recording database structure. You may also use the database diagrams that are attached here.
The task must be created via Tray Menu → Configure with Admin Rights (launches Media Server Options) → Tasks → New. Enter a (unique) name for the task and SQLite (only that) as filename. Only the Name, Description, Filename and Parameters fields take effect on SQLite tasks. Other settings are ignored.
Enter the to be executed statements in the Parameters field. Placeholders can be used in the usual way (see here). The must not be enclosed in single quotes because the Media Server automatically creates quoted strings when it replaces placeholders. A task that contains placeholders is regarded as after-recording-only task and does not appear on the Tasks Page of the web interface.
Two or more statements must be separated by pipe characters “|” because the editor removes all line breaks when it stores the task. Example: UPDATE recordings SET found=0 | UPDATE recordings SET found=1.
The statements may perform any write or delete operation in the recording database. Reading with SELECT does not make sense in this context. It can be done with /api/sql.html that is “read only”. Please note that wrong statements may erroneously damage the database. Create a backup of the file SvcDatabase.db3 before trying a new task.
For performing case insensitive operation please use the Unicode-capable COLLATE SYSTEMNOCASE (this function is provided by the Media Server during runtime, the SQLite Browser does not know it), not the standard COLLATE NOCASE that only considers ASCII characters.
Exceptions caused by faulty SQLite statements are logged including their reason in the svcdebug.log (see configuration folder).
Added: API: New API for listing/adding/editing/deleting EPG search presets that are shown on the EPG search page of the web interface. Please note that this API requires user rights. With guest rights only listing the presets is allowed.
/api/searchlist.html. Lists the available presets as XML in the same ways as in the file \config\searches.xml. No parameters are required.
/api/searchdelete.html. Deletes a preset referenced by zero based index (id=...) or by name (name=...., case sensitive, UTF-8 coded). Example: searchdelete.html&name=Daily%20News. The Media Server responds with “404 not found” if the index is out of range or a preset with the given name does not exist.
/api/searchedit.html. Changes an already existing preset referenced by zero based index (id=...) or by name (name=....). See above.
/api/searchadd.html. Appends a new search preset to the end of the list.
The following search preset properties are output by the searchlist API and received as URL query parameters from the searchedit and searchadd APIs. Please note that Boolean values are indicated as integers (0 = false, values <> 0 = true). If parameters are missing the previous value or default remains untouched.
SearchPhrase (string): The word or phrase that shall be searched in the EPG data. This parameter is mandatory for the searchadd API and must not be empty.
Name (string): The name of the search preset. If no name is specified on searchadd the search phrase is used as name.
SearchFields (bit field as integer 1..7): Specifies in which parts of the EPG data the search phrase shall be searched. Bit 0 set: Title, Bit 1 set: Short description (subheading), Bit 2 set: Long description. The default is 3 (Bit 0 and 1 set, title and short description).
IgnoreCase (boolean): Specifies whether upper/lowercase are ignored. The default value is -1 (true).
UseRegEx (boolean): Specifies whether the search item shall be regarded as regular expression. The default value is 0 (false).
Days (bit field as integer 1..127): Weekday filter. EPG items starting on excluded days (corresponding bit not set) are ignored. Bit 0: Monday, Bit 1: Tuesday... etc. Bit 6: Sunday. The default is 127 (all days included).
StartDate, EndDate (dd.mm.yyyy or the word today/tomorrow as string): Date filter. EPG items with a start date before the specified start date or after the specified end data are ignored. By default the values are not set (unlimited). “today” or “tomorrow” as date are replaced by today's or tomorrow's date when the preset is used for a search (!) so it always remains “up-to-date”.
StartTime, EndTime (hh:mm as string): Time filter. EPG items with a start time before the specified start time or after the specified end time are ignored. The default values are 00:00 and 23: 59 (unlimited).
DurationMin, DurationMax (minutes as integer): Duration filter. EPG items with a duration less than the minimum duration or more than the maximum duration are ignored. The default values are 0 (unlimited).
Genre (integer): Genre filter. The genre values and their meaning are enumerated in the [content] section of the Media Server language files (e.g. rc_english.lng). Only EPG items with the given Genre are included. The default value is -1 (not specified, all genres accepted).
Channels (comma separated list of 64 bit integers): Channel filter. Specifies the EPG Channel IDs of the channels from which search results are collected. The default is an empty list (all channels).
AutoRecording (boolean): Specifies whether timer recordings are automatically created for the search results. The default is 0 (false).
The following properties only apply if AutoRecording is true:
CheckRecTitle, CheckRecSubTitle (boolean): If true timers are created in disabled state if the title or the short description (the subheading) of an EPG search result equals the corresponding strings of a program that has already been recorded (but is not necessarily present on disk because the comparison refers to the recording history database). The default for both is 0 (false).
CheckTimer (boolean): If true timers are created in disabled state if a timer with the same name (description) already exists. The description of timers created from EPG items is composed of the title and (if present) of the subheading separated by a blank, a hyphen and another blank. The default is 0 (false).
RecordingFolder (string): The complete path of the directory where recordings resulting from auto-timers shall be stored. The default is Auto, letting the Media Server auto-select the folder.
RecNameScheme (string): The file naming scheme for recordings. The default is the naming scheme configured by the user (see Media Server Options → Recordings).
RecFormat (integer): The recording format. Possible values are 0 = audio only elementary stream, 1 = transport stream with the exception of program stream (*.mpg) for MPEG2 video, 2 = always transport stream.
Series (string): This property has no special meaning in the Media Server. It can be used for user-defined UPnP grouping of recordings (see Web Interface → Media Page → Recordings → By Series). All recordings with the same Series string fall in the correspondent category. The default is an empty string (unspecified).
Shutdown (integer): Specifies whether and how the PC shall be shutdown when the recording is finished: 0 = no action, 1 = power off, 2 = sleep mode, 3 = hibernate. The default is 0 (no action).
AfterProcessAction (string): Specifies which After Recording Task shall be performed when the recording is done. It can be one of the actions enumerated by /api/tasks.html with task type = 2. The default is an empty string (no task).
EPGBefore, EPGAfter (minutes as integer): Specify the lead and follow-up time that is automatically added to the start end end time of timers. The default are the values specified by the user on Media Server Options → Recordings.
MonitorPDC (boolean): Specifies whether the start time of a timer shall be adjusted if the start time of the corresponding EPG item changes. Only takes effect if the broadcaster provides PDC (Program Delivery Control) The default is 0 (false).
MonitorForStart (boolean): Specifies whether the EPG running status shall be monitored for accurate recording. Only takes effect if the broadcaster provides PDC and MonitorPDC is also set to true. The default is 0 (false).
Priority (integer 0..100). Specifies the priority of auto-timers. 0 means low and 100 high priority. The default is 50 (medium priority). Recordings with higher priority may stop recordings with lower priority in case of competing DVB device access.
Added: API: Extensions for /api/mediafiles.html. The new m3u parameter lets the Media Server deliver the list of media files contained in the specified directory as M3U file. Example:
The new recursive parameter lets the Media Server enumerate all files contained in the specified directory and its sub-directories. Additionally directories are listed if they do not contain media files, but only their sub-directories. Examples:
Added: API that allows DVBViewer and other clients to get channel → logo assignments from the server:
If the name and id parameters are both missing or empty the server delivers the current assignment table as plain UTF-8 text. The lines are id=logo filename pairs separated by CR and LF, in the same way as in the file ChannelLogos2.ini. If the channel name is specified the server searches the corresponding channel logo file algorithmically and returns the UTF-8 name. If the EPG Channel ID is specified the server picks the result from its assignment table (faster). If name and ID are specified the server first tries to get the channel logo filename from the assignment table, then in case of failure by algorithmic search and adds the result as new assignment to the table in order to speed up future access. If no logo can be assigned the server returns a hyphen (-). If no logos are available at all the server responds with 404 not found. The logo filename can be used to download the logo with the /logos/[filename] API from the web server. Please note that the logo filename may contain a relative path including backslashes (!) if the file is located in a sub-directory of \Images\Logos\.
Fix: API: /api/epg.html delivered no results in case of TS Stream channels with a native DVB EPG.
Added: API: If /api/tasks.html is requested without parameter the Media Server delivers the whole task list as XML, reflecting how it is displayed on the Task Page of the web interface, but with After Recording Tasks included:
<tasklist> <group name="EPG"> <task type="0"> <name>Start EPG Update</name> <action>EPGStart</action> </task> <task> .... </task> </group> <group> .... </group> .... </tasklist>
The task type has the following meaning: 0 = predefined internal task, 1 = user defined process task, 2 = after recording task (user defined, should only be displayed in UIs allowing to create or edit recording timers).
Action is the command that must be sent to the Media Server for executing the task, e.g. /api/task.html?task=EPGStart. For consistency the API also allows to use /api/task.html?action=....
Added: Transcoded Streaming: New track parameter allowing to specify the audio track in URLs and in the expert settings of the stream configuration window of the desktop web interface. track=0 selects the first available audio track (default), track=1 the second etc.
Please note that specifying a non-existing audio track may let FFmpeg stop and prevent playback altogether. If the number of available tracks is known (usually in recordings and live streams) the Media Server auto-corrects the track to 0 if it exceeds the maximum. A negative track number lets the Media Server include all available audio tracks. Offering an audio track selection is up to the player. This works with TS, WebM and partly with HLS (the Media Server "all audio tracks" output does not comply with the HLS specifications, only some players are able to handle it).
Added: API: /api/epg.html now supports an additional parameter utc=1 that lets the Media Server output all EPG times as UTC instead of local time. Please note that the start=... and end=... parameters must also be specified as UTC in this case!
Added: API: scheme=xxx parameter for /api/timeradd.html and /api/timeredit.html. It sets the file naming scheme for the recording. The character coding is specified by the encoding parameter (as for title, folder and series).
Added: API: Possibility to retrieve the EPG Event ID of a recorded program with /api/recodings.html&eventid=1. The value 0xFFFFFFFF = 4294967295 indicates that no Event ID is available.
Fix: API: If a single channel was requested with /api/getchannelsxml.html (followed by number=..., id=... or epgid=...) that didn't exist the Recording Service delivered the whole channel list. Now the output is an empty <channels> tag.
Added: API: /api/getchannelsxml.html now allows to limit the output to TV channels (tvonly=1), to radio channels (radioonly=1) or to channels for which EPG data is currently available (epgonly=1).
Added: API: Search for an EPG item with a certain Event ID or PDC by using /api/epg.html?channel=[EPGChannelID]&eventid=... or &pdc=. Both require specifying a channel. If an Event ID or PDC is specified other search criteria like time or search items are ignored. Please note that searching for an Event ID will only yield one result (if at all). A PDC search may deliver more than one result in case of split programs, e.g. sport events interrupted by news (see here).
Added: API: Possibility to selectively delete EPG data originating from a certain source with the epgclear API:
The numeric value [Sources] specifies the to be deleted EPG types as flags that can be or'ed (1 = DVB EPG 2 = MHW EPG, 4 = External EPG). If [Sources] is not specified the default is all EPG data (currently 7).
Added: API: Possibility to directly download any file from the media file directories with
where video=1 (default), audio=1 or photo=1 specify the media type, dirid=[ID] a directory ID retrieved with /api/mediafiles.html and file=[filename] the UTF-8 name of the file that shall be delivered. If [filename] is a mask containing a “*” character the API enumerates all matching files separated by CR/LF as plain UTF-8 text. Thus *.* enumerates all files in the directory. Using a slash or backslash as part of the filename for accessing parent- or sub-directories is not allowed.
Added: API: Possibility to get tables from the Media Server databases as XML output by using SQLite queries:
where video=1 (default), audio=1, photo=1 or rec=1 specify the database. The access is restricted to “read only”.
Added: API/Trancoded Streaming (HLS): Two new parameters adjustpts and recfile can be used to control how jumping to a different position on HLS file playback is handled. Details are described in the file transcoding_params_en.txt (see Docs sub-directory of the Media Server installation directory).
Added: API/Transcoded Streaming (TS): Possibility to set up permanent transcoded TS streams that are running independently from client connections and can be accessed by a (theoretically) unlimited number of clients at the same time, but only require a single FFmpeg instance.
The stream is started with
[unique_name] is a user defined identifier (e.g. the channel name). Additionally an ID specifying the media object (channel, file etc) that shall be transcoded is required. Other parameters are optional. The media server uses defaults if they are missing. The stream is stopped by
or by stopping the Recording Service. Clients can access the stream by using the following type of URL
No further parameters are required. Please note that transcoded TS streams set up by a client connection can also be accessed by other clients if the URL contains the same stream ID or if the query string (beginning with a question mark) is identical. Please also note that this does not work with WebM and Flash.
Added/Change: API/Channel List Download: As before downloading the file transcodedchannels.m3u requires specifying a TV preset and/or radio preset by using tvpreset=... and rpreset=... parameters, controlling whether TV and/or radio channels are contained in the list and which format is used. Additional parameters can be used to override the “Show Favorites Additionally / Show Favorites Only” user settings on the Web Interface configuration page that are applied by default. Each switch can be 0 (off) or 1 (on):
fav=0/1: Specifies if the favorites are added at the top of the channel list (if there are any).
favonly=0/1: Specifies if the channel list only contains favorites (if there are any).
Additionally, if the TV and Radio presets are specified by name, the Media Server now uses the iphoneprefs.ini if the name begins with “HLS”, otherwise the ffmpegprefs.ini (containing WebM/Flash/TS presets). If the presets are specified by zero based index, it depends on the user agent. If the Media Server detects Safari or Edge, it assumes that the index refers to HLS presets, otherwise to WebM/Flash/TS presets. However, this can also be controlled by parameter:
hls=0: The index refers to WebM/Flash/TS presets (ffmpegprefs.ini)
hls=1: The index refers to HLS presets (iphoneprefs.ini).
The following example downloads a channel list that only contains TV favorites. The format is HLS, using the second preset in the file iphoneprefs.ini:
Change/Added: API/Channel List Download: By default the Media Server filters the channels.m3u and rtspchannels.m3u download according to the “Show TV/Radio” and “Show Favorites Additionally / Show Favorites Only” user settings on the Web Interface configuration page. The following parameters can be used to override the settings and specify the content. Each switch can be 0 (off) or 1 (on):
fav=0/1: Specifies if the favorites are added at the top of the channel list .
favonly=0/1: Specifies if the channel list only contains favorites.
tv=0/1: Specifies if the list contains TV channels.
radio=0/1: Specifies if the list contains radio channels.
Everything not specified by parameters is up to the user settings. Please note that the favorite switches are ignored if there are no favorites. fav and favonly cannot both be 1 (setting one of them to 1 switches the other one off) and tv and radio cannot both be 0 (setting one of them to 0 switches the other one on) The following example downloads a channel list that only contains TV favorites:
Added: API/RTSP Server: Possibility to configure permanent UDP/RTP unicast and multicast streams (running independently from client access). Please note that this feature requires an extended license that allows for at least 50 Media Server clients at the same time. The streaming is performed by the RTSP server, but the configuration is done by using Web Server URLs that require full (user) access rights so it can be password protected. The URLs may use a channel ID or Sat>IP syntax to specify the data that shall be sent. The following parameters in the URL query part are supported:
ip=... (required) specifies the IPv4 destination address. It may be a multicast IP like 22.214.171.124 or a local network address like 192.168.2.102 for unicast.
port=... (required) specifies the destination port.
nic=... (optional) specifies the IP of the network adapter through which the data shall be sent. By default it is selected by Windows.
ttl=... (optional) specifies the “time to live” as integer number. The default is defined by the “Sat>IP/UPnP Multicast TTL” tweak (usually = 1, see DMSTweaker.bat, which means, the RTP multicast output is only accessible in the same subnet).
rtcp=1 (optional) lets the Media Server set up a Sat>IP multicast session. An additional RTCP announcement stream carrying Sat>IP information like signal quality is sent to the subsequent destination port.
Here are two configuration examples, the first one using a channel id for starting multicast, the second one using Sat>IP syntax (incomplete) for unicast:
PAT and PMT are adjusted to the actual output. The stream is stopped by an URL that specifies the same IP and port. Additional parameters are ignored in this case. So the same URL can be used for switching the stream on/off.
Fix: API: Wrong UTF-8 encoding of channel logo URLs in responses to /api/getchannelsxml.html requests.
Fix: API: /api/timerdelete.html did not process the (undocumented) parameters dor, start and stop correctly, so recognizing the to be deleted timer could fail (affecting the TVGenial add-on).
Fix: API: /api/getchannelsxml was delivered with a wrong tuner tag (“Tuner” instead of “tuner”).
Added: API: /api/epgclear.html (without parameters) deletes all EPG data.
The Recording Service 1.33 provides new APIs for reading settings from the service.xml and enumerating available media files. Additionally existing APIs are extended for accessing favorites and using EPG search capabilities. “Read only” API functions that don't change data are now available for guest access. The details:
The getchannelsxml API provides two new parameters for the query part of the URL: fav=1 lets the API enumerate the favorites at the top of the channel list. Favonly=1 exclusively enumerates the favorites. Both parameters also apply to “rootsonly” and “groupsonly” mode, which means, the favorite groups resp. the favorite root are enumerated additionally or only.
Remarks: Favorites and channels appear as a contiguous virtual channel list, where favorites are numbered from -NoOfFavorites to -1 and channels from 0 to NoOfChannels-1. The negative favorite numbers can be used in URLs for channel selection (e. g. chid=-1). However, it is recommendable to rather use the channel ID than the index, because the latter may change in future Recording Service versions during runtime.
The new /api/setting.html API provides an easy way to read settings from the file service.xml. It requires two parameters specifying the section and name (= identifier) of the value in question. The following example gets the port of the Live Streaming Server:
The line reads the value from the section sec with the identifier id and returns it as plain text. The def parameter is optional. It specifies a default that is returned if the entry does not exist. If def is not specified the API returns an empty string in this case.
The new /api/mediafiles.html request lists media files as xml. Only files in the Media Libraries (see Recording Service Options) are included. The following parameters are supported:
audio=1: Lets the API list music directories and files instead of video.
photo=1: Lets the API list image directories and files instead of video.
dirid=[integer directory ID]: Lets the API list the files in the directory identified by its ID. If this parameter is missing, the API lists the directories and sub-directories containing the requested media file type as linear list. Besides other attributes each directory or file item provides an integer ID that allows to list the directory content resp. can be used as part of a URL. URLs for non-transcoded streaming are described in the Media Streaming section (see above), URLs for transcoded streaming are explained in the file transcoding_params_en.txt in the Docs sub-directory of the Recording Service installation.
thumbs=1: Adds a relative URL referencing a video / photo thumbnail or album artwork to the file items.
The new /api/tasks.html?task=... request executes the task with the specified name without delivering a HTML page. Please note that tasks cannot be executed with guest (read only) rights. If the rights are not sufficient or the specified task does not exists, the Web Server responds with a HTTP 404 status code (not found).
/api/epg.html now accepts two additional parameters in the query part. search=... specifies a search term. Only EPG items containing the term are listed. options=... specifies the search options as character string containing one or more of the following letters that correspond to the EPG search options in the Web Interface:
T: Search in title.
S: Search in sub-title
D: Search in description
C: Case sensitive
R: Use regular expression
If the options parameter is missing or contains none of the letters TSD, the default is T.
/api/status2.html now provides an additional entry <rights>...</rights> in the XML output, that specifies rhe current access rights. Possible values are “full” (full access rights) or “read” (guest access rights).
If /api/recdelete cannot delete an existing recording because it is used somewhere else, the corresponding database entry is not deleted either (previously it was removed so the file could not be referenced anymore). The API now returns a “423 Locked” status code in this case.
api/getconfigfile now allows to create a list of files that are located in a directory by using a file mask, e. g. /api/getconfigfile.html?file=config/*.ini. The list is provided as UTF-8 coded plain text. Each filename in the list is followed by CR and LF.
Added: Transcoded Streaming: Support for WebM TV / Radio resp. video/audio streaming. Playback works in Firefox, Chrome, Opera and (after installing decoders) in Internet Explorer. It does not require Flash or additional player software. Please note that in IE11 you need to start playback manually by clicking the play button in the browser's video window. Auto-play does not work for unknown reasons.
Added: Transcoded Streaming: Playback of HTML5 TV/Radio in browsers without using the Web Interface by entering a URL like http://[IP]:[Port]/streamint.html?chid=... or by using the shorter alias tv.html in the same way. All stream configuration parameters are supported (see attached file transcoding_params_en.txt) below. This allows creating TV/Radio favorite lists in the browser bookmarks and works with the following stream resp. preset types:
Firefox, Chrome, Opera: WebM or Flash (if installed) from the file ffmpegprefs.ini. If no preset is specified the Recording Service uses a WebM preset as default.
IE9, 10,11: WebM (after installing decoders) or Flash (if installed) from the file ffmpegprefs.ini. If no preset is specified the Recording Service uses a WebM preset as default.
Safari under OS-X and iOS: HLS from the file iphoneprefs.ini. In case of OS-X the HLS presets can be optionally replaced by flash presets from the file ffmpegprefs.ini (see Recording Service Options → Web/UPnP -> Flash playback under OS-X), thus reverting to the behavior of previous Recording Service versions.
Added: Transcoded Streaming: Additional URL parameters for setting up transcoded streams. They can be appended to an URL as query (beginning with a question mark) or entered in the expert mode input line of the web interface streaming configuration page. The attached file transcoding_params_en.txt (see below) describes the parameters and their meaning in detail.
Added: Transcoded Streaming: Support for including DVB subtitles in transcoded TV / video by using the subs URL parameter. It works with all stream types (WebM, Flash, HLS).
Change/Fix: Transcoded Streaming: The Recording Service now automatically uses an audio preset in case of radio / audio file streaming if no preset or a video preset is specified (which previously killed radio playback).
Fix: Transcoded Streaming: Audio tracks specified by the channel ID in URLs were wrongly replaced by the main audio track.
Change/Fix: Transcoded Streaming: The FFmpeg input does not depend anymore on the Recording Service Options → Web/UPnP → Additional TV Streams settings. It always contains only one audio track, no teletext and all DVB subtitles.
Change: Transcoded Streaming: The Recording Service does not allow more than one transcoded stream per client IP address and user agent, so that an application cannot receive two or more at the same time from a Recording Service instance. This measure prevents clients from excessively occupying server resources (particularly browsers like IE11 or Safari that do not close the previous connection on channel changes). The restriction can be avoided by specifying stream ids as parameter (see attached transcoding_params_en.txt).
Add/Fix: Transcoded HLS Streaming: Playback of TV/Radio in HLS Clients (particularly Safari under OS-X and iOS) without using a Web Interface HTML page by entering a URL like http://[IP]:[Port]/master.m3u8?chid=... All stream configuration parameters are supported (see attached transcoding_params_en.txt).
Added: Transcoded HLS Streaming: Possibility to set up permanent HLS streams via the Recording Service API. Such a stream runs independently from whether clients are accessing it or not and can be picked up without hardware initialization and channel switching delay by multiple clients at the same time. It is started with
[unique_name] is a user defined identifier (e.g. the channel name). Specifying the parameters streamid, chid and preset is mandatory. Other stream configuration parameters are optional. The stream is stopped by
or by stopping the Recording Service. HLS Clients can access the stream by using the following type of URL
No further parameters are required.
Added: Transcoded Streaming: Creation of a M3U channel list for ffmpeg-transcoded channels, based on the profiles defined in the file ffmpegprefs.ini. The following URL scheme can be used to download the M3U list from the Recording Service:
If tvpreset is specified, the list will contain TV channels. If rpreset is specified, the list will contain radio channels. If both are specified the list will contain TV and radio channels. The presets must be contained in the file ffmpegprefs.ini and can be referenced by (section) name (see below) or by index. The index of the first entry in the file is 0. The parameter ffpreset is optional and specifies one of the ffmpeg presets like medium or fast. The default is ultrafast. The parameter keepres (see below) is also optional. The default is h.
Added: Transcoded Streaming: Additional URL parameter keepres (keep resolution) for controlling the ffmpeg output picture format. It supersedes the misleading aspect parameter (that does not influence the output display aspect ratio) and provides the following options
keepres=h (default, equals aspect=16:9): Keeps the horizontal resolution of the source video, if not limited by the preset's MaxWidth value, and calculate the vertical resolution according to the source aspect ratio so that pixels are square (non-anamorphic output). MaxHeight is ignored.
keepres=v (equals aspect=4:3): Keeps the vertical resolution of the source video, if not limited by the preset's MaxHeight value, and calculates the horizontal resolution according to the source aspect ratio so that pixels are square (non-anamorphic output). MaxWidth is ignored.
Keepres=hv (or vh): Keeps the horizontal and vertical resolution of the source video, if not limited by the preset's MaxWidth and MaxHeight values. The output may be anamorphic with non-square pixels, requiring client player software that is able to handle it.
The source aspect ratio indicated by video headers is kept in any case. If keepres is used, the old aspect parameter is ignored.
Added: Transcoded Streaming / API: ffmpeg presets in the file ffmpegprefs.ini can be referenced by the URL encoded (section) name or by index (previously only by index). Example: preset=medium 768 kbit resp. preset=medium%20768%20kbit with URL-encoded blanks. The comparison is case insensitive.
Added: API: /api/getdiseqcxml.html for downloading the file DiSEqC.xml which is associated with the file channels.dat. DVBViewer Pro versions since 5.4.0 additionally download DiSEqC.xml (if available) when downloading channels.dat.
Fix: API: If a (DVBViewer) client tried to download a non-existing file favourites.xml or channels.dat the Recordings Service replied “HTTP 200 OK” instead of “HTTP 404 not found”, thus letting DVBViewer clients overwrite their favourites.xml or channels.dat with an empty file.
Added: API: The duplicate check on /api/timeradd.html rejecting timers that are covered by already existing timers can be switched off by passing the parameter allowdup=1.
Added: API: Download of files from the configuration folder and its sub-folders by using the following URL scheme: /api/getconfigfile.html?file=[path relative to the configuration folder]. Example: /api/getconfigfile.html?file=config%5Cservice.xml (with %5C as URL encoded backslash). Please note that files containing the sub-string “userdata” in their name are purposely excluded and can not be downloaded.
Added: API: New API for querying the Recording Service status by using the URL /api/status2.html. The result is delivered as xml providing more (precise) information about the current Recording Service state concerning streaming, timers, recording, web interface and hardware usage. More about this topic will be posted in the Scripting Lounge section of the forum. Please note that the previous status API (/api/status.html) is deprecated and may be removed in future versions.
Add/Fix: API: /api/timerlist.html?utf8=1 delivers the timer list with channel names that are not UTF-8-encoded, but according to the Windows default codepage (CP_ACP), yielding invalid XML. Unfortunately this cannot be changed due to compatibility reasons. Please use the new parameter utf8=2 for getting valid XML and UTF-8 encoded channel names.
Added: API: Possibility to send command line parameters via the Recording Service to future DVBViewer Pro versions, thus enabling remote control of DVBViewer clients. Information about this API will be published after the next DVBViewer Pro release.
Change: API: EPG entries requested with /api/epg.html contain PDC as additional information, not mixed up with Event IDs anymore.