Latest information version of the script will always be linked here rather than individual blog posts, e.g here is the place to link to…
Long story short there are some good IPTV providers out there, however the offering enigma2 wise seemed to be a giant m3u file that you import into a single bouquet or manually configure with E-Channelizer. Both reasonable approaches but a bit lacking in usability and some what time consuming.
So a bit of research and some coding based on Tommycahir’s guides ,I (suls) came up with a decent little script to take an IPTV providers m3u file and create working bouquets within Enigma. Given the timing and demise of some services in the marketplace this proved a massive hit and filled an apparent gap in the market.
Moving forward from the initial couple of versions of the script DougMac offered to pitch in and offered his services which have quite frankly progressed the script / plugin in ways I would personally never have done or achieved in the time frames Doug has, I’d love to take credit for Dougs work of late but sadly the plugin and bouquet management is all Dougs. I promise I’ll do some more coding soon !
So we are a team of two, giving something back to the community. We are not paid for our efforts (and do not expect to be although it does in fact cost us), we do our best to support the script / plugin but we do both work for a living and have other commitments.
Where can i get it ?
Latest releases are available here
As of version 0.6 of the script it is also available in Enigma2 plugin format which should ease the install pain and general usage for those that aren’t commandline gurus.
So what does it do?
- Downloads an m3u file from your provider and creates enigma bouquets and channels from the m3u data.
- Also creates unique service references for use with EPG importers
- Creates EPG-Importer source files using your providers XML TV EPG data streams
- Splits VOD into bouquets
- Picon Support
- Bouquet/Channel Ordering
- Multiple provider support
In english this means enigma2 users (vuplus / dreambox, zgemma etc) can get a similar IPTV experience to a mag254 or perfect player user. Eg Channels split into groups with EPG data on your enigma box.
NB: The script does not touch or change any of your existing bouquets
Named provider support.
Update (07/03/2018) – Named providers are no longer supported. Use the config based setup instead.
You need the EPG-Importer plugin on your box to use this script.. believe this is available in all current enigma images.
How do i use it?
- ftp the e2m3u2bouquet.py to your engima2 box (i would suggest to /etc/enigma2/e2m3u2bouquet)
- ssh to your enigma2 box (using putty or something similar)
- cd to the correct directory if you are not already there
- make script executable
chmod 777 e2m3u2bouquet.py
URL Based Setup
- run the script passing the url for your m3u file and the url for your providers XML TV data feed
python e2m3u2bouquet.py -m "http://provider_url/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" -e "http://provider_url/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD"
NB: you need to replace the username and password values X 2
If you are with a different provider the script should work but you will obviously need the m3u url (1st parameter) and XML TV url (2nd parameter) for your own provider. Please note the m3u file needs to be the “extended” version if you have the option.
Config File Based Setup (v0.7 onwards)
Run the script with no parameters
The script on first run will create a config.xml in /etc/enigma2/e2m3u2bouquet and tell you to fill it in.
Edit the config.xml and populate provider details and settings for as many providers as your require, the XML is commented so should be pretty straight forward.
nano config.xml or vi config.xml
Or use FTP to transfer the file for editing and replace it.
Then run the script again.
This will create for all the providers specificed and enabled in the config file.
To automate this use linux crontabs as detailed in the cron automation post
NB: All settings are contained within the config file there is no need to use the below switches if running the script with a config file.
For Picon Support
Add -P and optionally -q /path/to/picon/folder/ if you don’t store your picons in the default location
./e2m3u2bouquet.py -m "http://provider_url/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" -e "http://provider_url/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD" -P ./e2m3u2bouquet.py -m "http://provider_url/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" -e "http://provider_url/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD" -P -q /mount/usb/picon/
To Reorder Bouquets / Channels
See Custom Mapping post for full details
Specify all stream types to be IPTV
Default is DVB stream types for live channels and IPTV for VOD, all IPTV type streams may be required if you are unable to record channels.
./e2m3u2bouquet.py -m "http://provider_url/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" -e "http://provider_url/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD" -i
Split VOD into seperate bouquets
./e2m3u2bouquet.py -m "http://provider_url/get.php?username=YOURUSERNAME&password=YOURPASSWORD&type=m3u_plus&output=ts" -e "http://provider_url/xmltv.php?username=YOURUSERNAME&password=YOURPASSWORD" -M
or see the help thread for solutions to common issues
Importing EPG Data
- open EPG-Importer plugin (download it if you haven’t already got it)
- select sources (Blue button on openvix)
- enable the source created by the script (e2m3u2bouquet / FAB / EPIC)
- Kick off a manual EPG import
It is highly recommended that you select the “Clear EPG Data” option in EPG-Import to clear data before importing. Also if you schedule the script as a cron job make sure this is just before your daily EPG-import schedule.
How do I update my Channels
Simply run the script again, or set this script up as a scheduled cron job as per this guide.
Check out the help thread for solutions to common issues
Full Command Line Reference
usage: e2m3u2bouquet.py [-h] [-m M3UURL] [-e EPGURL] [-u USERNAME] [-p PASSWORD] [-i] [-sttv STTV] [-stvod STVOD] [-M] [-a] [-P] [-q ICONPATH] [-xs] [-b BOUQUETURL] [-bd] [-bt] [-U] [-V] e2m3u2bouquet.e2m3u2bouquet -- Enigma2 IPTV m3u to bouquet parser Copyright 2017. All rights reserved. Created on 2017-06-04. Licensed under GNU GENERAL PUBLIC LICENSE version 3 Distributed on an "AS IS" basis without warranties or conditions of any kind, either express or implied. USAGE optional arguments: -h, --help show this help message and exit -i, --iptvtypes Treat all stream references as IPTV stream type. (required for some enigma boxes) -sttv STTV, --streamtype_tv STTV Stream type for TV (e.g. 1, 4097, 5001 or 5002) overrides iptvtypes -stvod STVOD, --streamtype_vod STVOD Stream type for VOD (e.g. 4097, 5001 or 5002) overrides iptvtypes -M, --multivod Create multiple VOD bouquets rather than single VOD bouquet -a, allbouquet Create all channels bouquet -P, --picons Automatically download of Picons, this option will slow the execution -q ICONPATH, --iconpath ICONPATH Option path to store picons, if not supplied defaults to /usr/share/enigma2/picon/ -xs, --xcludesref Disable service ref overriding from override.xml file -b BOUQUET_URL, --bouqueturl BOUQUET_URL URL to download providers bouquet - to map custom service references -bd, --bouquetdownload Download providers bouquet (use default url) - to map custom service references -bt, --bouquettop Place IPTV bouquets at top -U, --uninstall Uninstall all changes made by this script -V, --version show program's version number and exit URL Based Setup: -m M3UURL, --m3uurl M3UURL URL to download m3u data from (required) -e EPGURL, --epgurl EPGURL URL source for XML TV epg data sources Config file based setup No parameters required The script will create a default config file first time it is run, IPTV providers details need to be entered into this file before running the script again
- Beta version for limited testing
- Updated to use providers epg, doesn’t need reboot to take effect – so could be scheduled from cron job (Doug MacKay)
- Complete restructure of the code base to some thing more usable going forward, incorporated Dougs changes to EPG data source
- tvg-id now included in the channels
- better parsing of m3u data (Doug MacKay)
- downloads m3u file from url
- sets custom source to providers xml tv feed (as per Dougs v0.2)
- fixed IPTV streams not playing / having incorrect stream type
- option to make all streams IPTV type
- option to split VOD bouquets by initial category
- all parameters arg based so in theory works for other providers and can be croned
- auto reloads bouquets (Doug MacKay)
- debug \ testrun modes
- Restructure (again) of code base to bring in some of dougs better structures
- m3u file parsing updated
- channel ordering based on m3u file, bouquet ordering alphabetically or custom.
- create single channels and sources list for EPG-Importer. Only one source now needs to be enabled in the EPG-Importer plugin
- Add Picon download option (thanks to Jose Sanchez for initial code and idea)
- Better args layout and processing
- Mutli VOD by default
- Named provider support (= simplified command line)
- Delimiter options for user defined parsing of the m3u file
- Ability to chose own bouquet sort order
- Fix for invalid picon path hanging the script
- Fixed error for ACE and FLAWLESS users where “:” in category put the box into an infinite loop
- Custom mapping feature
- Reorder bouquets
- Reorder channels within bouquets
- Disable entire bouquet or individual channels
- Ability to change service reference (so that EPG from existing satellite service can be used)
- Change tvg-id to match other xml epg feeds
- Xml override file can set-up EPG-Importer config for different xmltv feeds
- Support unicode characters in playlist
- Single VOD bouquet now default (use -M for multiple VOD bouquets)
- Option for all channels bouquet (-a)
- Stream Url no longer output to xml (replaced by clearStreamUrl). This means that custom override maps can be shared as they no longer contain username and passwords
- Fix bug where delimiter arguments weren’t getting converted to ints
- Minor fixes
- Add nameOverride attribute to xml files to allow channel name or category name to be changed
- Add option to use service references from providers bouquet file. See -b argument
- Add SSL fix for some boxes (unconfirmed if working)
- Improved service ref id generation logic to reduce (hopefully eliminate) id conflicts especially if override file is used
- Add option -xs to stop service refs from override.xml file being used
- Improved m3u parsing
- Dedicated config directory ‘/etc/enigma2/e2m3u2bouquet’
- Pre Python 2.7.9 SSL context workaround
- Remove delimiter options
- No longer uninstall on each run
- Option to place IPTV bouquets at top or bottom ‘-bt’
- Consistent channel numbering (best results when IPTV bouquets are set to top). Each new IPTV category will start numbering +100 from start of last category
- [plugin] Add /picon option for download path
- [plugin] Show last playlist update
- [plugin] Add override service service refs’ option
- [plugin] Add IPTV bouquet position option
- [plugin] Add option download providers bouquet (for custom service refs)
- Put epg-importer source in source cat for new epg-importer version
- Set user agent for downloads
- Added Config file based setup support
- Support for multiple service providers
- Make sure comments are xml safe
- Extract username and password from m3u url if they are not passed in
- Set services to stream type ‘1’ in epg config so that the epg can be imported if
serviceapp is overriding stream type ‘4097’ to exteplayer3
- Minor fixes & tidy
- Option for custom stream type for TV and VOD
- Allow https & rtmp services
- Unicode fixes
- Url encoding fixes
- [plugin] Multi custom provider support
- [plugin] Config file based setup (values can be edited in an xml file instead)
of entered using the remote
- [plugin] Provider managed update system
- [plugin] Fixed time schedule type
- [plugin] Option for custom stream type for TV and VOD
- [plugin] Fix issue with main screen showing no text on some skins
- [plugin] Add option to reset bouquets
- Extra checking to ensure that logos are actually images
- Keep provider order from config file
- [plugin] Reload bouquets after bouquet reset
- [plugin] Fix bouquet top option always reverting to top
See the help thread
Known supported boxes
VU Plus Solo2 / Openvix 5
VU PLus Duo / OpenVix
Xtrend 7500 OpenPli
Thanks to ..
Tommycahir on Techkings, his guides were the inspiration for the script.
The FAB hosting facebook group for ideas, testing and coding.