How can I capture the screen to be video using C# .NET?

This code uses SharpAvi available on NuGet. using System; using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; using SharpAvi; using SharpAvi.Codecs; using SharpAvi.Output; using System.Windows.Forms; namespace Captura { // Used to Configure the Recorder public class RecorderParams { public RecorderParams(string filename, int FrameRate, FourCC Encoder, int Quality) { FileName = filename; FramesPerSecond = … Read more

Capture iOS Simulator video for App Preview

For Xcode 8.2 or later You can take videos and screenshots of Simulator using the xcrun simctl, a command-line utility to control the Simulator Run your app on the simulator Open a terminal Run the command To take a screenshot xcrun simctl io booted screenshot <filename>.<file extension> For example: xcrun simctl io booted screenshot myScreenshot.png … Read more

What is the best method to capture images from a live video device for use by a Java-based application?

This JavaCV implementation works fine. CODE: import com.googlecode.javacv.OpenCVFrameGrabber; import com.googlecode.javacv.cpp.opencv_core.IplImage; import static com.googlecode.javacv.cpp.opencv_highgui.*; public class CaptureImage { private static void captureFrame() { // 0-default camera, 1 – next…so on final OpenCVFrameGrabber grabber = new OpenCVFrameGrabber(0); try { grabber.start(); IplImage img = grabber.grab(); if (img != null) { cvSaveImage(“capture.jpg”, img); } } catch (Exception e) { … Read more

Record Video of Screen using .NET technologies [closed]

There is no need for a third party DLL. This simple method captures the current screen image into a .NET Bitmap object. private Image CaptureScreen() { Rectangle screenSize = Screen.PrimaryScreen.Bounds; Bitmap target = new Bitmap(screenSize.Width,screenSize.Height); using(Graphics g = Graphics.FromImage(target)) { g.CopyFromScreen(0,0,0,0,new Size(screenSize.Width,screenSize.Height)); } return target; } I am sure you can figure out how to … Read more

2 usb cameras not working with opencv

The typical reason for 2+ USB cameras to not work together (still they might be working fine separately) is that USB bandwidth is insufficient for them both to run simultaneously. There is a bandwidth limit, which is rather low: The maximum throughput of an isochronous pipe (which is usually used for video) is 24MB/s. More … Read more

How to capture screen to be video using C# .Net?

This code uses SharpAvi available on NuGet. using System; using System.Drawing; using System.Drawing.Imaging; using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; using SharpAvi; using SharpAvi.Codecs; using SharpAvi.Output; using System.Windows.Forms; namespace Captura { // Used to Configure the Recorder public class RecorderParams { public RecorderParams(string filename, int FrameRate, FourCC Encoder, int Quality) { FileName = filename; FramesPerSecond = … Read more

Can use AVCaptureVideoDataOutput and AVCaptureMovieFileOutput at the same time?

I can’t answer the specific question put, but I’ve been successfully recording video and grabbing frames at the same time using: AVCaptureSession and AVCaptureVideoDataOutput to route frames into my own code AVAssetWriter, AVAssetWriterInput and AVAssetWriterInputPixelBufferAdaptor to write frames out to an H.264 encoded movie file That’s without investigating audio. I end up getting CMSampleBuffers from … Read more

OpenCV real time streaming video capture is slow. How to drop frames or get synced with real time?

My hypothesis is that the jitter is most likely due to network limitations and occurs when a frame packet is dropped. When a frame is dropped, this causes the program to display the last “good” frame which results in the display freezing. This is probably a hardware or bandwidth issue but we can alleviate some … Read more