
I've got a machine running apache2/php5/mysql and motion at pi.fairfield.org.nz (ipv6 only outside our lan) In theory it should work, but it seems motion is ipv6 only. is there some way eg php script that I can have apache connect to localhost:8081 and just forward the raw data through to the browser? I set up two scripts webcam.php and webcam2.php that are supposed to do this, but neither seem to work (as far as I can test them; I won't have ipv6 at home until tomorrow). webcam.php is this; <?php $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_connect($socket, '127.0.0.1', 8081); $reply = ""; do { $recv = ""; $recv = socket_read($socket, '1400'); if($recv != "") { $reply .= $recv; } } while($recv != ""); echo($reply); ?> webcam2.php is this; <?php system(nc 127.0.0.1 8081); ?>

Could you just use a pipe to ffmpeg or similar and embed the stream from that on your page? Another way could be to use cambozola, as described on http://www.lavrsen.dk/foswiki/bin/view/Motion/TuningMotion and example from one of his cameras. Also see http://www.charliemouse.com/code/cambozola/index.html <applet width="320" height="240" style="border-width:1; border-color:gray; border-style:solid;" archive="cambozola.jar" code="com.charliemouse.cambozola.Viewer"> <param value="/cgi-bin/nph-mjprox?1" name="url"> </applet> Interesting question, I had been playing with zoneminder but application support for my webcam seems poor. Will give motion a try :) On 26 February 2013 21:19, Bruce Kingsbury <zcat(a)zcat.geek.nz> wrote:
I've got a machine running apache2/php5/mysql and motion at pi.fairfield.org.nz (ipv6 only outside our lan)
In theory it should work, but it seems motion is ipv6 only.
is there some way eg php script that I can have apache connect to localhost:8081 and just forward the raw data through to the browser? I set up two scripts webcam.php and webcam2.php that are supposed to do this, but neither seem to work (as far as I can test them; I won't have ipv6 at home until tomorrow).
webcam.php is this; <?php
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_connect($socket, '127.0.0.1', 8081);
$reply = ""; do { $recv = ""; $recv = socket_read($socket, '1400'); if($recv != "") { $reply .= $recv; } } while($recv != "");
echo($reply); ?>
webcam2.php is this; <?php system(nc 127.0.0.1 8081); ?> _______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug

Just as an aside, I got my camera working by using an image height that was divisible by 16 (eg 1280/900 or 640/480). If I understand it correctly this has to do with the built in analysis algorithms. zoneminder started working when I used the same res as motion, motion error reporting gave me the clue :) On 26 February 2013 22:48, Glenn Enright <glenn.enright(a)gmail.com> wrote:
Could you just use a pipe to ffmpeg or similar and embed the stream from that on your page?
Another way could be to use cambozola, as described on http://www.lavrsen.dk/foswiki/bin/view/Motion/TuningMotion and example from one of his cameras. Also see http://www.charliemouse.com/code/cambozola/index.html
<applet width="320" height="240" style="border-width:1; border-color:gray; border-style:solid;" archive="cambozola.jar" code="com.charliemouse.cambozola.Viewer"> <param value="/cgi-bin/nph-mjprox?1" name="url"> </applet>
Interesting question, I had been playing with zoneminder but application support for my webcam seems poor. Will give motion a try :)
On 26 February 2013 21:19, Bruce Kingsbury <zcat(a)zcat.geek.nz> wrote:
I've got a machine running apache2/php5/mysql and motion at pi.fairfield.org.nz (ipv6 only outside our lan)
In theory it should work, but it seems motion is ipv6 only.
is there some way eg php script that I can have apache connect to localhost:8081 and just forward the raw data through to the browser? I set up two scripts webcam.php and webcam2.php that are supposed to do this, but neither seem to work (as far as I can test them; I won't have ipv6 at home until tomorrow).
webcam.php is this; <?php
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_connect($socket, '127.0.0.1', 8081);
$reply = ""; do { $recv = ""; $recv = socket_read($socket, '1400'); if($recv != "") { $reply .= $recv; } } while($recv != "");
echo($reply); ?>
webcam2.php is this; <?php system(nc 127.0.0.1 8081); ?> _______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug

Weird thing with the pi, the cameras should support up to 1024x768 and can do that on a PC, but motion on the pi won't start with anything higher than 320x240. It's not a biggie, but I'm a bit curious why there's a limit. On 27 February 2013 00:34, Glenn Enright <glenn.enright(a)gmail.com> wrote:
Just as an aside, I got my camera working by using an image height that was divisible by 16 (eg 1280/900 or 640/480). If I understand it correctly this has to do with the built in analysis algorithms. zoneminder started working when I used the same res as motion, motion error reporting gave me the clue :)
On 26 February 2013 22:48, Glenn Enright <glenn.enright(a)gmail.com> wrote:
Could you just use a pipe to ffmpeg or similar and embed the stream from that on your page?
Another way could be to use cambozola, as described on http://www.lavrsen.dk/foswiki/bin/view/Motion/TuningMotion and example from one of his cameras. Also see http://www.charliemouse.com/code/cambozola/index.html
<applet width="320" height="240" style="border-width:1; border-color:gray; border-style:solid;" archive="cambozola.jar" code="com.charliemouse.cambozola.Viewer"> <param value="/cgi-bin/nph-mjprox?1" name="url"> </applet>
Interesting question, I had been playing with zoneminder but application support for my webcam seems poor. Will give motion a try :)
On 26 February 2013 21:19, Bruce Kingsbury <zcat(a)zcat.geek.nz> wrote:
I've got a machine running apache2/php5/mysql and motion at pi.fairfield.org.nz (ipv6 only outside our lan)
In theory it should work, but it seems motion is ipv6 only.
is there some way eg php script that I can have apache connect to localhost:8081 and just forward the raw data through to the browser? I set up two scripts webcam.php and webcam2.php that are supposed to do this, but neither seem to work (as far as I can test them; I won't have ipv6 at home until tomorrow).
webcam.php is this; <?php
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_connect($socket, '127.0.0.1', 8081);
$reply = ""; do { $recv = ""; $recv = socket_read($socket, '1400'); if($recv != "") { $reply .= $recv; } } while($recv != "");
echo($reply); ?>
webcam2.php is this; <?php system(nc 127.0.0.1 8081); ?> _______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug
participants (2)
-
Bruce Kingsbury
-
Glenn Enright