[Plugin] IPTV Multicast/Unicast Player 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! :winking_face:

  • udpxy läuft
    17287 root 1820 S ./udpxy -p 4050


    plugin wird auch mit testchannels geöffnet, jetzt wäre ein stream url nett zum testen.
    gibt es überhaupt etwas freies in dieser richtung ?

  • Erim:
    Freie gibts z.B. am T-Home Anschluss, öffentlich rechtliche...


    http://www.ard-digital.de/Empf…ressen/Multicast-Adressen


    Ich hänge an einem Multicastnetz per VPN, geht einwandfrei.


    Es gibt diverse Campusnetze, wo Tv per Multicast verteilt wird.


    Ich gluabe die Russen haben da was kartina.tv oder so, muss man aber bezahlen.


    daiga: I don´t understand your question? Nothing is recorded, you can play back live TV stream which are DVB compliant.


    If you want to test, and you have a second dreambox, copy the link of a service in webfrontend. Should look like...


    for Das Erste HD
    http://IP_remote_dream:8001/1:0:19:2B5C:3F3:1:C00000:0:0:0:


    This link you put into the m3u file in etc/videostreams of your local dream.

  • daiga: All the service I use, are within a closed network, not reachable by open internet. Internet is not able to handle multicast streams in a open way... But what works is, if you tunnel it through a VPN , that´s what I´m doing. I´m connected to a network containing multicast streams.

  • daiga: Siol in Slovenia will, but only the TV services without DRM encryption! For the other I don´t know to be honest. In general the streams seem to be multicast, so far they would work. But only if they are not DRM encrypted!!!


    Note: 127.0.0.1:4050 -> this means you will run udpxy on the dreambox as localhost. If you run the udpxy on your router, then you have to replace the URL 127.0.0.1 in your m3u with the ip of your router. You got it?

  • Hey, schön dass sich jetzt immer mehr Leute damit beschäftigen...
    Ein paar Fragen hierzu:
    Werden die empfangenen Services in den "normalen" Bouquets dargestellt, oder kann ich diese nur über das Plugin abrufen?
    Ist eine Auswertung der EIT möglich, und wenn ja auch schedule, oder nur present/following?
    Vielen Dank schon mal für die Antworten.

  • Hi. Thanks for plugin. I have VPS server with dvb-t runing on vlc and i stream to other country. I can get play stream with media player, but work not stable. On PC plays very well but on DM not nice, long buffer about 6-8s and not stable. So i try play stream with iptv plugin but does't play at all. With media player working...
    So i try catch stream from other DM with iptv plugin doesn t work with media player no problem and partner box is well.
    I set up plugin step by step follow manual. I try different image and tested on DM500HD and DM800HD.
    My m3u playlist looks like that.
    "Example1
    #EXTM3U
    #EXTINF:0,Dreambox
    http://192.168.1.105:8001/1:0:1:2010:24B8:13E:820000:0:0:0: "


    "Example2
    #EXTM3U
    #EXTINF:0,DVB-T
    http://ip:port "


    I have record my problem http://www.youtube.com/watch?v=tq4rI_BatBk
    Thanks :331:

  • Your links look good, expect one thing I forgot to tell:


    You have to remove this from your *.m3u:


    #EXTM3U


    If this entry is inside of the m3u, the plugin willnot read the URL correct.


    Second point, if you convert the stream, I doubt it is DVB compliant.


    BTW: What is a VPS server?

  • I fix now and i now can play stream from other dreambox :hurra:
    " #EXTINF:0,Dreambox
    http://192.168.1.105:8001/1:0: 1:2010:24B8:13E:820000:0:0:0: "
    I fix and other play list(dvb-t) But that not fix a problem. I think plugin not working with that kind stream of type :loudly_crying_face:
    VPS means Virtual Private Server. Stream goings strait from dvb-t so means video is not converted. If you can and want to help, i can send play list to pm.


    Thanks.

  • Hi, cool


    If the stream then doen´t play, it isn´t DVB-conform!

  • No, please no PM, other people are also thankful to read those inforamtions.
    Regarding DVB-T, you are talking about VPN connections.
    What do you do exactly?
    Do you use MuMu-DVB to forward the streams as multicast or Unicast?


    OT:
    BTW, I also use DVB-T receiption from another country through VPN, but I use the vtuner concept. That means in the remote location there is a an unbuntu PC with an DVB-T USB stick. On this PC the vtunerd deamon is started. On my dreambox I have startet the vtunerct client.
    If you bridge the two netowrks, also the broadcast packets will come through and the client detects the vtuner server and connects. On my dreambox I can handle the DVB-T services as a usal local tuner...

  • I try explain . In Lithuania running PC with windows xp + usb dvb-t and i streaming one transponder with 10 channels one time. Its simple help and works with vlc. That's the vlc config.
    "C:\Program Files\VideoLAN\VLC\vlc.exe" dvb-t:// :dvb-frequency=762000000 :dvb-bandwidth=8 :programs=1,2,3,4,5,6,7,8,9,10 :sout=#duplicate{dst=std{access=http,mux=ts,dst=serverip:port},select="program=1",dst=std{access=http,mux=ts,dst=serverIP:port},select="program=2",dst=std{access=http,mux=ts,dst=server ip:port}, ...
    In Ireland i have playlist
    "exmple1
    #EXTINF:0,Chanel 1
    http://serverIP:port
    #EXTINF:0,Chanel 2
    http://serverIP:port "

    So that playlist i can play on PC with vlc or Dreambox with media player.
    But doesn't work with IPTV plugin.

  • Sehr interessantes Plugin. Vielen Dank. :)


    Jetzt habe ich eine Backup-Lösung wenn die beiden Tuner meiner 8000er belegt sind. Bei ARD bzw ZDF HD sehe ich leichte Ruckler bei Kameraschwenks. Liegt das am Streamer oder am Stream?

  • Simbav: I think the PMT is missing in the stream, that could be the reason. As I already told, the stream MUST be 100% DVB-compliant. Otherwise I doubt it will work. Maybe you should change to MuMuDVB. There I know the streams will be forwarded DVB-compliant. Believe me I would like to help, but I fear I can´t.


    @tom04: Die Schwenks sind sicher vom IPTV stream. Wenn dann würde es pixeln oder blocken.