SS IPTV's opportunities and used only in it.
Playlist in M3U is ordinary text document which is encoded in UTF-8. It can be edited by application Notepad from accessories Windows. Any M3U file starts with #EXTM3U text identifier in the first line. The first line of the pair always starts form #EXTINF: text identifier. The second line of the pair containes only uri (link) of content.
Let's consider this example:
#EXTINF:0 tvg-name="BBC" audio-track="eng" tvg-logo="http://mylogos.domain/BBC.png", BBC World
#EXTINF:0 tvg-name="CNN" audio-track="rus", CNN International
As you can see from this example the M3U file represents the set of pairs of lines which describes the source of signal (link) and parameters. In this example there are 3 channels: BBC World, CNN International and Arirang.
The first line starts with #EXTINF: (duration) (attributes), (channel title). Required params are: duration and channel title. In case of live TV links the duaration has always to be 0 or -1.
Attributes are not requred params, this is the list of supported attributes:
- tvg-shift - TV guide time shifting
- tvg-name - TV guide identifier
- tvg-logo - channel's logo (url)
- audio-track - Audio track definition of this channel, if it's supported by stream. Write language codes in ISO 639-2 standard, you may use several codes separated by comma (e.g.: "eng, rus, deu"). The first item in the list will be defined as default.
- aspect-ratio - defines aspec ratio (may be not available for some TV models). Available values: 16:9, 3:2, 4:3, 1,85:1, 2,39:1
SS IPTV besides usual directives and attributes of Extended M3U format supports additional ones. Using attributes described here you can ajust appearance of playlist on the Main Screen manipulating the rendering of separate tiles.
Directives of M3U have to be always written a new line and theirs first symbol is “#”, attributes are inlined in directive's string (usually #EXTINF) and are represented as a pair attrubute = "value". The attribute's value must always be double quoted.
#EXTSIZE defines the size of the tile related to described playlist's item. Available vlaues: small, medium, big
#EXTCTRL after the directive may be written url that has to be requested when the tile will be pressed. The request is sent before content uploading. This function may be usefol for receiverc' owners as the app may to send to receiver the command to change channel.
Additional attributes of #EXTINF directive:
description – defines description displayed on tiles with size medium or big
content-type – allows to telle the app tyepe of content described. Avalable vlues: stream, video, playlist. In most cases the app defines content type automatically and there is no need to use this parameter.
Additional attributes of #EXTM3U directive:
#EXTM3U may have attributes description, size and background. In this case all the values for these attributes will be applied to all playlist's items as defult, but they can be redefined in #EXTINF directives, of course.
The example below illustrates how to use additional directives and attributes.
#EXTM3U #EXTINF:-1, MTV Dance #EXTSIZE: Big #EXTBG: #11609e http://example.com/stream1 #EXTINF:-1,MTV Hits #EXTSIZE: Medium #EXTBG: #046f55 http://example.com/stream1 #EXTINF:-1,Россия 24 #EXTSIZE: Medium #EXTBG: #046f55 dtv://cabel:11/dvb/8 #EXTINF:-1,Первый канал #EXTSIZE: Medium #EXTBG: #046f55 dtv://cabel:11/dvb/2 #EXTINF:-1, MTV Live HD #EXTSIZE: Small http://example.com/stream3 #EXTINF:-1,MTV Rocks #EXTSIZE: Small http://example.com/stream4