Questions tagged [video-capture]
Questions related to computer oriented video capture and the programming tools and solutions for dealing with captured frames from a video.
2,462
questions
-1
votes
0
answers
39
views
Multiprocessing version of OpenCV code not faster than the sequential version in Python
I'm working on a Python 3.11 project where I check for the average colour in each frame of an mp4 file.
I had this naive version:
def extract_colors(video: cv2.VideoCapture, frame_count: int, ...
0
votes
0
answers
20
views
Choose resolution of Image/Video capture C# Android 2023
Hi All I have created a simple android application using VS and Xamarin.Forms, Mediapicker.
I have managed to capture images and videos and save in various method but would like to know if there is a ...
0
votes
0
answers
14
views
how do I correct the AttributeError: module 'CV2' has no attribute 'videocapture'
I wrote a QR code scanner program using Python.There was no problem in the code but when I ran it,the camera light came on and then turned off.The error message: AttributeError: module 'CV2' has no ...
0
votes
1
answer
50
views
Python program becoming unresponsive after using Queue to update customtkinter CTkImage using opencv image feed
I'm trying to create a live video feed using a customtkinter CTkImage stored in a CTkLabel with the following code:
self.image_w = customtkinter.CTkImage(
light_image=Image.open(os.path....
-1
votes
0
answers
17
views
Video not being opened OpenCV
I am using Google Colab and I has appeared a problem iterating the frames of a video.It works with VSCode.
Here is an image of the code to see what I have done wrong
Google Colab code photo
...
0
votes
0
answers
16
views
Can a video be loaded/cached without playing it?
Is there a way to load or cache the video without having to play the video or skip through it.
youtube video. focus on the timeline
In YouTube for example, there are two lines on the timeline (it may ...
0
votes
0
answers
11
views
Gstreamer record webcam audio and video sync
I'm using Gstreamer to record audio+video from a webcam to a file, and their sync is off. I can see a delay in playback from the MKV file.
Can someone see a problem in my command?
C:\gstreamer\1.0\...
0
votes
0
answers
18
views
In camerax, video capture, preview view and image analyzer usecases not working together
While using Camerax, when I combine video capture, preview view and image analyzer usecases, preview becomes blank for android 12, but working on 11 and 13.
cameraProvider.unbindAll()
...
0
votes
0
answers
36
views
openCV format equivalent to gstreamer gray16-be
I have a device creating raw frames and placing them in memory pointed to as a uint32_t* that is allocated for the frame size. The data is packed bytes with no padding as 1460 pixels, 1920 lines and 2 ...
0
votes
0
answers
18
views
Error opening video file logged using codec H264 or hevc using Opencv VideoCapture
I opened a .avi video file and written to a new .avi using cudacodec videowriter using h264 and hevc code. It is successfully logged. Again while opening the logged video file using video capture ...
-2
votes
2
answers
59
views
Automatically take a picture from webcam source, then save it to files, with no user input
I want to Automatically take a picture from a webcam source, as soon as webcam access is granted from the browser, then save it to files, with no user input.
I have got the picture capturing sorted ...
0
votes
0
answers
26
views
opencv Video-capture can not opencv rtsp
when I was using a webcam and trying to get the rtsp stream with OPENCV::VideoCapture,but it always fails to open, I dont know how to deal with it...
Here is my code:
#include<iostream>
#include&...
0
votes
1
answer
30
views
OpenCV VideoCapture Unable To obtain Frame
I would like to achieve the requirement of obtaining real-time camera feed from the currently connected camera on a Windows operating system using C++ environment. However, after multiple attempts and ...
0
votes
1
answer
42
views
Can't parse a h265 stream
I'm trying to parse a stream from a h265 camera. The live555 library give me frames which I get in afterGettingFrame(). There I parse them to get NALUs by their header "0x00 0x00 0x00 0x01". ...
0
votes
0
answers
87
views
Opencv python high framerate issue
I'm trying to record a video (640 x 360 MJPEG) with this camera using python and opencv but i can't get to the camera rated FPS.
This is the snippet I'm currently using:
stream = cv2.VideoCapture(1, ...
1
vote
2
answers
41
views
Decreasing Frames extracted per sec in openCV with Python
I want to decrease the frames extracted. Currently the below python script extracts around 30 frames per sec but I want 12-14 frames extracted per sec.
How can I change the code to decrease it?
...
0
votes
1
answer
21
views
Windows Forms Video Capture to pictureBox Without Distortion
I am trying to get normal video output from my camera inside of my windows forms application. Since it was cropping the video output otherwise I am resizing it. I made the picture box size 640 to 360 ...
0
votes
0
answers
31
views
How set specific fps in opencv when reading camera
The camera has several modes, but you can only turn on one.
v4l2-ctl --list-formats-ext -d 2
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'MJPG' (Motion-JPEG, compressed)
Size: Discrete ...
0
votes
0
answers
44
views
Issues with v4l buffer cleaning
I've been trying to write a c program to capture photos from a uvc camera using v4l. I've managed to gt it to work for the most part but every second time i run the program i get a zero-filled yuv ...
0
votes
0
answers
15
views
How to get a video path in java android [duplicate]
I am working on an App that will upload videos to firebase, the issue is that I followed a certain tutorial to achieve that but the app cannot pick a video from my Android App even after giving all ...
1
vote
0
answers
30
views
What is the technically correct way to achieve A/V sync in an MP4 file?
I am working with a small header only mp4 library (minimp4) to write mp4 files consisting of AAC audio and HVEC video streams, and using FFmpeg/ffplay/ffprobe to inspect and play them. I am a bit ...
0
votes
0
answers
29
views
If cameraX's videoCapture and ImageAnlaysis are used together, the preview becomes strange. What should I do? & How can I draw on a video frame?
When cameraX's videoCapture and ImageAnlaysis are used together, the preview is rotated 90 degrees, and the recorded video in the gallery is longer than the actual length. why is this happening?
...
0
votes
2
answers
50
views
black and white video stream using html5 video and javascript
Is there a solution to stream a video ( live webcam ) in black and white continuously using javascript,
I want to test every single pixel if the average of rgb [(red + green + blue)/3] is higher than ...
1
vote
0
answers
327
views
How can I access a webcam on the host from inside a WSL2 environment? cap_v4l.cpp:1119 tryIoctl VIDEOIO(V4L2:/dev/video0): select() timeout
I'm running the following version of WSL
5.15.90.3-microsoft-standard-WSL2+
with Python 3 and OpenCV Version 4.8.0
This is the code which should open a window with the video stream captured by a ...
1
vote
0
answers
60
views
Add Effect for video recording in CameraX with CameraEffect
In CameraX version 1.3-beta01 there is the posibility of adding effects in video recording. Does anyone know how to add effects (using openGL I guess) using the 'CameraEffect' class?
I've trying to ...
0
votes
1
answer
86
views
Problems using OpenCvSharp library to capture images
I'm trying to use the OpenCvSharp library to capture images from a camera, but what happens is that I only get colored stripes that move on the screen (as shown in the images).
colored stripe
The code ...
0
votes
0
answers
20
views
Can we preview live cam output on Watch App that is paired with an iPhone App using Swift UI?
I am trying to show live cam preview on watch app also but didn't found a suitable solution. To show camera preview on iPhone, I am using AVfoundation. But also want to show live cam output on watch ...
0
votes
0
answers
46
views
OpenCV VideoWriter writes a problematic video
My simplified codes:
fource = cv2.VideoWriter_fourcc(*'XVID')
resulte = cv2.VideoWriter('vidname.avi', fourcc, 200, (720, 540))
while record:
image = retrieve frame from camera with pypylon
...
0
votes
0
answers
85
views
Capturing picam2 video stream to a properly formatted file
I am using picamera2 Python library on Raspberry Pi 3B+. My goal is to simultaneously record and stream video on the network. Since this library doesn't provide this simultaneous ability out of the ...
0
votes
0
answers
29
views
Formatting BufferedWriter output as an MP4 video file
I am writing a Python application in which I want to record an MP4 video from a Raspberry Pi camera. I created a variable rec_stream of type BufferedWriter and initialized video file creation:
...
0
votes
1
answer
153
views
Getting some errors when trying to recorde a video using CameraX VideoCapture API
i am implementing an android application and i am trying to record a video using CameraX VideoCapture Api but i am getting some errors and i would like to know to figure them out . Here is the video ...
0
votes
0
answers
53
views
How to convert image into DIB bitmap using dotnet cross platform libraries
I got a webcam that records Video and i wanna write it to a file.
While there are many libraries (mostly based on ffmpeg) that allow you to combine frames, i need a library that can be used to ...
0
votes
1
answer
98
views
How to read out a certain display screen area using Python/Tkinter? [closed]
Suppose that you are getting a live feed from a camera to your computer using a proprietary program, which is displaying e.g. a 1024x1024 pixel video to your screen. Would it be possible to write a ...
0
votes
0
answers
56
views
How do I use gstreamer to listen to AVTP packets and decode H264 data?
I am trying to use gstreamer to listen to AVTP packets from an interface and decode H264 data from it.
I have packets coming through an interface eno1, I ran this command0
gst-launch-1.0 avtpsrc ...
0
votes
1
answer
83
views
TCaptureDeviceManager getting video capture devices for multiple web cams
I have an application written in C++Builder 11.1.5, where I am trying to capture live video from 2 web cams.
There is an excellent tutorial which describes how to do this with 1 web cam at the ...
1
vote
2
answers
235
views
Is it possible to share encoded video across gstreamer pipelines using shared memory?
I'm looking to create a short-lived gstreamer pipeline to consume an encoded video stream generated by another, separate long-lived pipeline.
The intent is to connect to the primary pipeline ...
0
votes
0
answers
30
views
how do i fix a laggy code? I just started learning how to use OpenCV in Python and I'm not sure how to get my live video feed to run smoothly
Hello stackoverflow community. I think you folks are prolly the only ones I can turn to for expert advice or help for apart from chatGPT(but that's not really reliable is it). I started learning how ...
0
votes
0
answers
63
views
display frames from a saved video frame by frame with a time delay between each frame using OpenCV, none of the different methods I've tried work
I've been trying to display frames from a saved video at the keypress 'l' frame by frame with a time delay between each frame, none of the different methods I've tried seem to work. I've used so far ...
0
votes
0
answers
39
views
Cannot set resolution of camera with opencv in c++
I am running ubuntu 22.04 and opencv4 the following code, that I am compiling with:
// COMPILE: g++ -o sample sample.cpp `pkg-config --cflags --libs opencv4`:
#include <opencv4/opencv2/core.hpp>...
0
votes
0
answers
23
views
how to save video to local store with the help of camera package
i am using the camera package into my project i am able to click and save image into my local gallery but i m not able to save video
onLongPress: () {
setState(() {
videoIcon = true; ...
0
votes
0
answers
44
views
Send video stream from a webcam to a websocket in C
I'm trying to send the video stream from my webcam to a websocket in C. I've already etablish the websocket, but the video capture doen't work.
I'm trying to use mutex, but I get error during ...
0
votes
0
answers
32
views
video capture module not working properly in an opencv project
import face_recognition
import cv2
import numpy as np
import csv
import os
from datetime import datetime
video_capture = cv2.VideoCapture(0)
tata_img = face_recognition.load_image_file("photos/...
1
vote
1
answer
316
views
How to set frame rate in libcamera?
Here I mean the library, NOT the command-line tools such as libcamera-hello.
I made a simple program that is mostly same to the one in libcamera's official tutorial. However, the frame rate is kept to ...
-1
votes
1
answer
196
views
Precision of timestamps by ffmpeg based on framerate? [closed]
Here is my current command based on this answer:
ffmpeg \
-hide_banner \
-r $FRAMERATE \
-s $(((WIDTH + 63) / 64 * 64))"x"$(((HEIGHT + 15) / 16 * 16)) \
-f rawvideo \
-pix_fmt yuv420p \
-i - ...
0
votes
0
answers
12
views
How to capture bitmap image from video of camera gige industrial
private void BT_Chup_Click_1(object sender, EventArgs e)
{
PTB_Cam.Image = (Image)PTB_Cam.Image.Clone();
Bitmap AnhChup = new Bitmap(PTB_Cam.Image);
Bitmap AnhResize = new ...
0
votes
0
answers
21
views
Issue on the writing of the 6th subvideo with OpenCV while using Windows 10
I did a script in order to crop an original video in .mkv encoded in h264 into 6 differents subvideos by using opencv.
This script worked on my MacBook Pro but when I try to run it on my Windows 10 ...
0
votes
0
answers
112
views
Is there any function or way to create Direct3D11CaptureFrame from SoftwareBitmap in UWP C++/CX?
There is a SoftwareBitmap function CreateCopyFromSurfaceAsync() which is creating (Windows.Graphics.Imaging.)SoftwareBitmap from (Windows.Graphics.Capture.)Direct3D11CaptureFrame Surface. But is there ...
0
votes
1
answer
116
views
"lateinit property mediaRecorder has not been initialized" in Android Kotlin
I'm trying to build a simple recording app in Kotlin, but I'm having a lot of trouble when getting an error "lateinit property mediaRecorder has not been initialized".
I suspect this is ...
0
votes
0
answers
44
views
There was a problem with the process of turning images into videos using Python cv2 Help me
I thought I made a code to cut and save videos into images by frame, load all of those images, and make them into videos again. However, the results sometimes include a frame of photos that need to be ...
0
votes
0
answers
39
views
Combined non-blocking Webcam & Microphone Capture in Python
I would like to capture webcam video and microphone audio in sync to disk while performing affect recognition and annotation in real-time on each video frame (via the FER python library). The affect ...