[Plugin] IPTV Multicast/Unicast Player v0.2 Plugin for udp/rtp/http DVB-IP conform streams

  • Update_13.10.2010
    IPTV Plugin - ver 0.2
    From dam72@i-have-a-dreambox
    Coded by pcd@i-have-a-dreambox
    Thanks to Dr.Best@dreambox-tools.info, the plugin is using his servicewebts player lib
    Updates in v0.2:
    - Audio selection available with AUDIO button.
    - While pressing OK, the stream behind is not stopped
    - Added playlist.txt in the etc/videostreams folder, to define the order when having several m3u files. See the attached playlist.txt example


    Several things to do:
    - Teletext, EPG...
    ---------------------------------------------------------------------------


    German: (english explantion find below)


    Was kann man mit dem Plugin abspielen/nutzen?:
    - Die rtp/udp/http IPTV Streams MÜSSEN DVB-IP konform sein
    - Es gehen nur DRM/CA freie Streams
    - SD/HD Streams mit h.264 und MPEG2 funktionieren
    - Streamstart < 1 Sek., Zapping < 1 Sek.


    Vorwort:
    Ich beschäftige mich seit längerer Zeit, echtes IPTV multicast in SD und HD auf der dream stabil zum Laufen zu bekommen.
    Die gstreamer funktionieren zwar mit den Streams, aber eben nicht stabil und sauber. Diese Lösung funktioniert
    sauber, schnell und stabil über einen längeren Zeitraum bei HD und SD. Es stürzt nichts ab oder ruckelt. TV Genuss pur.


    Vorbedingung:
    - Aktuelles OE1.6 Image
    - Aktuelles "Partnerbox/RemoteTV Plugin" MUSS installiert sein, da auf eine lib zugegriffen wird (webtots.so)


    Multicast oder Unicast Streams und der eigentliche Trick:
    Bevor ich erkläre wie es funktioniert, sollte man sich ein wenig mit der Materie allgemein auseinandersetzen.
    Google hilft da sicherlich. Nun zum eigentlichen Trick. Mit Hilfe eines kleinen nützlichen Tools, "udpxy"
    mache ich aus rtp/udp Multicast streams - lokal auf der dream oder im LAN - einen http Unicast.
    Mit dem DVB-IP konformen http stream kann die dream wiederum dank des Partnerbox Plugins super umgehen.


    Handhabung bei http Unicast streams:
    Basierend auf Dr.Best´s Remote TV plugin, werden die DVB-IP konforme TV Streams direkt in den HW Decoder der dreambox geschoben, so wie beim üblichen DVB-T-S-C TV Empfang,
    daher auch die schnelle, unkomplizierte und stabile Verarbeitung der IPTV Streams. Es wird nicht der GStreamer verwendet.
    Sollten daher schon http:// Unicast streams vorliegen, braucht man udpxy nicht! Einfach wie unter A5 beschrieben, eine *.m3u in den etc/videostreams Ordner legen,
    und IPTV Plugin starten.


    Handhabung bei UDP/RTP Multicast streams: z.B. udp://239.12.14.133:4000 oder rtp://239.15.66.133:8888


    Udpxy [http://sourceforge.net/projects/udpxy/] ist ein Open Source tool. Es ist ein simpler Proxy, der aus rtp/udp multicast einen http unicast macht.
    Desweiteren erledigt es auch das IGMP v2. Im IPTV Multicast Betrieb wird die Nutzung bzw. nicht-mehr Nutzung eines TV Kanals durch IGMP join bzw. leave Kommandos
    gesteuert. Udxyp erledigt das sauber und stabil. Zapping ist daher unter 1 Sek. möglich.


    Wie und wo mache ich aus einem Multicast einen Unicast?
    Nun, udpxy kann auf verschiedenen Maschinen gestartet werden. Wo es läuft ist mitunter egal.
    Udpxy funktioniert auf dream, oder im Router (Optimal wenn das Multicast Netz per VPN am Router dranhängt ).
    Ich habe es auf einer Fritzbox 7170 am laufen gehabt, auf einem AlixBoard mit zeroshell läufts heute bei mir.
    Aber auch lokal auf der dream läuft der proxy sauber. Ich erkläre mal alles wenn udxy auf der dream läuft.


    Gestartet wird udpxy ganz einfach:


    ./udpxy -p 4050


    -p 4050 -> heisst das über diesen Port die multicast streams geroutet werden. Später dazu mehr.


    Einfache Instruktion des gesamten:
    A1. Udpxy.mipsel hier runterladen und in /usr/bin hochladen.
    A2. Umbennen von "udpxy.mispel" in "udpxy"
    A3. Chmod 755 ausführbar machen
    A4. Mit Telnet in usr/bin und folgendes ausführen "udpxy -p 4050 &"
    A5. In /etc/videostreams eine test.m3u mit folgenden Inhalt: (Achtung das sind Beispiel links, unter diesen URL ist nichts...)
    ------------------------------------------------


    #EXTINF:0,TVK-1
    http://127.0.0.1:4050/udp/239.122.12.187:10000
    #EXTINF:0,TVK-2
    http://127.0.0.1:4050/udp/239.122.12.188:10000
    #EXTINF:0,TVK-3
    http://127.0.0.1:4050/udp/239.122.12.189:10000
    #EXTINF:0,TVK-3
    http://127.0.0.1:4050/udp/239.122.12.181:10000


    ------------------------------------------------


    IPTV Player Plugin Installation und Handhabung:


    Nun den hier angehängten Ordner entpacken und nach /usr/lib/enigma2/python/Plugins/Extensions kopieren. Inhalt die Rechte chmod 755 geben.
    Die Dreambox einmal neustarten, damit der IPTV-Player in den Erweiterungen auftaucht.
    Jedes *.m3u was im Ordner /etc/videostreams enthalten ist, wird quasi als Bouquet im Playlist Ordner dargestellt.
    Jedes Bouquet enthält wiederum die die entaltenen Streams. Eigentlich selbsterklärend.
    Die Navigation ist simple, mit Exit verlässt man den Stream oder Ordner, mit OK öffnet man den Ordner,
    mit Up/Down auf der FB zappt man innerhalb eines Stream-Bouquets.


    Das IPTV Plugin basiert auf DMvidsDirect Plugin von PCD. Er hat auch das IPTV Plugin gemodded!


    ----------------------------ENGLISH Version-----------------------------


    What can you play with this plugin?
    - The rtp/udp/http IPTV must be DVB-IP conform
    - Only Non-DRM/ Non-CA (unscrambled) SD/HD Streams work with this approach
    - SD/HD Streams in h.264 or MPEG2 work with this approach
    - Stream starts to play < 1 Sec., zapping less then 1 Sec.


    Introduction:
    For a long time I try to find a proper solution on the e2, to get SD and HD IPTV streams running. With GStreamer IPTV streams work too, but unfortunatly not reliable and stable.
    I´ve tested really a lot. With the presented solution you can enjoy DVB-IP conform IPTV streams in a clean, stable and fast way on your e2 dreambox. Nothing crashes or stucks the streams while playing them.


    Multicast or Unicast streams and the used trick:
    Before I try to explain how it works, you should inform yourself about multicast and unicast. I´m sure google will help you.
    The used trick is a small linux binary called "udpxy". This is a small proxy converting the udp/rtp multicast packets into http unicast one, wihtout creating heavy load on your machine.
    The dream can also handle real multicast streams, but completly instable, my opinion. Http unicast works absolut perfect, therefore this small workaround makes fully sense.
    Another important advantage is that udpxy handles the IGMP v2 koin/leave protocol reliable. Further, if you would use multicast in your home network, this would flood your LAN clients with useless traffic.
    To avoid this I start udpxy on my router (WAN Gateway). Having converted the IPTV multicast streams to unicast, the "Remote TV" lib of Dr.Best will process the DVB-IP conform streams as you know it from usal DVB-S-T-C receiption.


    Prerequisites to run this plugin:
    - Uptodate OE 1.6 Image
    - Uptodate "Partnerbox/RemoteTV Plugin" MUST BE installed, because a lib of this plugin is used. (webtots.so)


    Handling of already existing http unicast streams:
    If you have already http:// unicast streams (e.g. origin dreambox streams), you don´t need to start udpxy! Just proceed with point A5, and create your *.m3u as described below, and copy it into etc/videostreams folder.


    Handling of udp/rtp multicast streams: e.g. udp://239.12.14.133:4000 oder rtp://239.15.66.133:8888
    With Udpxy [http://sourceforge.net/projects/udpxy/].
    Start udpxy on your dreambox or your router, to be able for converting multicast into unicast. Find below how to start.


    Udpxy is started in this way via telnet:


    ./udpxy -p 4050


    -p 4050 -> this means on Port 4050 you will catch the converted unicast packets from udpxy.


    Simple instruction how to proceed:
    A1. Download udpxy.mipsel here attached and upload it to usr/bin
    A2. Rename it to udpxy"
    A3. Give the right rights chmod 755
    A4. Start via telnet udpxy in this way "udpxy -p 4050 &"
    A5. Create your *.m3u with links as shown below, and upload the m3u to etc/videostreams (these links are expamples, no streams available on this URLs)


    ------------------------------------------------


    #EXTINF:0,TVK-1
    http://127.0.0.1:4050/udp/239.122.12.187:10000
    #EXTINF:0,TVK-2
    http://127.0.0.1:4050/udp/239.122.12.188:10000
    #EXTINF:0,TVK-3
    http://127.0.0.1:4050/udp/239.122.12.189:10000
    #EXTINF:0,TVK-3
    http://127.0.0.1:4050/udp/239.122.12.181:10000


    ------------------------------------------------


    IPTV Player Plugin installation and handling:


    Download the attached zip file and decompress it. The Streamer folder upload to /usr/lib/enigma2/python/Plugins/Extensions. Give the files inside the right rights 755.
    Restart your dreambox (don´t forget to start udpxy if did a reboot...). You should find the "IPTV Player" in extensions, open it. Each *.m3u file in etc/videostreams you should see as a kind of bouquet.
    Select one and press ok, then you will find the links of your m3u. Select a TV service and the stream should be displayed on your TV screen.
    The navigation is simple, with exit you leave the folder or the and the end the plugin. With OK you open the folder, With Up/Down you can zap within a folder from stream to stream and back.


    The IPTV Player plugin is based upon the DMvidsDirect Plugin of PCD. He has modded the come to the IPTV Player plugin.



    BIG thanks to Dr.Best for his great Remote TV plugin, and to PCD who made the final version of IPTV Player.


    P.S. There will be some updates in near future, Audio Selection, Teletext Selection...


    Regards
    dam72



    enjoy IPTV! :thumbs_up:

  • Hallo,




    besten Dank für das Plugin. Ich habe es mit den IPTV-Streams von T-Home Entertain ausprobiert, und es funktioniert perfekt. Selbst die HD-Kanäle gehen ohne Aussetzer und Ruckler.


    Damit kann meine Dreambox jetzt DVB-S(2), DVB-C und IPTV.




    Kann man die IPTV-Streams eigentlich auch aufnehmen?




    Nochmals besten Dank und viele Grüße,


    Potato

    • Offizieller Beitrag

    Hi,


    ich hätte da ein paar Verbesserungsvorschläge.


    1. ipk :winking_face:
    2. udpxy mit default Konfiguration auf Port 4050 auf der Box per Startscript starten (-> ipk)
    3. Einträge einer Playlist über das Plugin dynamisch auf udpxy umschreiben/leiten, ggf IP & Port des Proxy konfigurierbar machen
    3.1 Da würde erlauben "Standardplaylists" zu verwenden, aktuell sind die ja im schlimmsten Fall bei jedem User anders.
    3.2 Beispiel: rtp://@232.0.1.1:10010 -> http://127.0.0.1:4050/rtp/232.0.1.1:10010 , da man das sehr einfach anhand des Protocolprefix erkennen kann könnte das Plugin das imo problemlos übernehmen


    Mir würden noch ganz viele weitere Verbesserungen einfallen aber ich möchte hier mal nicht übertreiben :winking_face:
    Habt ihr vor das Plugin "irgendwie" zu lizensieren (CC NC/SA, GPL, Apache, schlagmichtot)? Aktuell fehlt jeglicher Hinweis auf eine Lizenz, weshalb man letztlich aktuell nichts daran ändern/anpassen dürfte.
    Da ihr aber die Quelldateien mitliefert gehe ich davon aus dass man das eigtl schon dürfen soll ;).

    mfg ,
    Reichi

  • Hi Reichi,


    schön das du dich zu dem Thema meldest. Besser später wie garnicht! Nun zu deinen Fragen/Anmerkungen:


    1. ipk ja, wäre schön. Allerdings ich hab keine Ahnung davon. :grinning_squinting_face: Ich bin nur gut im Projektmanagement/Organsieren/Testen....


    2. udpxy, aus meiner Sicht wäre es gut wenn man eine Konfiguration im Plugin hätte, in der Richtung


    udpxy proxy nutzen auf:


    - lokaler dream, wenn lokal dann immer 127.0.0.1 und port 4050


    - externer maschine, wenn externe maschine dann bitte IP und Port von udpxy eintragen


    -Inkludierter playlist importer der listen ala rtp://239.x.x.x in die richtige Form je nach udpxy Eintrag wandelt.


    3. Stimme zu mit den Standartplaylisten, schöner wäre es wenn man die Playlisten als Favoriten Bouquet in den Standart TV Listen unterbringen könnte, und die IPTV Streams wie normale TV Kanäle behandeln kann.


    Ich sehe mich als Verwalter bzw. Stakeholder dieses Plugins, es ist nur aus meiner eigenen Not heraus entstanden, ich möchte nicht sagen dass ich die diversen devs terrorisiert habe, aber Devs. wie Dr.Best (MerlinFourm), Nixi aus dem NN2 haben in den Anfängen mich mit nützlichen Tips versorgt. Vor allem gilt der Dank PCD(GPFourm), er hat das letztendliche Plugin geschrieben. Was war mein Beitrag? Ok, ich habe bestimmt etliche Monate mit testen verschwendet, aber ich hab´s gerne gemacht, da das Plugin in Zukunft sicher sehr Interessant werden wird.


    Thema Lizenzen. Nein, dieses Plugin ist nicht registriert, ist klassische OpenSource :thumbs_up: , von e2 Nutzern für e2 Nutzer gedacht ohne kommerziellen Hintergrund und so solles auch bleiben. Und ja, da ich mich als Stakeholder betrachte, darfst Du bzw. dmm aus meiner Sicht alles verwenden, so lange ich alle 2 Jahre recht auf eine kostenlose dreambox habe... :grinning_squinting_face: Nee Spass bei Seite. Aus meiner Sicht hat das dmm Team und die nahen Team´s wie GP,NN2 und Merlin eine Erlaubnis die Sourcen zu nutzen. Wen man die IPTV Funktion in das normale enigma2 portieren kann, tut es bitte. Darauf warte ich schon länger.


    Eine Bitte, wenn Ihr es irgendwie integrieren könnt, oder Du reichi ein richtiges erweiteres Plugin daraus baust, erwähn uns bitte als treibende Motoren, PCD,Dr.Best,dam72


    Somit kann ich nur sagen, reichi gib Gas! :winking_face: Wenn du jemanden zum Testen brauchst melde dich per PM.




    Grüsse aus München


    dam72

    Einmal editiert, zuletzt von dam72 ()

  • hi folks,
    i have a questions regarding this iptv plugin. can i use 2 dreambox 800hd for broadcasting and receiving, here im thinking of using 1 box that are connected with a dish to broadcasting the the signal/channel over iptv and the other box as a "Client" to receive it. where the client box only is connected via internet cable and no dish connected.
    i hope that you understand what i mean..


    /emilc

  • Hi emilc,


    in theorie yes. You need an internet connection with a very good upstream, min. 10 MBit/s, to be able to broadcast SD services.


    If you plan to do this within LAN 100Mbit/s, you should be able to broadcast also HD.


    In case you have usal LAN I´d recommend to use the vTuner, means you start on the receiving Box a vTuner deamon server and on the CLient Box you install the vTuner client. In any case the IPTV plugin works in all solutions.

  • hey, could you please tell me more about vtuner, where to get it and how to install and setting it up?

  • Hi emilc,


    here you can find everything related to vTuner http://code.google.com/p/vtuner/


    If you wait some days till dmm will release 3.2.0 versions for all dmm-boxes, you can use the new partnerbox plugin which allows to insert external URL into the usual channel list, and you can handle the streams the same way if they would come from the internal tuner!


    I´ve already checked this! :winking_face: And it works great, for streams coming from a remote dreambox or a IPTV multicast stream which proxy-ed with udpxy...


    Many thanks to Dr.Best! :winking_face: He did a great job! :thumbs_up:

  • Hallo,


    habe jetzt versucht das iptv plugin auf meiner dm600pvr zu installieren.
    wenn ich das iptv plugin kommt leider eine fehlermeldung. screenshot und log file anbei.


    ich habe bei der insallation folgendes glaube ich nocht richtig gemacht:

    Zitat

    A4. Mit Telnet in usr/bin und folgendes ausführen "udpxy -p 4050 &"

    ich konnte mich nicht in telnet mit den logindaten einloggen, es kam eine fehlermeldung "Login Incorrect" (siehe Screenshot anbei)


    kann mir bitte jemand weiter helfen?


    und noch was:
    was sind eigentlich

    Zitat

    - DRM/CA freie Streams

    wenn ich meinen iptv stream am pc mit vlc öffne funktioniert er problemlos (Bsp: udp://@239.0.2.10:8224)


    edit: foto screenshot entfernt

  • Leute,


    dieses Plugin braucht man nicht mehr!


    Seit den 3.2.x images kann man IPTV streams direkt in der normalen Kanalliste verwalten!

    Yep und das sieht dann in der userbouquet.tv so aus
    #SERVICE 1:0:1:0:0:0:0:0:0:0:http%3a//89.208.33.168%3a8200:3DTV
    #DESCRIPTION 3DTV

    In Betrieb
    Dreambox 920uhd-S2X/C
    Ausser Betrieb
    Dreambox 7080HD-S2/C / 8000-S2


  • Das die DM600 eine Enigma1 Box ist weist du aber schon, oder ?

    ja, habe sie aber mit einem enigma2 image geflasht, hat funktioniert und ich will erstmal nur versuchen ob iptv auf der dream problemlos funktioniert. wenn ja werde ich mir eine hd-dreambox besorgen und die set-top box der telekom entsorgen :smiling_face:

  • Naja, selbst wenn es funktioniert, auf die Entertainbox wirst du trotzdem nicht verzichten können, da man nur die Öffentlich Rechtlichen Sender ohne Telekombox empfangen kann. Alle anderen wie die privaten sind dort verschlüsselt und es gibt auch kein weg dieses zu umgehen.


    Gruß


    Marcus

  • Hallo,






    ich habe in meiner userbouquet.favourites.tv (OE 2.0) am Ende ergänzt:



    Code
    #SERVICE 1:0:1:0:0:0:0:0:0:0:http%3a//wstreaming.zdf.de/encoder/livestream15_vh.asx  
    
    
    #DESCRIPTION ZDF Livestream


    Am Ende der Favoritenliste erschien auch der neue Sender, aber ein Streamen war leider nicht möglich.



    Der Stream läßt sich am PC mit VLC problemlos wiedergeben.



    Was mache ich falsch?