raspberry pi live stream

  • Hallo :)

    Ich habe auf meinem Pi mjpg-streamer installiert, es funktioniert auch, mein problem ist nur wenn ich versuch das live video auf meiner website einzubetten...
    Mein test code ist folgender:

    Code
    [...]
    <body>
    	<iframe>
    		<img src="http://192.168.178.29:8080/javascript_simple.html"/>
    	</iframe>
    </body>
    </html>

    wenn ich die angegebene adresse direkt mit dem browser aufrufe bekomme ich das live bild...
    mit meiner einbettung aber nicht :/
    hat jemand von euch eine idee?
    lg tim
    :danke_ATDE:

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had."[1996] -Linus Torvalds (*1969) :geek: ~hehxes

  • Wo ist deine Webseite gehostet? Falls sie nicht in deinem internen Netzwerk läuft klappt es nicht. Du benutzt hier eine interne IP 192.168.178.* und kannst nicht von aussen darauf zugreifen. In diesem Falle musst du die statische IP von dir angeben, und externen Zugriff auf deinen Raspberry Pi zulassen.

    Einen Überblick meiner Projekte gibt es auf meinem Blog: lyinch.com

  • ja es ist bis jetzt ist es alles intern und soll es auch bleiben. ich habe das html dokument mit meinem notebook geöffnet was sich im selben netzwerk befindet. ich hatte ja auch geschreiben, das ich ein bild mit dem browser bekommen wenn ich http://192.168.178.29:8080/javascript_simple.html aufrufe.

    mein problem ist einzig und allein das einbetten in ein bestehendes html dokument :/

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had."[1996] -Linus Torvalds (*1969) :geek: ~hehxes

  • Rufe das iFrame einmal ohne den Port 8080 auf. Versuche eine andere HTML Datei einzubetten, und schaue ob dies klappt. iFrames sind keine schöne Art und Weise Probleme zu lösen. Wieso bindest du den Code nicht sofort in die aktuelle Webseite ein?

    Einen Überblick meiner Projekte gibt es auf meinem Blog: lyinch.com

  • ich gebe port 8080 an, weil der webcam server auch auf port 8080 läuft, und html standartmäßig port 80 abfragt, wenn ich mich da jetzt nicht total irre :D

    iframe ist raus, geht trotzdem nicht :D

    -----
    habe gerade auch mal den port auf 80 statt 8080 gesetzt, keine besserung :/

    Code
    [...]
    </head>
    <body>
    		<img src="http://192.168.178.29/javascript_simple.html"/> <!-- mjpg-streamer läuft jetzt auf port 80 -->
    </body>

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had."[1996] -Linus Torvalds (*1969) :geek: ~hehxes

  • Ja, der standart HTTP Port ist 80, 8080 wird oft als alternativer HTTP Port genutzt fir services wie in deinem Falle ein Stream oder Proxys. Das ist sehr komisch, dass das ganze nicht läuft. Schon mal einen anderen Browser versucht? Deine Seite bleibt einfach weiss? Ich würde ganz klassisch mal Appache neu starten

    Code
    sudo systemctl restart httpd

    Laut dieser Webseite, musst du unbedingt die höhe und breite im img tag angeben.

    Zitat

    The included Website (http://%7bname or IP-address of the Raspi}:8080) shows examples for how to connect a client to the Webcam stream. The easiest way is obviously a simple HTML page that works great with Google Chrome and Firefox but not so much with Safari. Anyways, it’s important to specify the width and height that was configured with the output_http.so, in the HTML as well

    Code
    <img alt="" src="http://phobos:8080/?action=stream" width="1280" height="960" />

    Versuche es mal mit dem GET befehl im Zitat so wie der Angabe von höhe und breite.

    Einen Überblick meiner Projekte gibt es auf meinem Blog: lyinch.com

  • mjpg streamer bringt seinen eigenen minimalistischen webserver mit, da brauch ich kein apache^^
    ich habe gerade gemerkt, das mjpg ausserdem bei mir im yuv format aggiert, und nicht wie normal im mjpeg...
    villeicht ist das der fehler.
    ich werde mal ein bisschen mit dem format rumspielen ;)

    danke für den tipp mit dem definieren der kantenlänge (y)

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had."[1996] -Linus Torvalds (*1969) :geek: ~hehxes


  • Der parameter -y ändert das Format von mjpeg in yuv


    ok habe den gerade rausgenomme, jetzt bekomme ich den fehler das meine cam das format nicht unterstützen würde :D

    ich probiere eine andere

    :danke_ATDE:

    es scheint an der webcam zuliegen... mit ner anderen geht alles wunderbar :/
    schade das die erste nicht geht...

    hast du ne idee warum ne normale webcam nicht in mjpeg aufnehmen kann?

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had."[1996] -Linus Torvalds (*1969) :geek: ~hehxes

    Einmal editiert, zuletzt von hehxes (27. Juli 2014 um 16:15)

  • ok, habe mich nochmal hingesetzt und mit den parametern rumprobiert, es geht jetzt auch mit der ersten cam :)
    danke für deine hilfe :)

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had."[1996] -Linus Torvalds (*1969) :geek: ~hehxes

  • Kein Problem. Es wäre jedoch gut, wenn du sagst was du gemacht hast, falls ein anderer das selbe Problem hat da sonst die Suchfunktion im Forum nichts bringt ;) (Ich will nicht wie ein Mod klingen, aber) Du kannst das Thema unten als "Erledigt" markieren.

    Einen Überblick meiner Projekte gibt es auf meinem Blog: lyinch.com


  • Kein Problem. Es wäre jedoch gut, wenn du sagst was du gemacht hast, falls ein anderer das selbe Problem hat da sonst die Suchfunktion im Forum nichts bringt ;) (Ich will nicht wie ein Mod klingen, aber) Du kannst das Thema unten als "Erledigt" markieren.

    stimmt :D

    hier meine befehle
    im terminal mit screen:

    Code
    sudo mjpg_streamer -i "/usr/local/lib/input_uvc.so -d /dev/video0 -n -y -r 320x480 -f 20" -o "/usr/local/lib/output_http.so -n -w /usr/local/www -p 80"

    im html dokument:

    Code
    [...]
    </head>
    <body>
     <img alt="stream" src="http://192.168.178.29/?action=stream" width="1280" height="960" />
    </body>


    (ist halt jetzt nur ganz billig gemacht, ich arbeite noch ein einer einbettung über frames :)
    zu empfehlen wäre auch : http://wiki.ubuntuusers.de/MJPG-Streamer

    :thumbs1:

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had."[1996] -Linus Torvalds (*1969) :geek: ~hehxes

Jetzt mitmachen!

Du hast noch kein Benutzerkonto auf unserer Seite? Registriere dich kostenlos und nimm an unserer Community teil!