video-capture

setOutputFormat called in an invalid state: 4 (where and why)

风流意气都作罢 提交于 2019-12-09 10:08:50
问题 I have the following code: Log.i("xx","A"); media_recorder = new MediaRecorder(); Log.i("xx","B"); media_recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA); Log.i("xx","C"); media_recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); Log.i("xx","D"); media_recorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP); Log.i("xx","E"); media_recorder.setVideoSize(320, 240); Log.i("xx","F"); media_recorder.setVideoFrameRate(15); Log.i("xx","G"); CamcorderProfile profile =

How to make screen capture video using Direct Show.net Library?

人盡茶涼 提交于 2019-12-09 07:18:28
问题 How to make screen capture video using Direct Show.net Library? I read msdn Direct show document and find the way to change video source device within the following code. This code got webcamera as video device. public IBaseFilter FindCaptureDevice() { int hr = 0; IEnumMoniker classEnum = null; IMoniker[] moniker = new IMoniker[1]; object source = null; // Create the system device enumerator ICreateDevEnum devEnum = (ICreateDevEnum) new CreateDevEnum(); // Create an enumerator for the video

How do I record video to a local disk in AIR?

心不动则不痛 提交于 2019-12-09 04:25:54
问题 I'm trying to record a webcam's video and audio to a FLV file stored on the users local hard disk. I have a version of this code working which uses NetConnection and NetStream to stream the video over a network to a FMS (Red5) server, but I'd like to be able to store the video locally for low bandwidth/flaky network situations. I'm using FLex 3.2 and AIR 1.5, so I don't believe there should be any sandbox restrictions which prevent this from occurring. Things I've seen: FileStream - Allows

IOS:Swift: Video Screen Capture

浪子不回头ぞ 提交于 2019-12-09 01:00:04
问题 What is the screen device called in iOS/Swift? When I print the devices I get ( "<AVCaptureFigVideoDevice: 0x134d0f210 [Back Camera][com.apple.avfoundation.avcapturedevice.built-in_video:0]>", "<AVCaptureFigVideoDevice: 0x134e0af80 [Front Camera][com.apple.avfoundation.avcapturedevice.built-in_video:1]>", "<AVCaptureFigAudioDevice: 0x174265440 [iPad Microphone][com.apple.avfoundation.avcapturedevice.built-in_audio:0]>" ) So where's the screen ID? There's just too much outdated objective c

OpenCV-Python cv2.CV_CAP_PROP_POS_FRAMES error

别来无恙 提交于 2019-12-08 19:53:28
问题 Currently, I am using opencv 3.1.0, and I encountered the following error when executing the following code: post_frame = cap.get(cv2.CV_CAP_PROP_POS_FRAMES) I got the following error Message: File "videoOperation.py", line 37, in pos_frame = cap.get(cv2.CV_CAP_PROP_POS_FRAMES) AttributeError: 'module' object has no attribute 'CV_CAP_PROP_POS_FRAMES' The code should be written in the following format when using OpenCV 2.x: post_frame = cap.get(cv2.cv.CV_CAP_PROP_POS_FRAMES) From opencv 3.0.0

Android record video into a circular buffer and storing it in RAM

梦想的初衷 提交于 2019-12-08 12:59:38
问题 Im looking for a easy way to record video (including audio) into a circular buffer stored in RAM. So I can leave the video recording it will keep the feed in RAM the last 2 minutes and then have the option to commit it to memory if required. Unfortunately, I cannot see an easy way to do this. So far I have investigated using: MediaRecorder - I could not see a way to store the output data in a buffer. Only option is setOutputFile() JavaCV FFmpegFrameRecorder - again the constructor for this

How to Record WebCam Video in MPEG or AVI files using C# Desktop Application

流过昼夜 提交于 2019-12-08 12:21:11
问题 I am developing a Desktop Application which requires me to connect to webcam(s) and record(save) the video in MPEG, AVI, MP4 and WMV formats and Burn into the CD/DVD. The application is in Win Forms. I am only Looking for free or open source solutions or controls. I had done saving as AVI using Aforge.Net but its taking more size to save(like 60-100MB for 15sce 320x240 Video ). I am expecting 1MB for 10sec. Here is the Code : using System; using System.Drawing; using System.Windows.Forms;

directshow RedenStream Fails for Capture

故事扮演 提交于 2019-12-08 11:52:03
问题 I am making an Directshow Application to Capture MP4 video. I use below graph to do so. Input Stream --> MJPEG Decompressor --> x264vfw H.264/MPEG-4 AVC Codec --> GDCL Mpeg-4 Multiplexor --> File Writer in my directshow application , i created the required filters and connect them on graph , at end i do file writer operation and redder stream using pin as capture. that part of my code is as below. GUID guid; guid = MEDIASUBTYPE_x264; hr = gcap.pBuilder->SetOutputFileName(&guid, gcap

Capture image from webcam and display it - OpenCV - Eclipse - Windows

我怕爱的太早我们不能终老 提交于 2019-12-08 08:17:06
问题 I'm new to OpenCV and I want to display what my webcam sees with OpenCV. I'm using the C Coding Language. I've tried with this code: #include <stdio.h> #include <cv.h> // Include the OpenCV library #include <highgui.h> // Include interfaces for video capturing int main() { cvNamedWindow("Window", CV_WINDOW_AUTOSIZE); CvCapture* capture =cvCreateCameraCapture(-1); if (!capture){ printf("Error. Cannot capture."); } else{ cvNamedWindow("Window", CV_WINDOW_AUTOSIZE); while (1){ IplImage* frame =

Best video codec to encode analog graph information / AVI

时光怂恿深爱的人放手 提交于 2019-12-08 08:14:41
问题 I have an application that captures analog measurements several times a second - to give you an idea how it looks like - here is a sample frame (obviously the curve changes as the measurements chage): alt text http://img829.imageshack.us/img829/3692/curve.png I need this application to record these frames into an AVI or any other video file that would be playable on windows without a custom codec. I've thought of just creating a huge animated GIF file but rewind/pause capability is a must.