video-capture

Video Recording using AVFoundation

强颜欢笑 提交于 2019-11-29 09:23:18
问题 I am trying to record video using AVFoundation. When I add video input only to the session, everything works fine but when I add an audio input to it, it stops recording the video.(Delegate method is called immediately after recording starts). Here is my code: -(void) recordVideo { self.session = [[AVCaptureSession alloc] init]; if([session canSetSessionPreset:AVCaptureSessionPresetMedium]) session.sessionPreset = AVCaptureSessionPresetMedium; CALayer *viewLayer = [self.cameraView layer];

Android - is there a way to define the video resolution when taking video from application?

假装没事ソ 提交于 2019-11-29 08:03:41
I am not familiar with android programming, I wish to know if there is a way to set the video resolution when it is filmed inside an android application ? Or, is there a way to reduce the resolution later. We need to reduce the file size of the video that we capture. Thanks Shani There are three things you can control to manage the resulting file size when recording video. All three are available as methods in MediaRecorder class: Frame size (width x height). Use method setVideoSize(int width, int height) . The smaller the frame size, the smaller the video file. Encoding bit rate - this

OpenCV: Reading image series from a folder

一曲冷凌霜 提交于 2019-11-29 08:01:16
I am trying to read a series of images from a folder using OpenCV's VideoCapture function. After some search on the internet, my current code is like this: cv::VideoCapture cap ( "C:\\Users\\Admin\\Documents\\Images\\%02d.jpg"); I was expecting to see that VideoCapture function should read all the images in that folder with names of two serial digits, like 01.jpg, 02.jpg, ..., 30.jpg . Someone told on the internet that the VideoCapture function should be ale to catch all of these images once I give the first image's location and name. So I also tried to do it like this: cv::VideoCapture cap (

How to open cv::VideoWriter in Android

岁酱吖の 提交于 2019-11-29 05:18:45
I'm using OpenCV 2.4.8 in Android using JNI. I opening the camera with VideoCapture and I want to record it. I have the image in a cv::Mat, it appear in the screen correctly. But, when I try to open VideoCapture, it returns false always. // Camera resolution is 640x480 and its fine. _camera_resolution = calc_optimal_camera_resolution(u.name, 640, 480); // Store in sdcard, I have permission in AndroidManifest.xml const char * videoName = "/sdcard/videoTest.avi"; // Segmentation fault 11! this method doesnt work in Android? so commented //const int ex = static_cast<int>(_reader.get(CV_CAP_PROP

OpenCV VideoWriter won't write anything, although cvWriteToAVI does

心不动则不痛 提交于 2019-11-29 04:46:05
I'm been trying to capture video from a cam and write it into an AVI file. I'm using Qt 4.8.2 with MSVC 2010 (x86) on Windows 7. I have 2 versions of the code: one using cv::Mat and the other using IplImage*. However, only the IplImage* version is working. Here's my code using cv::Mat: #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> using namespace cv; int main() { VideoCapture* capture2 = new VideoCapture( CV_CAP_DSHOW ); Size size2 = Size(640,480); int codec = CV_FOURCC('M', 'J', 'P', 'G'); VideoWriter* writer2 = new VideoWriter("video.avi",codec,15,size2); int a =

How to record a video in iOS

余生颓废 提交于 2019-11-29 04:18:44
问题 Hi I would like to record a video in iPhone through Objective-C. Can someone provide me the sample code to write my own code. I have no idea how to do it. And i need it in hurry. Any little help will be appreciated greatly. Thanks in advance. Regards Sohaib Qazi 回答1: AV Foundation Framework is the new way to record video and audio on iOS and Mac. http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/00_Introduction.html#//apple_ref/doc/uid

Avfoundation - Play and record video (along with audio and preview) simultaneously

旧街凉风 提交于 2019-11-29 03:46:34
问题 I am trying to record and play video simultaneously. Is this possible with avfoundation? Currently i am able to do it as long as i dont record audio. As soon as i add audio input to AVCaptureSession and restart the whole thing i receive "AVCaptureSessionWasInterruptedNotification" and recording stops. This is how i play video. MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:path]]; [moviePlayer.view setFrame:self.playerView

Video capture with 1:1 aspect ratio in iOS

烂漫一生 提交于 2019-11-29 02:40:13
I want to capture videos with iOS camera with 1:1 aspect ratio. I tried with UIImagePickerController, but it don't provide changing aspect ratio. Could anyone give me ideas? Additionally, iPhone app "Viddy" provides 1:1 aspect ratio video capturing http://gyazo.com/1ccba9990bb589961f1d5df23b71b84b.png?1364791668 Thanks! arunit21 GPUImageMovie* movieFile = [[GPUImageMovie alloc] initWithAsset:asset]; GPUImageCropFilter *cropFilter = [[GPUImageCropFilter alloc] initWithCropRegion:CGRectMake(0.0, 0.1, 1.0, 0.8)]; [movieFile addTarget:cropFilter]; GPUImageMovieWriter* movieWriter = [

How can i record the Android device screen? [closed]

北城以北 提交于 2019-11-29 02:25:17
I want to create an application that will enable the users to Capture Screen of their Android device. like any screen recorder software we used in pc please help me out Edit : 1 here Screen capture refers to Screen recording of device screen as video not snapshots of screen. thepoosh the only way to do that is with a rooted device. try reading this answer: Programmatic screencapture on mobile device EDIT 1: screen capture as video is the same is screen capture of only one image. EDIT 2: there are different apps that record video from screen such as Screencast and ShootMe . you can call them

Getting a snapshot from a webcam with Delphi

◇◆丶佛笑我妖孽 提交于 2019-11-29 00:17:13
I need to get a regular snapshot from a webcam in Delphi. Speed is not a problem (once a second is fine). I have tried demo code from based on stuff from http://delphi.pjh2.de but I can't get it to work. It compiles and runs OK but the callback function never fires. I don't have a real webcam but am running instead a simulator. The simulator works (I can see the video using Skype) but not with the test app. I don't really know where to start looking... Can anyone be bothered to try this code? (Apologies for the voluminous post - couldn't find how or if you can attach files - a zip file is