Indy Cam to Web - Howto

Indy Cam to Web - Howto

Post by Jason Sherr » Sun, 26 Jan 1997 04:00:00



Does any one have a way to link the Indy cam to the web?

I want to have the current video from the Indy Cam on a web page.  I have
seen this done before.  

If anyone has the CGI or whatever script please send it to me.

Thanks

 
 
 

Indy Cam to Web - Howto

Post by David Lilienth » Tue, 28 Jan 1997 04:00:00


: Does any one have a way to link the Indy cam to the web?
:
: I want to have the current video from the Indy Cam on a web page.  I have
: seen this done before.  

It's really quite easy. You need to use the program vidtomem which dumps
the input from the IndyCam (or which ever input source you specify) to an
rgb file.

Then you could use dmconvert to convert it to a jpeg or a gif -- then just
put it somewhere where you webserver can find it.

--
David Lilienthal                                http://xyu.ihug.co.nz/~djcult

+64 9 358 5067, extn. 742                                            Why not?

 
 
 

Indy Cam to Web - Howto

Post by Benny Simo » Tue, 28 Jan 1997 04:00:00



Quote:>Does any one have a way to link the Indy cam to the web?

>I want to have the current video from the Indy Cam on a web page.  I have
>seen this done before.  

>If anyone has the CGI or whatever script please send it to me.

        Yeah, I'm doing that .. sort of.  It's not sending live video or
        anything, but I'm using the IndyCam to take a snapshot everytime
        someone accesses a certain page.  Here's the script.  I have it
        setup so that it 'writes' the console so I know who is looking at
        me and then writes that to a log file.  I'm sure there's a more
        elegant way to do this, but I was in a hurry.

        If you want to see it working, check out http://lsb.syr.edu/labcam

#!/bin/sh

if [ -x photo.jpg ]
        then
        rm photo.jpg
fi
if [ -x /tmp/toto-00000.rgb ]
        then
        rm /tmp/toto-00000.rgb
fi

vidtomem -c 1 -z 1/2 -f /tmp/toto 2>/dev/null
/lsb/labcam/cjpeg /tmp/toto-00000.rgb > photo.jpg
echo "HTTP/1.0 200 OK"
echo "Content-type: image/jpeg"
echo
cat photo.jpg
echo "You're on candid camera!" > gotcha.log
date >> gotcha.log
echo $REMOTE_HOST >> gotcha.log
echo $HTTP_USER_AGENT >> gotcha.log
echo >> gotcha.log
cat gotcha.log | write root
cat gotcha.log >> labcam.log

---

   Online Portfolio (http://cartouche.syr.edu)
   "The angels fly because they take themselves lightly."

 
 
 

Indy Cam to Web - Howto

Post by Andrew Cleg » Tue, 28 Jan 1997 04:00:00



> : I want to have the current video from the Indy Cam on a web page.  I have
> : seen this done before.

> It's really quite easy. You need to use the program vidtomem which dumps
> the input from the IndyCam (or which ever input source you specify) to an
> rgb file.

> Then you could use dmconvert to convert it to a jpeg or a gif -- then just
> put it somewhere where you webserver can find it.

Summed up by the explanation at
http://home.netscape.com/fishcam/fishcam_about.html which also answered
the query I had about command-line IndyCam control. (Although thanks for
the replies on that thread folks.)

--
Andrew Clegg    0402 649008    http://www.warpfive.demon.co.uk/

"Satan! Satan! Satan! Satan! Satan! Satan! Satan! Satan!" - Orbital

 
 
 

Indy Cam to Web - Howto

Post by Walter Robers » Tue, 28 Jan 1997 04:00:00



:Does any one have a way to link the Indy cam to the web?

FAQ! Use vidtomem

If you search back through the comp.sys.sgi.* archives via
dejanews, you'll find complete scripts have been posted several times,
including one that uses a small deamon process to allow the images
to be fetched from a video server which might be remote from the
WWW server.

 
 
 

Indy Cam to Web - Howto

Post by Jason Sherr » Tue, 28 Jan 1997 04:00:00


Thanks, I have gotten a few responce and should be able to figure it out.

I will post the best of the four solutions.

Quote:

> Summed up by the explanation at
> http://home.netscape.com/fishcam/fishcam_about.html which also answered
> the query I had about command-line IndyCam control. (Although thanks for
> the replies on that thread folks.)

> --
> Andrew Clegg    0402 649008    http://www.warpfive.demon.co.uk/

> "Satan! Satan! Satan! Satan! Satan! Satan! Satan! Satan!" - Orbital

 
 
 

Indy Cam to Web - Howto

Post by Jeff Phillip » Tue, 11 Feb 1997 04:00:00


Here's another simple & quick script that will accomplish what you want.
Just put this in your /cgi-bin directory (and chmod 755) and you're off.

-Jeff

===============

#!/bin/sh
name=$REMOTE_HOST
cd /tmp
/usr/sbin/vidtomem -f $name
/usr/sbin/imgcopy ${name}-00000.rgb ${name}.jpg
echo Content-type: image/jpeg
echo
cat ${name}.jpg
rm -f ${name}.*


> : Does any one have a way to link the Indy cam to the web?

 
 
 

Indy Cam to Web - Howto

Post by Jeff Phillip » Tue, 11 Feb 1997 04:00:00


Here's another simple & quick script that will accomplish what you want.
Just put this in your /cgi-bin directory (and chmod 755) and you're off.

-Jeff

===============

#!/bin/sh
name=$REMOTE_HOST
cd /tmp
/usr/sbin/vidtomem -f $name
/usr/sbin/imgcopy ${name}-00000.rgb ${name}.jpg
echo Content-type: image/jpeg
echo
cat ${name}.jpg
rm -f ${name}.*


> : Does any one have a way to link the Indy cam to the web?

 
 
 

Indy Cam to Web - Howto

Post by Min Wan » Fri, 14 Feb 1997 04:00:00



> Here's another simple & quick script that will accomplish what you want.
> Just put this in your /cgi-bin directory (and chmod 755) and you're off.

> -Jeff

> ===============

> #!/bin/sh
> name=$REMOTE_HOST
> cd /tmp
> /usr/sbin/vidtomem -f $name
> /usr/sbin/imgcopy ${name}-00000.rgb ${name}.jpg
> echo Content-type: image/jpeg
> echo
> cat ${name}.jpg
> rm -f ${name}.*

Is there anyway to make it automatically updating, like playing movie?

--
Min Wang

http://www.colorbank.com/

 
 
 

Indy Cam to Web - Howto

Post by Andre Lodwi » Fri, 14 Feb 1997 04:00:00



> Is there anyway to make it automatically updating, like playing movie?

Not that nice, but this one should work:

#!/bin/sh
name=$REMOTE_HOST
cd /tmp

once_again:

/usr/sbin/vidtomem -f $name
/usr/sbin/imgcopy ${name}-00000.rgb ${name}.jpg
echo Content-type: image/jpeg
echo
cat ${name}.jpg
rm -f ${name}.*

sleep 600
goto once_again

You should add something to stop the thing,
like looking for a certain file.
sleep 600 waits for 10 Minutes, insert a value of your choice
that doesn't take too much CPU-time...

Hope that helps,

best,

Andre

--
----------------------------------------------------------------------
 Andre Lodwig
 Institut fuer Kommunikationsakustik             _/   _/    _/     _/
 Ruhr-Universitaet Bochum  (RUB-IKA)            _/   _/  _/      _/_/
 D-44780 Bochum                                _/   _/_/       _/_/_/
 Phone : +49 234 700 5387                     _/   _/  _/    _/    _/
 FAX   : +49 234 709 4165                    _/   _/    _/ _/      _/

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

 
 
 

Indy Cam to Web - Howto

Post by Andre Lodwi » Fri, 14 Feb 1997 04:00:00




> > Here's another simple & quick script that will accomplish what you

Uups, I did a little mistake...

I misunderstood the file from Jeff in that it does cat-ing the
picture to the caller.

The loop I intended to do would not work.

A picture file that is updated periodically is done this way:

#!/bin/sh
name=$REMOTE_HOST
cd /tmp

once_again:

/usr/sbin/vidtomem -f $name
/usr/sbin/imgcopy ${name}-00000.rgb what_you_want
rm -f ${name}.*

sleep 600
goto once_again

Sorry,

Andre

--
----------------------------------------------------------------------
 Andre Lodwig
 Institut fuer Kommunikationsakustik             _/   _/    _/     _/
 Ruhr-Universitaet Bochum  (RUB-IKA)            _/   _/  _/      _/_/
 D-44780 Bochum                                _/   _/_/       _/_/_/
 Phone : +49 234 700 5387                     _/   _/  _/    _/    _/
 FAX   : +49 234 709 4165                    _/   _/    _/ _/      _/

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