video-capture

Video Delay/Buffer in Processing 2.0

亡梦爱人 提交于 2020-01-16 05:21:16
问题 I'm having a ton of trouble making a simple video delay in processing. I looked around on the internet and I keep finding the same bit of code and I can't get it to work at all. When I first tried it, it did nothing (at all). Here's my modified version (which at least seems to load frames into the buffer), I really have no idea why it doesn't work and I'm getting really tired of pulling out my hair. Please... please, for the love of god, please somebody point out the stupid mistake I'm making

Merge 2 image outputs (HDMI, DVI, VGA, or other) on one screen

[亡魂溺海] 提交于 2020-01-15 14:11:11
问题 I am looking for something uncommon: A device that would allow to merge the image coming from 2 outputs (HDMI, DVI, VGA or any other type of image output) into one final image displayed onscreen. The outputs can be of the same type (e.g. 2 HDMIs) or different, anything that works would do. In case that isn't clear, here is a simple schema: It could work in different ways, for example with a system of priority (e.g. output 1 write its image and the output 2 overwrite non transparent pixels),

Trying to encrypt video frames with RSA; getting garbage instead of original data after decrypting

一曲冷凌霜 提交于 2020-01-15 05:40:08
问题 I am writing a script to encrypt and decrypt video using RSA algo in python. Now I have extracted the frames from the video and encrypt each image individually and then combining the images to create a video. Then I am reading the frames of the encrypted video again and when I am applying the decryption key I am not getting back the original image. But when I am applying the same key on any image with which the video is made I am getting back the original image. let us say we have image1

SGNewChannel error -9405 on Mac 10.9.1

怎甘沉沦 提交于 2020-01-13 05:16:11
问题 I am getting an error –9405, couldntGetRequiredComponent , with SGNewChannel(m_Grabber, VideoMediaType, &m_Channel) on Mac system 10.9.1. This code works on older systems. Is anyone else having this issue? Edit - Initialization code: // standard SG initialization err = OpenADefaultComponent(SeqGrabComponentType, 0, &m_Grabber); err = SGInitialize(m_Grabber); err = SGSetDataRef(m_Grabber, 0, 0, seqGrabDontMakeMovie); 回答1: After spending some time reverse engineering what SGNewChannel does on

Pausing and restarting a video in Python

↘锁芯ラ 提交于 2020-01-10 05:19:26
问题 I have several video and I want to go through them frame by frame, and annotate some of them by pressing a keyboard key (which depends on the frame). For many of the frames I won't press any key. Here is what I have so far: import numpy as np import cv2 cap = cv2.VideoCapture('video.mp4') frame_number = [] annotation_list = [] i = 0 while(True): # Read one frame. ret, frame = cap.read() # Show one frame. cv2.imshow('frame', frame) # Set the time between frames in miliseconds c = cv2.waitKey

Copy consecutive frames from video

隐身守侯 提交于 2020-01-05 12:12:48
问题 I'm trying to copy a part of a video, and save it as a GIF into the disk. The video can be local or remote, and the copy should be 2s max. I don't need to save every single frame, but every other frame (12-15 fps). I have the "frames to gif" part working, but the "get the frames" part is not great. Here is what I tried so far: - MediaMetadataRetriever : too slow (~1s per frame on a Nexus4), and only works with local files - FFmpegMediaMetadataRetriever: same latency, but works with remote

Changing sampled video size

♀尐吖头ヾ 提交于 2020-01-04 15:28:04
问题 I am capturing a video using DirectShow Library (.NET), I have an analog device that outputs video through BNC, I connected it to a FrameGrabber hardware (http://www.videohome.com.tw/eng/products-detail.php?p_id=72&level1_id=18) connecting through USB to my computer, I was told that the analog device outputs the video at 720x576, however I get the video at 640x480, at the site it says the FrameGrabber does support 720x576. For the purpose of simplicity, I tried to do what's described next in

Record Video to External SD Card on Android

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 18:17:01
问题 I am trying to record video to an external SD card. However, everytime I try and acutally record the data -- I always get a java.io.FileNotFound exception. I was wondering if anyone knew of any tutorials or could help correct my code. Here is the class in which tries to record video public class VideoActivity extends Activity { private SurfaceView preview; private SurfaceHolder previewHolder; private String locationName; private String filepath; private File video; public void onCreate(Bundle

Video capture on Linux? [closed]

时光毁灭记忆、已成空白 提交于 2020-01-01 09:54:06
问题 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 8 years ago . We need to capture live video and display easily on Linux. We need a cheap card or USB device with a simple API. Anyone want to share some experience? 回答1: Use the video4linux library. I've used it with a c++ program and was able to capture webcam frames within about an hour. (Very easy to use and setup) 回答2: If

OpenCV error: (-215) scn == 3 || scn == 4 in function ipp_cvtColor

こ雲淡風輕ζ 提交于 2020-01-01 09:42:40
问题 I tried playing a video from a file, as given in the tutorials. My program was as follows: import numpy as np import cv2 cap = cv2.VideoCapture('output.avi') while(cap.isOpened()): ret, frame = cap.read() frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) cv2.imshow('outVideo',frame) if cv2.waitKey(1) & 0xFF == ord('q'): break cap.release() cv2.destroyAllWindows() But I got the following error: Traceback (most recent call last): File "playVideo.py", line 8, in <module> frame = cv2.cvtColor(frame