video-capture

Android: Video recording output orientation flipped

Deadly 提交于 2019-11-26 23:41:58
问题 I have developed an app that can record video. When the recording starts the video is recorded in a rotated orientation. The video view while recording is flipped to the left. I cant figure out why its like that. Can someone help me with this issue. My codings are as follows: MainActivity.java: import android.app.Activity; import android.media.CamcorderProfile; import android.media.MediaRecorder; import android.os.Bundle; import android.os.Environment; import android.view.SurfaceHolder;

openCV: How to split a video into image sequence?

寵の児 提交于 2019-11-26 23:15:38
问题 Using opencv, how can one split a video into an image sequence? How can i split it so that the output will be a sequence of images? 回答1: For my surprise, I couldn't find an answer to this question on StackoverFlow. I'm currently using OpenCV 2.1 . This might be a little old but it works like a charm. The program will read an input file and create a sequence of images on the current folder named *frame_xx.jpg* #include <stdio.h> #include <stdlib.h> #include "cv.h" #include "highgui.h" int main

Capture iOS Simulator video for App Preview

泪湿孤枕 提交于 2019-11-26 21:12:28
Okay, so we can now submit video previews of our apps on the App Store. According to Apple we should do so with an iOS8 device and OSX 10.10. The problem is you have to have all the different devices (4", 4.7", 5.5" and iPad). Is there an alternative to this? I am thinking of capturing a video of the simulator. The problem is the device screen is bigger than my FullHD monitor when shown in 100% resolution. Any solution that can capture a video right from the simulator in full resolution? Edit: Since a lot of people are answering questions I'm not asking let me say: - Recording one device size

Sending message to background script

有些话、适合烂在心里 提交于 2019-11-26 20:57:12
I am trying to implement a screen sharing web application that will use the desktopCapture Chrome API to display the users screen on a web page. I have created the chrome extension and have an event listener running in the background. My problem is when I try to send a message from the web page to the extension (to get the userMedia id) I am not receiving anything on the extension side. I am also trying to return the getUserMedia id back to the webpage to display the feed. I have attached what I have. Thanks Manifest { "name": "Class Mate Manifest", "description": "Extension that allows for

How to apply filter to Video real-time using Swift

你离开我真会死。 提交于 2019-11-26 19:12:55
问题 is possible to apply filter to AVLayer and add it to view as addSublayer ? I want to change colors and add some noise to video from camera using Swift and I don't know how. I thought, that is possible to add filterLayer and previewLayer like this: self.view.layer.addSublayer(previewLayer) self.view.layer.addSublayer(filterLayer) and this can maybe create video with my custom filter, but I think, that is possible to do that more effectively usign AVComposition So what I need to know: What is

Creating thumbnail from local video in swift

£可爱£侵袭症+ 提交于 2019-11-26 18:53:55
问题 How to create thumbnail in swift from a local video file ? For example if the video file path is located here : file:///Users/Dev/Library/Developer/CoreSimulator/Devices/F33222DF-D8F0-448B-A127-C5B03C64D0DC/data/Containers/Data/Application/4BC62DBF-0108-453C-9324-5BC0E356FE24/tmp/trim.059D11E6-F0EF-43DB-9E97-CA4F1F95D6B6.MOV Thank you. 回答1: Translated with some edits from: First frame of a video using AVFoundation var err: NSError? = nil let asset = AVURLAsset(URL: NSURL(fileURLWithPath: "

Can use AVCaptureVideoDataOutput and AVCaptureMovieFileOutput at the same time?

痞子三分冷 提交于 2019-11-26 17:03:02
I want to record video and grab frames at the same time with my code. I am using AVCaptureVideoDataOutput for grab frames and AVCaptureMovieFileOutput for video recording. But can't work and get the error code -12780 while working at the same time but individual. I searched this problem but get no answer. Did anyone have the same experience or explain? It's really bother me for a while time. thanks. Tommy 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

Unable to read frames from VideoCapture from secondary webcam with OpenCV

三世轮回 提交于 2019-11-26 16:55:43
问题 Code: Simple example that works perfectly with primary webcam (device 0): VideoCapture cap(0); if (!cap.isOpened()) { std::cout << "Unable to read stream from specified device." << std::endl; return; } while (true) { // retrieve the frame: Mat frame; if (!cap.read(frame)) { std::cout << "Unable to retrieve frame from video stream." << std::endl; break; } // display it: imshow("MyVideo", frame); // check if Esc has been pressed: if (waitKey(1) == 27) { break; } // else continue: } cap.release(

2 usb cameras not working with opencv

谁说我不能喝 提交于 2019-11-26 16:42:36
I'm working on a project of computer vision and I need to use two cameras using opencv library. I tried this code but with two webcams from USB port it doesn't work while it works if I use one usb camera and the camera of my pc. CvCapture* capture[2]; capture[0] = cvCreateCameraCapture(0); capture[1] = cvCreateCameraCapture(1); if(!capture[0] && !capture[1]) printf("Webcam error\n"); I'm working on windows 7 on an acer aspire 5742g. Is it a problem of the bus of my computer? The cameras are 2 Philips SPZ2000. I tried also to work on the pictures taken by the one of them and from the camera on

openCV Error: Assertion failed (scn == 3 || scn == 4)

蓝咒 提交于 2019-11-26 16:35:20
问题 I am having Assertion failed error at the last frame , while reading and writing a video frame by frame. The errors only shows at the last frame, don't know why. saw this answer here, whichs suggests to give waitkey, my code already have wait key on it. my simple code is as follows int main() { CvCapture *capture=cvCaptureFromFile("C:\\vid\\op.mp4"); if(capture==NULL) { printf("can't open video"); } Mat frame, first_frame,current_frame; char buffer[100]; int frame_count=1,p=1; while(1) { /