Open Source Streaming Solution

  • 26.02.2012
    task-tools-xp32bit.zip (tasklist, taskkill) added which are missing on XP Home Users.
    extract and store the files "tasklist.exe" and "taskkill.exe" in your C:\Windows\System32 folder. Otherwise you can't "stop" the vlc process from the webpage.


    yet another update AGAIN and AGAIN AND AGAIN 06.08.2012
    fixed issues :
    [list=1]
    [*] fixed the starting of vlc on Linux because it was reintroduced in last version.
    [/list=1]


    yet another update AGAIN 2.08.2012
    fixed issues :
    [list=1]
    [*] Player dimensions added
    [*] renamed player-width setting to video-width
    [*] changed how the jwplayer is embeded for flv playing
    [*] added several setting to jwplayer eg. rewinding, autostart
    [*] added a skin to jwplayer
    [*] fixed player to 16:9 dimensions to fix anamorph video streams
    [*] added stretching options selection for flv playing in jwplayer
    [*] added default stretching option in config.php
    [*] Bouqet => Bouquet typo's fixed
    [/list=1]


    yet another update 24.07.2012
    fixed issues :
    [list=1]
    [*] IE Saveing of Options
    [*] fixed the repost problem after accessing the webinterface when saved options in same session
    [*] fixed the starting of vlc on Linux
    [*] some code added to get a request timeout faster if box doesn't respond on webapi
    [*] some gui changes
    [*] removed the player-height setting so the ratio of the video should be automatically fixed
    [*] minimum selectable video rate option changed from 200 to 100
    [*] added some security for the FLV Stream (see details below)
    [/list=1]
    Regarding the added security for the FLV Stream
    I have protected the flv stream now with a username + password.
    Sadly IE has to enter the username + password manually ! ... I HATE YOU M$ and your browser! All other browsers should use the parameters from the video request itself.


    the Username and Password can be set in config.php

    Code
    define("LOCAL_USERNAME","streaming");
    define("LOCAL_PASSWORD","test");


    or leave it blank to remove it completly e.g. if you only browsing in local web or vpn:

    Code
    define("LOCAL_USERNAME","");
    define("LOCAL_PASSWORD","");




    another update 13.07.2012
    fixed issues :
    [list=1]
    [*] fixed issue where the vlc streaming port wasn't used from the config
    [*] webinterface and streaming port of the dreambox can now be set
    [*] added comment on how to set the dreambox url in case of http authetication on dreambox webinterface
    [*] added 2 sets of picons (for bright and dark background)
    [*] minor css change
    [*] removed the localhost ip check because it was not needed and could cause some problems on some pc's
    [/list=1]



    -----
    Letztes update
    Ich habe eine neue version hochgeladen in der folgendes verbessert wurde:
    [list=1]
    [*] auf mac/linux wurde vlc als "not running" angegeben obwohl es lief
    [*] auf ipone / ipad gab es keine möglichkeit nach dem anschauen eines streams zurückzugehen und das streamen zu stoppen da man immer wieder automatisch weitergeleitet wurde zur m3u8 datei.
    [*] ich habe einen check hinzugefügt der überprüft ob dateien/verzeichnisse beschreibbar sind
    [*] ich habe eine Überprüfung hinzugefügt ob der VLC Pfad richtig ist und VLC ausführbar ist
    [*] kleiner layout fix
    [*] pause bei stop hinzugefügt, sodass die streamfiles fürs iphone beim stop korrekt gelöscht werden
    [*] instructions + troubleshootings sind nun nicht mehr im zip damit sie öfter geupdated werden können.
    [/list=1]



    Latest update
    I have uploaded a new version this have beed fixed:
    [list=1]
    [*] on mac/linux it could be that vlc is running but had status not running
    [*] on ipone / ipad streaming it wasn't possible to go back after the video was displayed due to the forward to the m3ua file.
    [*] i have added a check if files/directories are writeable
    [*] i have added a check if the vlc excecuteable is found and executeable
    [*] minor layout fix
    [*] pause on stop so the iphone streaming files created before are correctly deleted
    [*] instructions and troubleshootings are not in the zip any more so they can be updated more often.
    [/list=1]



    Hier die anderorts schon erwähnte Open Source Streaming Lösung fürs Streamen von Enigma2/dreambox zu Iphone, PC, IPAD, jeglichen Andriod Handys und Tablet und Blackberry Playbook.


    Durch die Variablen Optionen ist es möglich selbst über 3g live TV auf mobilen geräten zu genießen, oder auf Geräten die keinen TS Codec besitzen aber Flash beherrschen (z.B. Blackberry Playbook).


    Was man bekommt seht ihr in den Bildern. Selbst getestet habe ich auf Iphone, Ipad(2+3), Android Handy, Blackberry Playbook, MAC und Windows PC.


    Was man benötigt:
    - Einen PC der genügend CPU Power hat zum Live transcodieren (ähnlich wie bei der Airvido Lösung) SD Channels sollten kein Problem sein HD Channels benötigen schon etwas mehr CPU
    - einen Webserver + PHP5
    - VLC Version > 1.2a noch besser gleich 2.02 (nighlty build)


    Anleitung.txt im Zip File.


    Dies ist eine Proof of Concept Version (schaut also am besten nicht unbedingt in den grausamen Code). Ich hoffe dass sich daraus ein größeres Open Souce Projekt entwickelt und mehrere daran weiterentwickeln. Ich habe schon begonnen die "richtige" Version zu programmieren. Und werde das Yii Framework nutzen, aber noch ist die Entwicklung erst am Anfang und ich hoffe, dass sich einige Entwickler finden die dies zusammen Programmieren.


    weitere Entwicklungsmöglichkeiten wären:
    - multi sat box
    - epg mit timer setzen
    - bouquet editor
    etc


    Mein großes Ziel ist es, dass das transcodieren auf einem Nas (habe eine Synology 712+ die eigentlich genug Power haben sollte SD Kanäle in niedriger Qualität zu transcodieren) oder dem Raspberry Pi (wenn der entsprechende codec herausgegeben wird) läuft.


    Wenn ihr mir helfen wollt mein Ziel zu erreichen könnte ich hier hilfe gebrauchen. Denn ich schaffe es immer noch nicht VLC für mein NAS zu compilieren.


    Siehe http://www.synology-forum.de/s…tml?27553-Vlc-compilieren


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


    in english:
    Here is open source streaming solution mentioned in the airvideo thread.
    It enables you the possibilty to stream your live tv programe from your dreambox/enigma2 to any device (e.g. iphone, ipad, PC, every Andiod phone or tablet and also to the blackberry Playbook) and because of the variable options this is also possible if you only have a 3g connection.


    In the Pictures you can see the result of the running iphone version. I have tested the streaming on Iphone, Ipad(2+3), Android Handy, Blackberry Playbook, MAC and Windows PC.


    What you need:
    - a strong pc (at least for SD channels) SD should be no problem for most cpu's
    - a webserver with php5
    - vlc installed of version > 1.2a or 2.02 (nightly build)


    instructions.txt in the zip file


    This is only a proof of concept version. I hope that out of this a open source project is started with several developments.
    I have already started developing the "real" version with usage of the Yii Framework (currently at an early stage) and i hope some other developers will be willing to develop together.


    future extensions could be:
    - multi sat box switching
    - epg with timer settings
    - boquet editor etc.


    My goal after this version is to get the transcoding to a NAS (I have a Synology 712+ which should be powerfull enough to transcode some sd channels in lower format) or the Raspberry Pi (if the codec is realsed some time)


    If you want to help me reach my goal see the link below, because i have still problems to cross compile vlc for my Nas. (thread in german).


    http://www.synology-forum.de/s…tml?27553-Vlc-compilieren



    info 26.02.2013
    as Dave-C mentioned that his streaming process can't be stopped the problem was that he was using WinXP "home" where the tools tasklist.exe and taskkill.exe aren't available from windows itself. This tools are only available on XP professional and later. (Windows 7 etc. aren't affected as far as i know)
    So if you have XP Home just download the "task-tools-xp32bit.zip" extract and store the files "tasklist.exe" and "taskkill.exe" in your C:\Windows\System32 folder.



    changed: 23:28
    - log.txt and troubleshooting.txt added
    - webintferace port option added
    - htaccess rewrite condition fixed if rewrite module is not enabled.

  • Example Vhost settings
    Example Vhost settings




    Troubleshooting (meistens nur Linux und Mac)

    Verzeichnisse die Änderungsrechte durch den Webserver benötigen
    'cache' und 'stream'


    Dateien:
    - log.txt (wird im streaming hauptverzeichnis angelegt wenn logging angeschaltet)
    - /settings/stream_settings.ini (dort werden die streamsettings gespeichert)


    Ausführbare VLC Datei
    der Webserver oder der User auf dem der Webserver läuft braucht natürlich Ausführrechte auf die VLC Excecuteable (wenn also vlc nicht gestartet wird liegt es am Pfad oder den Rechten)


    also gegebenfalls per chmod schreibrechte geben oder falls man garnicht weiß mit welchem Nutzer der Webserver läuft chmod 777 auf die Dateien.
    -------------------------
    in english


    troubeshooting webbrowser:
    wamp is per default setup to ownly allow access from the same pc. So if other devices should be able to access it:

    - click on the W icon -> Apache -> httpd.conf and search for a list
    - search for a section like

    Code
    <Directory "c:/development/wamp/www/">
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
    </Directory>


    where the path is your directory where you installed your wamp.
    There you have to add either:


    Code
    Allow from all


    to allow everyone access to it, importent if you want to access from the internet without vpn.


    or

    Code
    Allow from 192.168.1


    where 1 is your subnet, so all devices in your homenet have access to it.
    so the result will be

    Code
    <Directory "your install path">
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
    Allow from 192.168.1
    </Directory>


    Save and restart the service via "Restart all services".


    troubleshooting write and excetute rights:
    Directories which must be writeable through the webserver:
    'cache' and 'stream'


    Also the files
    - log.txt (which will be generated in the streaming root directory if logging is enabled)
    - /settings/stream_settings.ini (where the streaming settings are stored)


    execute rights to vlc excecuteable
    You webserver must have the rights to open the vlc process otherwise it cannot be startet (if vlc is not started it is normaly the wrong path setting or access permissions)



    so you have to give the webserver write access to these files and diretories. If you don't know on which user your webserver runs you can also give chmod 777 rights to this files.

  • Auf Macintosh nutzt man MAMP ind dort legt man normalerweise die HTML und PHP Dateien in das htdocs Verzeichnis.


    Bei Aufruf von http://localhost/streaming bekomme ich aber keine Verbindung (config.php habe ich geändert).


    Ist es normal dass in folgenden beiden Zeilen zweimal dasselbe steht:


    Code
    //define("localhostip","192.168.5.34"); // your ip of the server running the webserver if http://localhost/ is used
    define("localhostip","192.168.5.34"); // your ip of the server running the webserver if http://localhost/ is used (where the transcoding and webserver is running)


    Und müsste es in folgender Zeile nicht RUNNING_SYSTEM heissen:


    Code
    define("RUNNIG_SYSTEM","apple");


    Edit: es geht jetzt, ich hatte den Default Port geändert im MAMP Setup.


    Edit 2: umschalten kann ich schon mal, aber wenn ich den stream starten will erhalte ich folgende Fehlermeldung: "Video not found or access denied. http://::1:VLC_STREAMINGPORT/livestream.flv"


    Den Port des Webinterface habe ich umgestellt (und das in der config Datei auch angegeben sonst würde das Interface ja nicht erscheinen). Den Streaming Port habe ich aber nicht verändert (ich weiss noch nicht mal ob das möglich ist).

  • Zu 1.)
    a es ist normal das da 2x die gleiche Zeile steht. Ich hab die config.php oftmals auf mehreren Rechnern probiert und wollte nicht immer großartig Editieren. Die erste Zeile ist auskommentiert



    Zu 2.)
    define("RUNNIG_SYSTEM","apple"); narf auch noch nen Tippfehler :winking_face: tststs
    aber linux ist schon richitg. Da es beim Aufruf + Beenden von VLC zwischen Mac und Linux keine Unterschiede gibt hab ich es zwischen der Unterscheidung ob Windows oder nicht Windows belassen.


    Es ist nur dazu da damit ich das ganze auch vom Windows zum Linux server kopieren kann ohne wiederum alles zu editieren zu müssen.

  • OK, hab ich auf linux zurückgestellt, aber soll man RUNNING nun verbesseren oder nicht?


    Wieso klappt das Streamen bei mir nicht?


    Anscheinend ist der Streaming Port bei mir doch umgestellt (auf 8001). Ich habe es mit der Dreambox Live App kontrolliert und jetzt auch in der config Datei umgestellt.


    Streamen klappt aber immer noch nicht.

  • ne das RUNNIG_SYSTEM kann so bleiben, das wird nur an einer stelle als fallback genutzt und ich habs dort genauso geschrieben.


    Was kommt denn bisher? Wird das Boquet der Box angezeigt?
    Wie sehen deine VLC settings aus?
    Und wohin streamst du? direkt aufs iphone oder erstmal nur pc?


    VLC Pfad Einstellungen in der config richtig ?
    Wird VLC gestartet wenn du auf 'Start' klickst?


    Ich nehme an dein Webserver hat keine Rechte vlc aufzurufen also auch noch +x Rechte auf deine VLC executeable geben für den User auf dem der Webserver läuft.

  • Bouquets werden angezeigt und vorerst will ich nur mal auf PC stremmen.


    So sieht der VLC der config bei mir aus:


    Code
    case 'linux':
            define("VLC_PATH","/Applications/Video/VLC.app/Contents/MacOS/VLC");
            define("VLC_EXECUTEABLE","VLC");
            define("VLC_STREAMINGPORT","8001");
            break;


    Ich habe VLC (Version 2.1) in einem Verzeichnis namens Video in meinem Application Verzeichnis. Das Executable einer Mac OS App liegt immer in Contents/MacOS in dem App Bundle (so habe ich es auch bei AirVideo angegeben).

  • Zitat

    Originally posted by Carbonide
    Hmm.. da .flv angezeigt wird, müsste da nicht das Flash Plugin benutzt werden (VLC wird nicht gestartet).


    vlc wird zum transcodieren benutzt. Für PC, Android und quasi alle nicht Iphone Apple geräte wird der Videostream zu flv transcodiert und eben mit flvplayer direkt im Browser angezeigt.


    Wenn du also keinen VLC Prozess siehst der gestartet wird wenn du auf start klickst fehlen die Execute Rechte, sprich der Webserver kann dein VLC nicht starten (oder die Pfadangabe ist falsch).


    Wenns nicht weiter geht mal das logging in der config anschalten STREAMING_DEBUG auf true setzen.
    Eventuell mußt Du dann erstmal eine log.txt im /streaming verzeichnis anlegen mit "touch log.txt" falls der Webserver keine Rechte hat die log.txt Datei zu erstellen. Dann einfach mal chmod 777 auf die Datei machen (dann hat der Webserver auf jedenfall schreib rechte) dann nochmal starten und dann suchste darin mal den VLC Aufruf wo vlc gestartet wird.


    Den eventuell dann einfach mal in einer Shell ausführen (dann siehst du ob vlc irgendwleche probleme hat) und im browser auf den showvideo button klicken wenn vlc normal läuft dann sollte dort das Video auch kommen.


    Wie gesagt ich nehme an der Webbrowser hat keine Rechte zum Aufrufen. Oder die php Funktion exec ist nicht erlaubt oder hat nur beschränkte Rechte.


    Da ich selbst keinen Mac und deinen Webserver + Konfiguration nicht kenne kann ich da auch nicht unbedingt weiter helfen.

  • Ich habe mal die Log-Datei Erstellung aktiviert. Hat problemlos geklappt (da scheinen keine Schreibrechte Probleme zu existieren).


    Hier ein Auszug:


    Code
    21:30:20 (index page=live&channel=http://192.168.0.14:1038:8001/1:0:1:4 ...


    Da ich sowohl den Webinterface- als auch den Streaming-Port umgestellt habe werden beide der IP Adresse zugefügt.


    Das müsste also noch ein Bug im Streaming Server sein, oder nicht?

  • Code
    http://192.168.0.14:1038:8001

    da kann schonmal was nicht stimmen woher kommt die :1038 ?


    eine channel angabe sieht zb. so aus

    Code
    http://192.168.5.32:8001/1:0:1:445D:453:1:C00000:0:0:0:


    bei dir sind aber 2 port angaben?
    :1038 und :8001 ?


    Ich habe bei meiner Enigma Box das PKT Image am laufen. Was kommt denn wenn du im Webinterface (das deiner Dreambox) per Browser das Streaming startest?
    Er lädt doch dann eine stream.m3u herunter. Speicher diese mal und vergleiche mal die channelangabe. Diese muß die gleiche sein, ansonsten kann vlc natürlich nichts empfangen.



    Dabei fällt mir ein, auf dem Webinterface der Box ist kein Passwort oder?
    Das oben ist aber definitiv falsch.

  • Hmm hab jetzt schon 2x versucht eine PM zu schicken? funktioniert das nicht? Oder laden die PM's erst später im sent ordner?
    jedenfalls:


    ich nehme mal an deine DREAMBOX_URL ist folgende :
    define("DREAMBOX_URL","http://192.168.0.14:1038");


    und nicht
    define("DREAMBOX_URL","http://192.168.0.14");


    wenn ja liegt es daran, dann muß ich noch eine Kleinigkeit ändern. Denn ich habe nicht gedacht, dass jemand den Port des Webinterfaces der Satbox von 80 auf irgendwas anderes abändert.
    Denn ich erstelle die streaming links aus eben dieser Url und den daten aus dem boquet.

  • First of all thank you for this appreciated software. I have got some problems.


    1) I read the instructions and installed WAMSERVER then edited my Dream ip and local ip in C:\Program Files\wamp\www\streaming\settings\config.php file


    2) My VLC is installed as default which is as in the config file. I mean it's in C:\\Program Files (x86)\\VideoLAN\\VLC Thus I did not touch it.


    3) I am successfully connected WAMSERVER (it's green at the taskbar). To check If I am really connected I left-click on it and select localhost then IE automatically opens the main page as you can see attached picture. But once I click streaming folder over mainpace it's giving me error message as you can see attached. What possibly am I doing wrong?


    Regards.

  • Aber dein Rechner steht doch im gleichen Netzwerk? Du mußt normalerweise den Port nicht ändern nur an der Firewall einen Port außen auf den jeweiligen Port innerhalb umleiten.


    Nichts desto trotz hab ich geschwind die Änderung gemacht.
    es gibt ein neues Setting in der config.php


    in deinem fall dann
    define("DREAMBOX_WEBINTERFACE_PORT",":1038");


    Du mußt eigentlich dann nur die dreambox.class.php austauschen (aus dem zip welches ich gleich neu hochlade) und obiges setting in die config.php hinzufügen.


    So file neu hochgeladen mit der Änderung dass man nun auch den port des webinterfaces angeben kann.



    ----
    eozen81 can you check if you have modules enabled by rightclick the wamp icon in the taskbar (lower right a W icon). The icon should be green otherwise there was some error starting apache or php or mysql.


    But i guess in your case its is that some modules are not enabled in the apache.
    As i am also developing other things on this webserver it could be that i have enabled them and forgot about them.


    Please left click on the W icon in the lower right and check if the modules are enabled (by a hook in front) for the modules
    Apache -> Apache Modules


    modules to check:
    expires modules
    include module
    mod deflate
    auth basic module


    or just make some screenshots of the menue.
    You can also look in the Apache error log and the PHP error log which is also accessible through that menues.

  • Zitat

    Aber dein Rechner steht doch im gleichen Netzwerk? Du mußt normalerweise den Port nicht ändern nur an der Firewall einen Port außen auf den jeweiligen Port innerhalb umleiten.


    Leider besitzt mein Router nur Port Forwarding und keine Port Translating Funktion.


  • Hi again.


    1) W icon is green. No problem about that.
    2) But you are right about one module which was not ticked "expires modules". I have clicked that and restarted W then boom. Now I can see my bouquets from my PC as well.
    3) But once I try to stream a channel I am getting below error message. What do you think about that? My VLC version is : 2.0.1

    • Offizieller Beitrag

    Hab auch kurz mal eingerichtet unter Linux inkl. Stream auf
    ein Android Phone.


    Hab noch nicht so viel getestet, aber läuft wirklich schon klasse :winking_face:

  • Zitat

    Original von eozen81


    Hi again.


    1) W icon is green. No problem about that.
    2) But you are right about one module which was not ticked "expires modules". I have clicked that and restarted W then boom. Now I can see my bouquets from my PC as well.
    3) But once I try to stream a channel I am getting below error message. What do you think about that? My VLC version is : 2.0.1


    Ok now I have unistalled my VLC and installed a nightly build from web site and boom, now I can easily stream through my PC.


    PS : Even though you use 64 bit this above link works (do not get fooled with win32 word on the adress)


    NOW The only problem :


    Why even in my home wi-fi I can not open my local host which is 192.168.1.11/streaming whereas I can open it without any problem with my wired connected PC?