Hi,
ich habe folgendes vor: Später auf einem 2WD-Car soll vorne ein Pan-Tilt-Kit mit einer picamera montiert sein. Die Steuerung der Kits und der Livestream soll am PC über ein PHP-Script "servocam.php" erfolgen. Das Python-Programm "servo.py" steuert die Servos an.
In der Vorstufes dazu teste ich erst einmal die Steuerung des Kits und die Livestream-Übertragung.
[code=php]<table width="300" border="0" align="center">
<tr>
<td><iframe src="http://192.168.178.27:9000/stream_simple.html"
width="320" height="240" align="center" ></iframe>
</td>
</tr>
</table>
<div align="center">
<?php
// Auswertung der get-Parameter
if(isset($_GET['horizontal'])) {
$command1 = $_GET['horizontal'];
$val = shell_exec("python servo.py 3 $command1");
}
elseif(isset($_GET['vertikal'])) {
$command2 = $_GET['vertikal'];
$val = shell_exec("python servo.py 4 $command2");
}
?>
<div align ="center">
<a href="<?php print($_SERVER['PHP_SELF']); ?>?vertikal=-100"
class="knopf_off" style="width: 100px"> Hoch</a>
<br>
<a href="<?php print($_SERVER['PHP_SELF']); ?>?vertikal=home"
class="knopf_on" style="width: 100px"> Vertikal Mitte</a>
<br>
<a href="<?php print($_SERVER['PHP_SELF']); ?>?vertikal=100"
class="knopf_on" style="width: 100px"> Runter</a>
<br>
---------------
<br>
<a href="<?php print($_SERVER['PHP_SELF']); ?>?horizontal=100"
class="knopf_on" style="width: 100px"> Links</a>
<br>
<a href="<?php print($_SERVER['PHP_SELF']); ?>?horizontal=home"
class="knopf_on" style="width: 100px"> Horizontal Mitte</a>
<br>
<a href="<?php print($_SERVER['PHP_SELF']); ?>?horizontal=-100"
class="knopf_off" style="width: 100px"> Rechts</a>
</div>[/php]
Aktuell hatte ich die Übertragung des Livestreams mit mjpg-streamer realisiert. Ich starte mjpg-streamer am Raspi und starte im firefox über http://RPi-IP:9000/servocam.php das Script. Darüber kann ich die Servos steuern und sehe den Livestream. Der läuft aber nicht unterbrechungsfrei.
Gibt es für die picamera eine streaming-Software, die unterbrechungsfrei einen Stream erzeugt und den ich dann in diesen <iframe> einbetten kann?
Da ich noch blutiger Anfänger bin, benötige ich eine einfache Beschreibung zum Verstehen (Tutorial).