video-capture

OpenCV and GoPro - empty frames in VideoCapture stream

和自甴很熟 提交于 2019-12-05 15:40:12
I have a GoPro Hero 3+ (Black) which is connected to a video capture card (AverMedia Game Broadcaster HD). I simply want to get the video stream in OpenCV. With a Logitech Webcam there are no problems. The used code is below. VideoCapture cap; cap.open(0); waitKey(300); //cap.set(CV_CAP_PROP_FRAME_WIDTH, 1280); //cap.set(CV_CAP_PROP_FRAME_HEIGHT, 720); if (cap.isOpened()){ cout << "Cam identified" << endl; } namedWindow("dst", 1); while (1){ Mat frame; if (!cap.read(frame)) { std::cout << "Unable to read frame from video stream" << std::endl; continue; } imshow("dst", frame); [...] } With the

How to take a still photo in either DirectShow or Media Foundation

不想你离开。 提交于 2019-12-05 15:39:37
Is there a way to make a photo (still image) with either DirectShow or Media Foundation APIs? I got video capture working and I can just capture the very first frame and call it a day, but that's not what a photo is. Usually cameras have distinct video and photo modes, where photo mode allows for a lot greater resolution. For example, I have Logitech HD Pro Webcam C920 and it claims to allow to do 15mp photos. The software that came with it takes 5168x2907 photo images. So far I haven't seen any photo mode in DirectShow or Media Foundation, and the highest resolution I can take with that

Alternatives to DirectShow for video capture on Windows [closed]

亡梦爱人 提交于 2019-12-05 15:14:51
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I am looking at updating a program that currently uses DirectShow for video capture. While DirectShow seems to work well, I was wondering if there were any more powerful or up to date SDKs or APIs that I should look into. Some features that would be helpful would be ones that will: Provide a consistent framerate (33ms between frames for NTSC) during capture. Work with DirectShow compatible capture devices. Not

Saving video with overlay of GIF image

 ̄綄美尐妖づ 提交于 2019-12-05 15:10:38
I am working on an application in which I record a video. When recording finished I put a GIF image on it with use of Library . My code for playing video and putting gif image as an overlay self.avPlayer = [AVPlayer playerWithURL:self.urlstring]; self.avPlayer.actionAtItemEnd = AVPlayerActionAtItemEndNone; AVPlayerLayer *videoLayer = [AVPlayerLayer playerLayerWithPlayer:self.avPlayer]; videoLayer.frame = self.preview_view.bounds; videoLayer.videoGravity = AVLayerVideoGravityResizeAspectFill; [self.preview_view.layer addSublayer:videoLayer]; NSURL *url = [[NSBundle mainBundle] URLForResource:@

How to choose Full Frames (Uncompressed) as codec for VideoWriter

◇◆丶佛笑我妖孽 提交于 2019-12-05 13:55:25
i want to store uncompressed frames from a device as a video, but i need to know how to choose " Full Frames (Uncompressed) " as a codec for the VideoWriter (in emgu aka openCV). Iam able to choose it from the dropdown menu when iam passing -1 like this VideoWriter myVideoWriter = new VideoWriter ("myVieoColor.avi", -1 , 15, videoSize, true); But i want to choose the Full Frames (Uncompressed) codec automatically. For example i know i can choose the Lagarith Lossless Video Codec by VideoWriter myVideoWriter = new VideoWriter ("myVieoColor.avi", Emgu.CV.VideoWriter.Fourcc('L','A','G','S') , 15,

OpenCV (cv2 in Python) VideoCapture not releasing camera after deletion

痴心易碎 提交于 2019-12-05 08:32:16
I am relatively new to Python, just having learnt it over the past month or so and have hacked this together based off examples and others' code I found online. I have gotten a Tkinter GUI to display the feed from a webcam as a loop of continuously updated images on a canvas. Quitting the GUI and re-running the script every other time results in this error: Exception in Tkinter callback Traceback (most recent call last): File "C:\Python27\lib\lib-tk\Tkinter.py", line 1410, in __call__ return self.func(*args) File "C:\Python27\lib\lib-tk\Tkinter.py", line 495, in callit func(*args) File "C:\...

IKsPropertySet interface is not supported in IMFMediSource

♀尐吖头ヾ 提交于 2019-12-05 06:12:39
问题 I am porting my Direct Show camera based SDK to MFT. In my old code I have KSProxy interface like IksTopolgy,IKsControl and IKsProperty . IksTopolgy,IKsControl is used to enumerate the property set and IKsProperty to get/set the property value. Now I was trying to same in new code.I am able to enumerate the property i.e following code is supported in MFT. CComPtr<IKsTopologyInfo> ksTopology = NULL; hRet = m_pMediaSource->QueryInterface(&ksTopology); But IKsProperty interface which is used to

How to capture and record video from webcam using JavaCV

≡放荡痞女 提交于 2019-12-05 05:39:13
问题 I'm new to JavaCV and I have difficult time finding good tutorials about different issues on the topics that I'm interested in. I've succeed to implement some sort of real time video streaming from my webcam but the problem is that I use this code snippet which I found on the net : @Override public void run() { FrameGrabber grabber = new VideoInputFrameGrabber(0); // 1 for next // camera int i = 0; try { grabber.start(); IplImage img; while (true) { img = grabber.grab(); if (img != null) {

How to merge an Audio and Video files in Android

跟風遠走 提交于 2019-12-05 05:34:06
I have a small video clip and an audio file. The problem is how to write code to merge them into a single file. i have never written code for multimedia applications for android and don't know if the merging is possible with android media framework. Is there any third party library to do that? Can we right a merging code in Java and call it in Android? Please guide me through this. Thanks You can try INDE Media for Mobile, tutorials are here: https://software.intel.com/en-us/articles/intel-inde-media-pack-for-android-tutorials It has a sample demonstating how to substitute audio track in mp4

How to get file size of live video recording in android?

你。 提交于 2019-12-05 04:27:35
How can I get the video file size while recording a video in Android using a MediaRecorder ? String recVideoPath = Environment.getExternalStorageDirectory() + videoRecordedFileName; File file = new File(recVideoPath); long fileVideo = file.length(); More or less something like the one above. Put this in a thread, or where ever you are updating the UI currentPosition = (int) mediaPlayer.getCurrentPosition(); yourProgressBar.setProgress(currentPosition); I hope this helps :) 来源: https://stackoverflow.com/questions/10408133/how-to-get-file-size-of-live-video-recording-in-android