Vb.Net Take snapshot of streaming webcam video (over internet) - vb.net

I have a video streaming of a security webcam. I'd need to take screenshots at a as high as possible resolution at regular intervals.
Option 1 would be to fullscreen the video and take regular screenshots and save them but I'd have the computer busy and couldnt work on it anymore.
Option 2 would be to somehow capture the webstream, and extract a screenshot from the stream.
Are there any better otpions? How could i capture screenshots from the stream?
Thanks

Here is some code that can help you taking a screen shot and automatically saving it. OPTION 1.
Dim screenShot As New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb)
Dim g = Graphics.FromImage(screenShot)
g.CopyFromScreen(0, 0, 0, 0, screenShot.Size)
g.Dispose()
screenShot.Save("C:\test.bmp")
You could put this in a timer or something and just add like the date or an incremented number to the end of the file name.
For option 2 you might have to resort to some third party program to be able to do what you want. As far as I know, the only way to get a capture of your screen is to have it visible. Maybe I'll poke around at it. You've got me curious now.

Related

How do I delay video from my webcam on my own feed?

Id like to have the ability to delay the video from my webcam on. my own computer. Honestly I am using. it. as a "delayed mirror" for my golf swing. I have always recorded, then stopped, opened up the file and watched then did it again. Doing this 30 times in a session working on my swing is annoying. Id like to just take a webcam, be able to delay the video 5,8,10 seconds so I can watch and just keep moving. what is the easiest way around this. I have been told I could do this with a script but not sure where to start. Can anyone help me or send me in the right direction? Im on a Mac but also have a PC if needed.
Python + OpenCV.
First manage to show a current image from your webcam using tutorials.
Then instead of immediately showing the image you add it at the end of a buffer object, this could be a collections.deque from standard Python.
If you want to delay for say 5 seconds and you're capturing with 30 frames per second, then don't show anything until you add 5*30 images from your camera to the buffer. Now when you filled the buffer as soon as you get another image, you add it to the end of the buffer, but also remove 1 image from the beginning of the buffer and show it.

Visual Basic Windows media player: Changing current time

Im using a trackbar to change the current time position of the video displayed on a windows media player.
The trackbar maximum value is whatever the length (in seconds) of the video is.
So i need help with how to change the current time on a windows media player.
I am not having difficulty i just need to know how to do it.
Im not sure if there are several ways to embed windows media player into vb, so im just gonna clarify that i didnt install/download anything i just used the one that came with windows media player.
Use The currentPosition property of CtlControls.
player.Ctlcontrols.currentPosition = CDbl(10.4)

VB.Net automate flash in WebBrowser

I've passed many hours searching the web for a solution to something which seems obvious, but without results.
I need to automate a task in a Flash application running on my intranet.
I can't change the Flash application nor do I have access to the source code.
it's not a Flash movie but an application.
I can't download the swf.
I'm using a WebBrowser in a form. The Flash app is displaying without issues.
So far, I have been able to automate the task (clicking on some buttons, then inputting text and finally saving the results on a server). It works but it's not clean at all because I use hard-coded timers to wait a given action is done and then I click on very specific point at given coordinates in the application.
What I would like to do:
Avoid hard-coded timers. the Flash application takes some time to display all elements on the window (from 20 to 60+ sec). I would like to be able to detect when all elements are loaded. I tried to retrieve the text of the windows handle, but while I can retrieve the Flash hwnd, I can't retrieve the content (through messages).
In brief, instead of waiting 60sec (and not being 100% sure it's enough), if the last element to load in the Flash app has "ABC" written in it, I would like to detect it's displayed so that I can continue the sequence (click on the next button).
I'm using VB.net. Any hints to achieve that would be appreciated.
Lol. I am trying to do the same thing but with no results. You can try to see if there are POST/GET codes that can help you if the application has an online nature. Other than that you can only simulate clicks, because flash can't be easily interacted with. This is why most of the things are going to swap with HTML5 now.

Sending key stroke to front application in Cocoa?

I was wondering would this be hard to do; I have a barcode reader for my isight (mac webcam) (evoBarcode). At the moment, the program reads the barcode fine and adds it to a text field at the side of the application. Event when in the background, the application continues to run and read barcodes which is fine.
I was wondering, is it easy to send the result from this (I have already located the exact variable where the barcode is caught) to the front application as a keystroke? (the front application being textEdit or something.
I've tried searching around for a bit and found CGRemoteOperation, but havn't found a great lot of resources or examples on it.
Any ideas?
Thanks.
Depending on the reader behaviour another option could be to implement a service menu item. That way you don't mess with the clipboard.

Record Silverlight 4 MediaElement content

At the moment I'm working on a project. Which contains streaming from an IP camera to the Silverlight 4 MediaElement. The stream that goes through the MediaElement, needs to be cut when a button is clicked.
So is it possible to record MediaElement's content on demand? When that's done, write the recorded part of MediaElement to disk.
If it is possible, what's the most efficient way to do this?
Thank you in advance,
AFAIK, extract part of the entirely video, you can just use a program which has record screen function to record silverlight video on demand. Then you just play the video and use it to start recording from desired beginning and finish recording at intended ending. Thus you will get demand content.