Jump to content

Take webcam screenshot


Recommended Posts

Thats a very good advice.

How ever its not possible to my knowledge. My webcam is the only video device on my laptop and it is the default.

I think its driver is not closed properly which makes it unable to initialize in the first place.

Webcam.udf has close function, but it only closes what it opens. I need to close it 1st without opening it because i suspect it got stuck opened.

A script that would do just that would be awesome.

Link to comment
Share on other sites

Hi All,

Someone knows how to show color system option of webcam or video capture card?. I'm getting head ache with this such thing. I'm Using Webcam UDF and try Adjust Video Setting with this function:

Func _Webcam_AdjustVideo()
    Switch GUICtrlRead($VideoSource)
        Case "Video Source"
            DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DLG_VIDEOSOURCE, "int", 0, "int", 0)
        Case "Video Display"
            DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DLG_VIDEODISPLAY, "int", 0, "int", 0)
        Case "Video Format"
            DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DLG_VIDEOFORMAT, "int", 0, "int", 0)
        Case "Compression"
            DllCall($user, "int", "SendMessage", "hWnd", $cap[0], "int", $WM_CAP_DLG_VIDEOCOMPRESSION, "int", 0, "int", 0)          
    EndSwitch
EndFunc   ;==>_Webcam_AdjustVideo

In order to display video from external video capture card correctly i have to use other video capture software to switch color system PAL/NTSC. I appreciate someone who could help me to do this with my script...Thanks

[topic='27925']WebcamExample[/topic] || [topic='68866']WebcamUDF[/topic] || [topic='138222']DSShowCaptureFilter[/topic] || [topic='20121']ScreenResolutionChange[/topic] || [topic='139426']WebcamDS[/topic] || [topic='156613']ObfuscatorUTF8[/topic] || [topic='156219']VideoColorSystemPAL/NTSC[/topic] || [topic='31963']ExcelWindowsInGUI[/topic] || [topic='110473']4Webcam[/topic] || [topic='83763']RichEdit[/topic] || [topic='83763']RichEditUDF[/topic] || [topic='142384']RichEditLabel[/topic] ||[topic='96986']GUITFLabel[/topic] || [topic='32144']AccessCom[/topic] || [topic='38353']BetaPad[/topic] || [topic='31963']EmbeddedExcel[/topic]

Link to comment
Share on other sites

I get the same with testing, i dont need capture just view on screen so im sure it works

same as: dialog showing to select the device ? or same as: even if you select it, its still not working unless you oopen another program that uses webcam and THEN it will work fine after that.

Testing or no testing i dont see the difference.

If its not working on testing, it will not work ever.

 

Still looking for a resolution.

This is not a virus or anything like that, this is because script crashed at some point and did not close the driver (is what i suspect)

I dont know how to close it :(

Link to comment
Share on other sites

  • 3 months later...

I think i know why it happens.

Its not the driver, its the script.

Script is not closing open webcam driver correctly nor prior to opening it. Skype does.

Thats exactly why Skype makes your webcam to work again, because it will close the driver correctly.

I dont know how to close the driver correctly but am sure i know its the script problem, not the driver or your webcam.

I am too looking for a solution.

Driver needs to be closed before opening it, i dont know how to close driver that was not previously called to be opened by the script.

If you know you should try it first and let us all know

Thanks

Link to comment
Share on other sites

  • 8 months later...

Hello, everyone.

I believe I have found the reason for having the video source popup with Windows 7 /8... It relates to UAC and Run as Admin approach. If I run the script or compiled .exe as ADMIN, it always works AFTER I have initially selected a default device via that popup box. The good news is that the default device can be pre-configured, as it is simply a registry value in HKLM (which explains why if NOT run as admin - will never save the default selection via the popup, neither will succeed to read the registry if it is already setup)!!!

So this is what I have done to figure it out and being able to set the default capture device on other machines to successfully use the webcam UDF and never have the video source popup appear (just remember that it ONLY works when run as admin):

1. Run the script as Admin, got the popup to select a default device as expected (even with only one webcam present);

2. Clicked the OK button - script completed successfully;

3. Used regedit to open and navigate to:

    HKLMSYSTEMCurrentControlSetControlMediaResourcesmsvideoMSVideo.VFWWDM

    A new STRING (REG_SZ) Value was created, named "DevicePath" (without the quotes), and its DATA is:

    ?root#image#0000#{GUID}global

    ... where GUID is the unique ID of the webcam you have on your device. It can be verified/found in:

     HKLMSYSTEMCurrentControlSetControlMediaCategories{GUID}Name(REG_SZ)=Capture

     There are many GUID registry keys there, but the correct one has a VALUE "Name"=Capture

One good reference to point me in this direction was here:

http://stackoverflow.com/questions/10721085/webcam-video-source-dialog-comes-up

So at this point I don't think the script fails to close the dll or disconnect the driver after done...

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...
  • 2 years later...

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...