Jump to content

Remote Webcam viewer


Recommended Posts

Works Great, all it needs now is an option to start making screens in a folder, until there is a movement on the screen.

Well I guess & making it into a movie when no movement for lets say 5 min & put a link of the movie on the Site. well But I guess this is a bit too much to ask.

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

  • 1 month later...

can you fix this?

C:\Users\***\Desktop\webcam.au3(94,91) : WARNING: $WS_CHILD: possibly used before declaration.
$cap = DllCall($avi, "int", "capCreateCaptureWindow", "str", "cap", "int", BitOR($WS_CHILD,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\**\Desktop\webcam.au3(94,104) : WARNING: $WS_VISIBLE: possibly used before declaration.
$cap = DllCall($avi, "int", "capCreateCaptureWindow", "str", "cap", "int", BitOR($WS_CHILD, $WS_VISIBLE)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~^
C:\Users\***\Desktop\webcam.au3(94,91) : ERROR: $WS_CHILD: undeclared global variable.
$cap = DllCall($avi, "int", "capCreateCaptureWindow", "str", "cap", "int", BitOR($WS_CHILD,
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 2 months later...
  • 1 month later...

Nice examples, however, well, i know it's probably been done in some other programming/scripting language, but i was wondering...

is it possible to see an example script of streaming a webcam over TCP/IP to another computer, so the remote user sees my webcam video output, i know it's probably easy to do with some slide show, but that's not really streaming, surely not the same as msn live webcam etc

p.s. sorry if i use streaming the wrong way, it might actually be called something else for all i know.

AutoIT never fails to surprise me, keep up the good work, Many Thanks.

Link to comment
Share on other sites

Nice examples, however, well, i know it's probably been done in some other programming/scripting language, but i was wondering...

is it possible to see an example script of streaming a webcam over TCP/IP to another computer, so the remote user sees my webcam video output, i know it's probably easy to do with some slide show, but that's not really streaming, surely not the same as msn live webcam etc

p.s. sorry if i use streaming the wrong way, it might actually be called something else for all i know.

AutoIT never fails to surprise me, keep up the good work, Many Thanks.

Theoretically, all they are doing is sending binary data from the webcam to the friend, who then re-draws the image on the webcam screen.

Some algorithms are in place for compression / checking whether the image has updated, so it doesn't send unnecessary data.

Link to comment
Share on other sites

yea i kinda gathered that Streaming was basically just a fast slideshow, but i reckon they probably have some other way of doing it that's more direct, like opening TCP/IP ports, and connecting the data pretty much directly to it, not sure if it would be like pipes, or something

just a thought... i would guess maybe they create an object probably the same as the dllcalls in previous scripts, and then connect a property method or output or something from that object to the TCP/IP port

then maybe at the other end of the communication link, another object is created from the remote computers TCP/IP output

i would have thought everything is divided into so many more layers, just as TCP/IP has so that various layers can communicate directly to each other without having to worry about the complexities of other layers before it, except any errors that may be thrown out of it of course, errors which not detected (although might not actually help fix why the error occured) would prevent a script from hanging, crashing, or locking (hogging onto) devices etc

thanks for your input Guys, i hope to be able to add more to the above scripts, only to throw back for someone else to munch on some more :D

Link to comment
Share on other sites

Well, the OSI model really doesn't apply here. As a programmer on this level you can only work in the top two layers..

Although, the idea of opening a port directly and show the web cam directly is quite a good idea. I think the crucial part with this, if written in Autoit, is getting enough FPS to make it look like a real video.

And for the web browser part you'll probably need a plug in like Flash or Silverlight of some sort.

Link to comment
Share on other sites

  • 2 months later...

Hi All,

Based on the script provided here and TCP Server/Client UDP (Event-Driven) provided in another thread, I created a version of a remote webcam viewer with the ability to control from client such as

  • changing capture source from either webcam or desktop
  • change refresh rate of browser from either 1s, 3s (default) or 5s
  • pause and unpause capture
  • close the program remotely
Just run Server.au3 from the PC that you wish to monitor. Run Client.au3 from another PC and specify the IP of the PC running Server.au3 via Tray Menu.

Just point your client browser to h**p://Server-IP:6969 to view.

You need TCP.au3 (event-driven) for this to work.

Thanks..

Server.au3

Client.au3

TCP.au3

Link to comment
Share on other sites

  • 5 months later...

AJAX image update:

Just replace

If $recv <> "" Then
            $file = FileOpen($snapfile, 0)
            If $file <> - 1 Then
                $output = FileRead($file)
            EndIf
            FileClose($file)
        Else
            $output = '<html><meta http-equiv="refresh" content="' & $refresh & '"><center><img src="scrshot.bmp"/><BR>Time Stamp ' & @HOUR & ':' & @MIN & ':' & @SEC & '<BR></center></html>'
        EndIfoÝ÷ Û­«­¢+Ø$%%ÀÌØíÉرÐìÐìÅÕ½ÐìÅÕ½ÐìQ¡¸($$$ÀÌØí¥±ô¥±=Á¸ ÀÌØí͹Á¥±°Ð¤($$$ÀÌØí½ÕÑÁÕÐô¥±I ÀÌØí¥±°¥±ÑM¥é ÀÌØí͹Á¥±¤¤($$%¥±

±½Í ÀÌØí¥±¤($%±Í($$$ÀÌØí½ÕÑÁÕÐô$Ìäì±ÐìÌÌí=

QeA!Q50AU   1%ÅÕ½Ðì´¼½Í¼½Q!Q50иÀÄQɹͥѥ½¹°¼½8ÅÕ½ÐìÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹÜ̹½É½QH½¡Ñµ°Ð½±½½Í¹ÑÅÕ½ÐìÐìÌäìµÀì|($$$$$$Ìäì±Ðí¡Ñµ°Ðì±Ðí¡Ðì±ÐíµÑ¡ÑÑÀµÅÕ¥ØôÅÕ½Ðí

½¹Ñ¹ÐµQåÁÅÕ½Ð콹ѹÐôÅÕ½ÐíÑáн¡Ñµ°ì¡ÉÍÐõ%M<´ààÔä´ÄÅÕ½ÐìÐìÌäìµÀì|($$$$$$ÌäìØÀíÍÉ¥Áб¹ÕôÅÕ½Ðí)ÙMÉ¥ÁÐÅÕ½ÐìÐìÌäìµÀì|($$$$$$ÌäíÙȵ%ôÀìÌäìµÀì|($$$$$$Ìäíչѥ½¸UÁÑ

´ ¤í¥¡µ%¤í±ÉQ¥µ½ÕСµ%¤íµ%ôÀíõ½Õµ¹Ð¹ÍÉÍ¡½Ð¹ÍÉôÅÕ½ÐíÍÉÍ¡½Ð¹µÀüÅÕ½Ðì¬5Ñ ¹É¹½´ ¤íµ%ôÍÑQ¥µ½ÕÐ ÅÕ½ÐíUÁÑ

´ ¤ÅÕ½Ðì°ÌäìµÀì ÀÌØíÉÉÍ ¨ÄÀÀÀ¤µÀìÌäì¤í½Õµ¹Ð¹Ñ±µ¹Ñ å% ÅÕ½ÐíÑÍѵÀÅÕ½Ð줹¥¹¹É!Q50ôÑ ¤íôÌäìµÀì|($$$$$$Ìäíչѥ½¸MÑÉÑ

´ ¤íµ%ôÍÑQ¥µ½ÕÐ ÅÕ½ÐíUÁÑ

´ ¤ÅÕ½Ðì°ÄÀÀ¤íôÌäìµÀì|($$$$$$Ìäíչѥ½¸-¥±±

´ ¤í¥¡µ%¤í±ÉQ¥µ½ÕСµ%¤íµ%ôÀíõôÌäìµÀì|($$$$$$Ìäì±Ðì½ÍÉ¥ÁÐÐìÌäìµÀì|($$$$$$Ìäì±Ð콡ÐìÌäìµÀì|($$$$$$Ìäì±Ðí½ä½¹±½ôÅÕ½ÐíMÑÉÑ

´ ¤ÅÕ½Ðì½¹U¹±½ôÅÕ½Ðí-¥±±

´ ¤ÅÕ½ÐìÐì±Ðí¹ÑÈÐì±Ðí¥µ¹µôÅÕ½ÐíÍÉÍ¡½ÐÅÕ½ÐìÍÉôÅÕ½ÐíÍÉÍ¡½Ð¹µÀÅÕ½ÐìÐìÌäìµÀì|($$$$$$Ìäì±Ðí¥Ø¥ôÅÕ½ÐíÑÍѵÀÅÕ½ÐìÐì±Ðì½¥ØÐìÌäìµÀì|($$$$$$Ìäì±Ðì½¹ÑÈÐì±Ðì½½äÐìÌäìµÀì|($$$$$$Ìäì±Ð콡ѵ°ÐìÌäì($%¹%

could u post this again as i can't see the code on my computer...

thanks

Edited by yah
Link to comment
Share on other sites

  • 2 months later...

any ideea what i'm doing wrong?

Global Const $BITMAPINFOHEADER = "dword biSize;long biWidth;long biHeight;short biPlanes;short biBitCount;" & _
        "dword biCompression;dword biSizeImage;long biXPelsPerMeter;long biYPelsPerMeter;dword biClrUsed;dword biClrImportant;"
Global Const $BITMAPINFO = "ptr bmiHeader;ptr rgbquad"
Global Const $RGBQUAD = "byte rgbBlue;byte rgbGreen;byte rgb Red;byte rgbReserved"
$Width=320
$Height=240
$BitCount=24
Local $stride = BitAND(($Width * ($BitCount / 8) + 3) ,BitNOT(3))
$bi = DllStructCreate($BITMAPINFOHEADER)
DllStructSetData($bi,"biSize",DllStructGetSize($bi))
DllStructSetData($bi,"biWidth",$Width)
DllStructSetData($bi,"biHeight",$Height)
DllStructSetData($bi,"biPlanes",10)
DllStructSetData($bi,"biBitCount",$BitCount)
DllStructSetData($bi,"biSizeImage",$stride*$Height)
$rq = DllStructCreate($RGBQUAD)
DllStructSetData($rq , "rgbBlue" , 255)
DllStructSetData($rq , "rgbGreen" , 255)
DllStructSetData($rq , "rgbRed" , 255)
DllStructSetData($rq , "rgbReserved" , 0)
$BITINFO = DllStructCreate($BITMAPINFO)
DllStructSetData($BITINFO,"bmiHeader" , DllStructGetPtr($Bi))
DllStructSetData($BITINFO , "rgbquad" , DllStructGetPtr($rq))




DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_SET_USER_DATA, "int", DllStructGetSize($BITINFO), "ptr", DllStructGetPtr($BITINFO))

i added this to the code but changing any of the values appears to have no effect on the quality/dimensions/size of the video/screenshot

Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro

Link to comment
Share on other sites

  • 8 years later...
On 11.08.2008 г. at 3:08 AM, Chris86 said:

can you fix this?

 

 

C:\Users\***\Desktop\webcam.au3(94,91) : WARNING: $WS_CHILD: possibly used before declaration.
$cap = DllCall($avi, "int", "capCreateCaptureWindow", "str", "cap", "int", BitOR($WS_CHILD,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\**\Desktop\webcam.au3(94,104) : WARNING: $WS_VISIBLE: possibly used before declaration.
$cap = DllCall($avi, "int", "capCreateCaptureWindow", "str", "cap", "int", BitOR($WS_CHILD, $WS_VISIBLE)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~^
C:\Users\***\Desktop\webcam.au3(94,91) : ERROR: $WS_CHILD: undeclared global variable.
$cap = DllCall($avi, "int", "capCreateCaptureWindow", "str", "cap", "int", BitOR($WS_CHILD,

seems to me you forgot to #include <WindowsConstants.au3>

 

On 26.03.2009 г. at 2:33 PM, jvanegmond said:

Well, the OSI model really doesn't apply here. As a programmer on this level you can only work in the top two layers..

 

Although, the idea of opening a port directly and show the web cam directly is quite a good idea. I think the crucial part with this, if written in Autoit, is getting enough FPS to make it look like a real video.

 

And for the web browser part you'll probably need a plug in like Flash or Silverlight of some sort.

isn't there a way to skip most of the OSI stages and send the raw data from webcam to reciever program that decodes it and is considered as virtual hardware?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...