How to get live TV channels from TVMosaic as m3u playlist and their epg as xmltv

TVMosaic live and recorded TV products for Desktop/NAS/Raspbery Pi
Locked
Oberon
Posts: 1053
Joined: Thu Jan 26, 2017 8:45 am

How to get live TV channels from TVMosaic as m3u playlist and their epg as xmltv

Post by Oberon » Fri Apr 13, 2018 3:07 pm

It is possible to get all live TV channels from a TVMosaic server as m3u playlist with the following command:

Code: Select all

http://<tvmosaic server address>:9270/mobile/?command=get_playlist_m3u&client=<client id string>&sort=<name/number>&type=<tv/radio>&transcoder=h264ts&bitrate=<bitrate in kbits/sec>&lng=<audio language>&width=<width>&height=<height>
Response playlist includes m3u-tags for channel name, number, logo, type and tvg-id.

All parameters, except command, are optional.

General parameters:
- client: allows specifying a client id for live TV requests from this playlist. Client id - any string, which is unique for a given environment. Optional, if not provided, client IP address is used as a client id.
- sort=<name/number> (default, if not present, is name). Sorts the output m3u file on channel name or number
- type=<tv/radio> (default is all channels). If present, defines the type of channels to returnL tv or radio. If not present, all channels are returned.

Transcoder parameters:
- transcoder: format to transcode signal to. Mandatory for transcoded request. Currently, only h264ts is supported - a transport stream with h264 video and aac audio
- bitrate: video bitrate in kbits/sec of the transcoded signal. Optional, if absent system identities bitrate itself.
- lng: audio track to include. Optional, if absent - all audio tracks are included
- width / height: width and height in pixels of the transcoded video. Optional, if absent - source video dimensions are used.

Examples

Simple usage (not transcoded stream, default client id):

Code: Select all

http://192.168.1.24:9270/mobile/?command=get_playlist_m3u
Not transcoded stream with client id set to AAAA:

Code: Select all

http://192.168.1.24:9270/mobile/?command=get_playlist_m3u&client=AAAA
Transcoded stream with default client id and bitrate of 1Mb/s:

Code: Select all

http://192.168.1.24:9270/mobile/?command=get_playlist_m3u&transcoder=h264ts&bitrate=1024

Oberon
Posts: 1053
Joined: Thu Jan 26, 2017 8:45 am

Re: How to get live TV channels from TVMosaic as m3u playlist and their epg as xmltv

Post by Oberon » Tue May 01, 2018 5:44 pm

Once you got the channels as m3u playlist, you can use the following command to get their EPG as xmltv:

Code: Select all

http://<tvmosaic server address>:9270/mobile/?command=get_xmltv_epg&days=<number of days>
days parameter is optional. If not specified, command will return all available epg.

The channel IDs in xmltv response match tvg-id tag in m3u for the automatic epg mapping.

Example:

Code: Select all

http://192.168.1.24:9270/mobile/?command=get_xmltv_epg

Locked