E2m3u2bouquet

This post is obsolete : Please see e2m3u2bouquet homepage for latest version

Background

Bit of a side project this one, but following recent developments seemed a shame not to be getting the best out of the VU+ solo2 box.

Long story short there are some good IPTV providers out there, however the offering enigma2 wise seems to be a giant m3u file that you import into a single bouquet or manually configure with E-channeliser. Both reasonable approaches but a bit lacking in usability and some what time consuming.

Anyway a couple of nights research and a bit of messing about and I have working script to convert an m3u into enigma2 bouquets, with *currently limited* UK EPG support.

So what does it do?

  • Takes a single m3u file and creates enigma2 user bouquets based the m3u data
  • Also creates unique service references for use with EPG importers
  • Creates supporting files for EPG-Import plugin

NB: The script does not touch or change any of your existing bouquets

Where can i get it ?

Here e2m3u2bouquet

How do i use it?

  1. download the above file
  2. unzip the e2m3u2bouquet.py file
  3. download your service providers m3u playlist from their site
  4. ftp the e2m3u2bouquet.py to your engima2 box along with the m3u file you have downloaded from your provider (i would suggest to /home/root)
  5. ssh to your enigma2 box (using putty or some thing similar)
  6. cd to the correct directory if you are not already there cd /home/root
  7. make script executable chmod 777 e2m3u2bouquet.py
  8. run the script passing the name of your m3u file as a parameter ./e2m3u2bouquet.py nameofyourfile.m3u
  9. if the above step fails try python e2m3u2bouquet.py nameofyourfile.m3u
  10. reboot your enigma2 box

Additionally If you want epg data

  1. open EPG-Importer plugin (download it if you haven’t already got it)
  2. select sources (Blue button on openvix)
  3. enable the IPTV UK sources created by the script (only worth doing for UK channels currently as only rytec UK sources are currently included)
  4. Kick off a manual EPG import

How do I update my Channels

Download a new m3u file to your box and run the script again, this will wipe out all the previously created files and bouquets and redo the process.

I’ll look into automating this in the future time permitting.

How do I get rid of it ?

In the event that the changes are not for you simply run the script with an uninstall parameter, this will reverse all the changes made by the script

./ e2m3u2bouquet.py uninstall

Known Limitations

EPG for foreign channels not supported (Not sure it will be)

EPG for UK channels hit and miss currently (about 50%) – some work to be done here, ill be looking into this next

PIC icons – Not currently supported

Version history

0.1 – Beta version for limited testing

Known supported boxes

VU Plus Solo2 / Openvix 5
zGemma h2s
VU PLus Duo / OpenVix
Xtrend 7500 OpenPli
Zgemma Openvix

 

Support

ping me in the comments

20 thoughts on “Enigma2 IPTV m3u to bouquet

  1. Kamrul Islam

    hi.. any chance can help with the epg update part of the script?

    1. Have you got epgimport plug-in installed?

      1. Kamrul Islam

        Yes i can get that all to work.. issue is the channel id used in the xml is not matching what rytec sources is looking for –
        example –
        Incorrect

        Correct

        It looks like from the m3u file if we can extract the tvg-ID then do the manipulation on that should work.

        Thanks

      2. Kamrul Islam

        Sorry forgot to mention.. when i change it manually with the correct reference it works as expected.

  2. Kamrul Islam

    awesome man.. i still need to test it though.. refactored the code slightly with the following –

    added the tvg-ID from the m3u file to the list
    before:
    channels = [line.split(‘”‘)[7],line.split(‘,’)[1].strip()]
    after:
    channels = [line.split(‘”‘)[7],line.split(‘,’)[1].strip(),line.split(‘”‘)[1]]

    then i referenced this when creating the channels
    before:
    file.write(“<channel id=\""+x[1].replace…
    after:
    file.write("<channel id=\""+x[2].replace…

    Still need to manually change a few that was incorrect in the m3u file.. but its better than doing it for all of them in the hundreds!!

    Will test it out later tonight.. thanks

    1. Yeah that’s exactly what needs to happen, my provider doesn’t put the rytec sources in the m3u hence missing it first attempt. I’ll fix it in the next version, probably borrowing your code

  3. Kamrul Islam

    Can you also possibly add a feature to be able to select the groups as well.. i have done it but not sure if its the best way.

    mylist = (‘SPORTS’, ‘ENTERTAINMENT’, ‘KIDS’,’3PM’,’INTERNATIONAL’,’INDIAN’,’ASIAN’,’NBC’,’PPV’,’MOVIES’,’DOCUMENTARIES’)

    if any((item in line) for item in mylist):

    Thanks

  4. Not sure I understand the intention, what does it do?

  5. Tony Adefuye

    Hi when you redo the list does it delete the epg data?

    1. No, it just recreates the bouquets

  6. Hi Suls, Did you manage a cronjob script to automate channel updates I’ve tried but doesn’t do anything.

    0 6,18 * * * cd/home/root/ && ./e2m3u2bouquet.py -m “http://vstreams.stablehq.co.uk:25461/get.php?username=???????&password=???????&type=m3u_plus&output=ts” -e “http://vstreams.stablehq.co.uk:25461/xmltv.php?username=???????&password=???????

    My py file is in home/root
    Thanks

    1. my current cron on v0.5 looks like this

      0 5 * * * /home/root/e2m3u2bouquet.py -n FAB -u xxxxx -p xxxxx -P -q /mount/usb/picon/ -M > /tmp/e2.log

      have you installed busybox-cron ? might be worth trying the full path although both should work

      1. Thanks for the quick response. I have Cron Manager if that’s what you mean?
        Sorry I’m a newbie at all this.
        What do you mean by full path?

        1. try

          0 5 * * * /home/root/e2m3u2bouquet.py -n VSTREAMS -u xxxxx -p xxxxx

          By full path i meant

          /home/root/e2m3u2bouquet.py

          Rather than

          cd/home/root/ && ./e2m3u2bouquet.py

          Both should work but might be worth a shot

    2. Kamrul Islam

      Double check if space after the cd command and also can confirm under the gui menu>>timer its active

  7. hi a guide on how to sort bouquets order would be nice as my vod are in middle of sports and movies catogerory

  8. working fine with Vu+ zero sat reciver

  9. Hi Suls, I have ported your amazing program to Python 3 in order to get it to work on the VU+ Duo 4K SE box. I worked through lots of unicode issues, but now everything seems to work, including bouquets, channel list with foreign characters, EPG and picons. I have a couple of questions, would like to chat with you to get some minor issues sorted.

    1. Hi Dave, would you mind sharing your code, please? My Uno 4K SE no longer supports Python 3 and I started trying to port it myself but then I came across your post 🙂 Would really appreciate it.

Leave a Reply

Your email address will not be published. Required fields are marked *