Overview

With this application you can create lists with TV streams from around the web.

  • Channels with electronic program guide.
  • Extract streams using XML, JSON, M3U or regular expression parser.
  • Test streams.
  • Export and Import database.
  • Create custom channels and EPG parsers.
  • Stream references (automatically assign channels to streams).

  • Fast internet connection (Ethernet the best, WiFi or LTE recommended, 4G may work).
  • Good and stable data signal.
  • 30 MB or more free internal memory space.
  • Recommended set-top box:

    MK902 IIMK705
    MK 902II MK 705
    Buy from: amazon.com

    aliexpress.com
    Buy from: amazon.com

    aliexpress.com

Step 1 (Extract/grab streams):
First you need to extract the streams. You can do this by creating a new list. Start by selecting Extract Streams from the menu.
You need to know the file from where you want to grab your streams. This can be a remote file (eg. like a web page) or a local file.
For xml files you need to know the tag where the stream is and optionally the tag for the name of the stream.
(Advanced only) For regular expression you can get more details from android Pattern object.

After you have the streams extracted and saved you can go to step 2 or 3.

Step 2 (Assign Channel):
You can assign a channel by either touching the logo icon or from Edit Channel page. (make sure that you first updated the database otherwise no channels will be available to assign).

Step 3 (Test stream):
You can test the stream by either touching the stream name and select test or from Edit Channel page. This will show additional details about your stream.

TO DO

  • At this time you will find no streams at all included in this app. In the case that some streams will eventually be added, they will be only from free public TV stations and for demonstrative purpose.

This application allows you to create your own custom channels

To create a custom channel you need to create a xml file and import it into TVStreams. Bellow is an example of the content of a xml file with one custom channel:

customchannel.xml
<?xml version="1.0" encoding="UTF-8"?>
<TVStreams>
    <Channels>
        <channel id="1">
            <name><![CDATA[Al Jazeera]]></name>
            <category>News</category>
            <file_name>al_jazeera</file_name>
            <epg_module_name>america.aljazeera.com</epg_module_name>
            <epg_module_key>none</epg_module_key>
            <epg_language>En</epg_language>
            <language>En</language>
            <country><![CDATA[United States]]></country>
            <web><![CDATA[english.aljazeera.net]]></web>
            <enabled>true</enabled>
        </channel>
    </Channels>
</TVStreams>

The id attribute of the channel can be any number between 1 and 99999 inclusiv. If the attribute is not set or is 0 or greater than 99999 then the channel will not be imported.

It is a good idea to use id's that have 5 digits because it increases the chances that your channels will have unique id's that will not be overwrited by other custom channels.

Channel tag Type Mandatory Description
name String Yes The name of the channel.
category String Yes The category of the channel. Can be any String but it is recommended to use one of the following: Movies, Documentary, Kids, Sport, Music, Lifestyle, General, News, Adult.
file_name String No This is the name of the logo file.
epg_module_name String No The EPG parser file name.
epg_module_key String No An optional key that will be passed to EPG parser and inserted into url.
epg_language String No The language of the EPG.
language String No The language of the channel.
country String No The country of the channel.
address String No The address of the channel.
phone String No The phone of the channel.
e_mail String No The e-mail of the channel.
web String No The web address of the channel.
enabled boolean Yes Whether this channel is enabled or no. Values can be true or false.

Logo Image

For the app to properly load the custom channel logo, the following conditions must be met.

  • The logo must be placed on the external storage under folder TVStreams/images/logos/.
  • The logo must be in png format type and with transparency.
  • The dimensions of the logo must be 161px x 109px.
  • The name of the file must match the file_name tag of the channel in xml.

This application allows you to create your own custom EPG parsers

The EPG module files must be placed on the external storage under the folder TVStreams/epg/.

america.aljazeera.com.xml
<?xml version="1.0" encoding="UTF-8"?>
<EPG_MODULE url="http://america.aljazeera.com/bin/ajam/broadcast-schedule.json">
    <EVENT eventsgroup="true"><![CDATA[\{"wireEntry"(.*?)\{"entry":]]>
        <TITLE mode="regex"><![CDATA[","title":"(.*?)",]]></TITLE>
        <TIME mode="regex" timemode="timestamp"><![CDATA["publishedDate":(.*?),"]]></TIME>
        <SUBTITLE mode="regex" trim="true"><![CDATA["description":\{"value":"(.*?)",]]></SUBTITLE>
    </EVENT>
</EPG_MODULE>

EPG_MODULE

EPG_MODULE is the main group and is mandatory.

EPG_MODULE attributes
attribute Value(s) Mandatory Description
url ... Yes The url of the page containing the EPG. You can insert the channel specific epg_module_key into the url using $MODULE_KEY$

Groups

You can define your own groups using only uppercase leteres and numbers (eg:DAY or GROUP_1). Do not use TIME, TITLE or SUBTILE as custom groups because these are predefined elements.

Groups specific attributes
attribute Value(s) Mandatory Description
daysgroup true | false No Treat this as days group when using referencesystemdate.
eventsgroup true | false No Treat this as events group.

Elements

There are 2 types: predefined and custom.

  • Predefined elements are: TIME, TITLE and SUBTITLE. These must be placed into a group with the attribute "eventsgroup".
  • Custom elements must be lowercase to diference them from groups and predefined elements.

Common attributes
attribute Value(s) Mandatory Description
mode regex | comp Yes The way that the content of the tag is treated.
For "regex", the capture is surrounded by parentheses. Example (.*?)
For "comp", the content of the element must reference one or more previous element(s) surrounded by dollars. Example: $element_1$ $element_2$
trim true | false No Trim the result.
removechars ... No Remove all specified chars from result.
replace ... No Replace string with other string (initial_string|$|replaced_string).
removestring ... No Removes all ocurences of specified string from result.
replaceempty tag name No If the result is empty replace it with the specified tag.
TIME specific attributes
attribute Value(s) Mandatory Description
timemode timestamp | timestampseconds | format Yes The mode how the timestamp is captured or created.
timeformat ... (format)Yes When timemode is set to 'format' then a timeformat must be set. You can get the format symbols from here.
locale Language,Country (format)Yes When timemode is set to 'format' then a locale must be set.
Language - An ISO 639 alpha-2 or alpha-3 language code, or a language subtag up to 8 characters in length.
Country(Optional) - An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code.
timezone timezone ID No When timemode is set to 'format' then a timezone should be set.
referencesystemyear true | false No Use the system year as reference when building the timestamp.
referencesystemdate true | false No Use system date as reference when building the timestamp.

Complex Example

<?xml version="1.0" encoding="UTF-8"?>
<EPG_MODULE url="http://www.devaward.com/tvstreams/example-epg.php?channel=$MODULE_KEY$">
    <DAY><![CDATA[(?s)<span>\n(.*?)<td style=\"vertical-align:top;text-align:center\">]]>
        <time_1 mode="regex" trim="true"><![CDATA[class="begin_time">(.*?)<]]></time_1>
        <date mode="regex" replace="ţ|$|ț"><![CDATA[(?s).*? (.*?)\n   </span><br/>]]></date>
        <EVENT eventsgroup="true"><![CDATA[(?s)<table><tr><td>(.*?)</td></tr><]]>
            <time_2 mode="regex" replaceepmty="time_1"><![CDATA[(?s)class="time_text">(.*?)<]]></time_2>
            <TITLE mode="regex"><![CDATA[btxt">(.*?)</]]></TITLE>
            <TIME mode="comp" trim="true" timemode="format" timeformat="(d MMMM) H:mm" referencesystemyear="true" timezone="Europe/Madrid" locale="es,ES"><![CDATA[$date$ $time_2$]]></TIME>
            <sub_1 mode="regex" trim="true" removechars="()"><![CDATA[class="sub_text">(.*?)</]]></sub_1>
            <sub_2 mode="regex" trim="true" removechars="()"><![CDATA[class="extra_text">(.*?)</]]></sub_2>
            <sub_3 mode="regex" trim="true"><![CDATA[class="desc_text">(.*?)</]]></sub_3>
            <sub_4 mode="comp" trim="true"><![CDATA[$sub_1$ $sub_2$]]></sub_4>
            <SUBTITLE mode="comp" removestring="()" replace="<br/>|$| "><![CDATA[$sub_3$ ($sub_4$)]]></SUBTITLE>
        </EVENT>
    </DAY>
</EPG_MODULE>

Please don't send bug reports about streams or servers being offline. This app and the developer have nothing in common with any streams or servers regardless of their country.

Send all bug reports to e-mail tvstreams@devaward.com. Please make sure to describe it in detail.
Thank you for your help!