capture

How to stream video from videogame to another computer in realtime?

吃可爱长大的小学妹 提交于 2019-12-12 22:46:11
问题 I just started coding an application, my idea is to create something like StreamMyGame but for personal use, there is already a project called Single Player Game Transmiter that achieves some of this (http://sourceforge.net/projects/spgt/files/). So far I'm not encoding nor streaming, I'm just capturing video and displaying it in my app window. So how could I handle encoding/streaming? I was thinking an UDP stream of raw JPEGs would be the easiest path but I'm not sure. Also how could I

Media Foundation onReadSample wrong size of returned sample

夙愿已清 提交于 2019-12-12 15:08:43
问题 I am working on translating a capture library from DirectShow to MediaFoundation. The capture library seemed to work quite well but I face a problem with an integrated webcam on a tablet running Windows 8 32 bit. When enumerating the capture format (as explained in Media Foundation documentation), I got the following supported format for the camera: 0 : MFVideoFormat_NV12, resolution : 448x252, framerate : 30000x1001 1 : MFVideoFormat_YUY2, resolution : 448x252, framerate : 30000x1001 2 :

Use avfoundation to capture image, but can not capture too quickly

邮差的信 提交于 2019-12-12 12:28:36
问题 I use avfoundation to capture images, but I can not capture too quickly(I set interval time to 0.1s). It says " NULL sample buffer". What is the problem? Thank you. [stillImageOutput captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler: ^(CMSampleBufferRef imageSampleBuffer, NSError *error) { CFDictionaryRef exifAttachments = CMGetAttachment( imageSampleBuffer, kCGImagePropertyExifDictionary, NULL); if (exifAttachments) { // Do something with the attachments. //

Received memory warning when capturing screen and save to video ios

对着背影说爱祢 提交于 2019-12-12 09:46:20
问题 I am now writing a program to capture screen and convert to video. I can successfully save the video if it is less than 10 seconds. But, if more than that, I received memory warning and application crash. I wrote this code as follow. Where am I missing to release data ? I would like to know how to do. -(void)captureAndSaveImage { if(!stopCapturing){ if (assetWriterInput.readyForMoreMediaData) { keepTrackOfBackGroundMood++; NSLog(@"keepTrackOfBackGroundMood is %d",keepTrackOfBackGroundMood);

How to make a capture screen app on Android

无人久伴 提交于 2019-12-12 04:24:31
问题 I want to make an app which can capture device screen without root as: https://play.google.com/store/apps/details?id=com.icecoldapps.screenshotultimate But I can't find the solution. Anyone help me? Thank you very much. 回答1: Programatically you can do so by executing the below command using adb: adb shell /system/bin/screencap -p /sdcard/img.png However to do the same from an application you can use the below method: Process sh = Runtime.getRuntime().exec("su", null,null); //getting superuser

DirectShow VB.net can't change recording format

做~自己de王妃 提交于 2019-12-12 03:14:42
问题 I'm using direct show to try and capture a webcam stream in to my vb.net program. Heres the subroutine running which works: Private Sub CaptureVideo() Dim hr As Integer = 0 Dim sourceFilter As IBaseFilter = Nothing Try GetInterfaces() hr = Me.CaptureGraphBuilder.SetFiltergraph(Me.GraphBuilder) Debug.WriteLine("Attach the filter graph to the capture graph : " & DsError.GetErrorText(hr)) DsError.ThrowExceptionForHR(hr) sourceFilter = FindCaptureDevice() hr = Me.GraphBuilder.AddFilter

How, using regex, can I capture the outer HTML element, when the same element type is nested within it?

微笑、不失礼 提交于 2019-12-11 23:52:57
问题 I'm trying to capture certain parts of HTML using regular expressions, and I've come across a situation which I don't know how to resolve. I've got an HTML fragment like this: <span ...> .... <span ...> ... </span> ... </span> so, a <span> element into which another <span> element is nested. I've been successfully using the following regex (in PHP's preg_match() / preg_match_all() ) to capture entire HTML elements: @<sometag[^>]+>.*?</sometag>@ This would capture a given starting tag and

How to reduce CPU consumption by using avconv and pipe it to avplay?

十年热恋 提交于 2019-12-11 23:31:21
问题 See FINAL EDIT. I need to capture the second monitor and show in main display in a small window. I don't need quality, but performance. So, the (working) command to capture second monitor of 1280x1024 and show it in a 640x480 window at 15fps and horizonatally flipped, would be (from askUbuntu): avconv -f x11grab -r 15 -s 1280x1024 -i :0.1 -c:v mpeg4 \ -b:v 1000k -s 640x480 -vf "hflip" -f avi - | avplay -i - How to scale with "None" interpolation? I used "-c:v mpeg4" and "-b:v 1000k" to have a

App crashes when image from gallery gets selected

℡╲_俬逩灬. 提交于 2019-12-11 18:09:36
问题 The camera function in my app really driving me in nuts !!! I have built an camera function in my app, but it crashed when I try to select the image from gallery. Bitmap photo; private static final int RESULT_LOAD_IMAGE = 1; private static final int REQUEST_IMAGE_CAPTURE = 2; ImageView imageView; private void activeTakePhoto() { // if select open camera Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE); }

How to capture http request/response traffic results

喜你入骨 提交于 2019-12-11 17:38:50
问题 I want to Capture Http Request/Response Traffic results(URL,Method,Type etc) with c# Windows Form App as manually. An Example : Run ie explorer-> Tools -> F12 Developer Tools->Network Tab-Star Capture How can I solve this problem. (Any use of the sdk. winpcap etc) How to trace a road? 回答1: Try the below: ... HttpWebRequest request =(HttpWebRequest)WebRequest.Create(HttpUtility.UrlDecode(<url>)); ... try { HttpWebResponse response =(HttpWebResponse)request.GetResponse(); WebHeaderCollection