๐ŸŒ
OpenCV
opencv.org โ€บ home โ€บ news โ€บ reading and writing videos using opencv
Reading and Writing Videos using OpenCV
March 28, 2025 - Reading a video file requires processing each frame individually, and then displaying or storing it as needed. OpenCV provides the VideoCapture() function for this purpose, allowing users to load video files and access webcam streams in real-time.
๐ŸŒ
OpenCV
forum.opencv.org โ€บ uncategorized
OpenCV. How do you catch a real time frame from OpenCV Video Capture - Uncategorized - OpenCV
October 16, 2023 - Hello, I have a question about the following OpenCV code for reading videos. Iโ€™m working on a project that involves processing frames from a video using this code. From what I understand, when the video capture input is a video file, it processes the first frame before moving to the next one, resulting in a delay between frames.
Discussions

[Question] How to read livestream video from web server?
https://www.hackster.io/onedeadmatch/esp32-cam-python-stream-opencv-example-1cc205 cap = cv2.VideoCapture(URL + ":81/stream") Basically right click on the live feed from the webpage of the espcam example and copy paste the adress. More on reddit.com
๐ŸŒ r/opencv
3
1
May 9, 2024
How to display and read a live camera video in Python OpenCV - Stack Overflow
I've been working on a code from the Roboflow team that is suppose to display a live video capture and give it's predictions from the model that I trained, but I encounter an error. Get webcam inte... More on stackoverflow.com
๐ŸŒ stackoverflow.com
[Question] Compare image with real time video

I guess you need to know if the camera is stable, what is the lighting like, are you referencing an object in the reference image, is the reference image taken from the same camera? With no details given template matching. Feature detection the list can go on. If you have more details Iโ€™m happy to help if I can although Iโ€™m no expert

More on reddit.com
๐ŸŒ r/opencv
8
2
April 21, 2020
Any way to calculate disparity and depth map in realtime from live video feed in opencv?
doing stereo with a pair of static jpegs, a pair of frames from two videos or two live is exactly the same (for a strictly stereo method, that does not use temporal coherence, that is). Are you having issues with grabbing two live feeds at the same time? More on reddit.com
๐ŸŒ r/computervision
3
4
May 8, 2017
๐ŸŒ
LearnOpenCV
learnopencv.com โ€บ home โ€บ read, write and display a video using opencv
Read, Write and Display a video using OpenCV | LearnOpenCV
July 31, 2026 - In this post, we will learn how to Read, Write and Display a video using OpenCV. Code in C++ and Python is shared for study and practice. Before we do that, allow me a digression into a bit of history of video capture. On June 15, 1898, in Palo Alto, California, a remarkable experiment was conducted to determine whether a galloping horse ever had all four feet off the ground at the same time. This historic experiment by photographer Eadweard Muybridge was the first time a motion sequence was captured in real time.
๐ŸŒ
LearnOpenCV
learnopencv.com โ€บ home โ€บ image processing โ€บ reading and writing videos using opencv
Reading and Writing Videos using OpenCV | LearnOpenCV
October 15, 2025 - A video is nothing but a series of images that are often referred to as frames. So, all you need to do is loop over all the frames in a video sequence, and then process one frame at a time.
๐ŸŒ
OpenCV Q&A Forum
answers.opencv.org โ€บ question โ€บ 209740 โ€บ reading-captured-video-data-using-opencv-in-real-time
Reading captured video data using OpenCV in real-time - OpenCV Q&A Forum
March 3, 2019 - If you capture data using your ... it using OpenCV, you can load it and read it frame by frame using the VideoCapture() class. You will process every frame and the Total processing time = Avg. processing time of a frame * Number of frames. This approach is not suitable to evaluate real-time ...
๐ŸŒ
Note.nkmk.me
note.nkmk.me โ€บ home โ€บ python โ€บ opencv
Capture video from camera/file with OpenCV in Python | note.nkmk.me
October 19, 2022 - In Python, you can read, capture, and display video files and camera stream using the VideoCapture class with OpenCV. Note that Video I/O must be enabled in OpenCV to process video. OpenCV: cv::VideoC ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-play-a-video-using-opencv
Python | Play a video using OpenCV - GeeksforGeeks
December 4, 2025 - import cv2 # Load the video file cap = cv2.VideoCapture("video.mp4") # Check if the video opened correctly if not cap.isOpened(): print("Error: Could not open video file.") exit() # Read and display video frames while True: ret, frame = cap.read() if not ret: break # No more frames -> exit loop cv2.imshow("Video", frame) # Press Q to quit if cv2.waitKey(25) & 0xFF == ord('q'): break # Release resources cap.release() cv2.destroyAllWindows() ... Note : Video file should have in same directory where program is executed. ... VideoCapture() loads the video. ... Pressing Q exits the loop. After the video ends, OpenCV releases the video and closes all windows.
Find elsewhere
๐ŸŒ
DataFlair
data-flair.training โ€บ blogs โ€บ opencv-video-capture
Video Capture with OpenCV - DataFlair
April 3, 2024 - In this code example, we start by creating a VideoCapture object named `cap` to read a video file (โ€˜video.mp4โ€™). As we loop through the frames using cap.read(), the loop continues until frames are successfully read from the video. Each frame is displayed using cv2.imshow(), effectively creating a real-time playback of the video. This allows us to visually experience the dynamic content frame by frame. We control the loop using key presses; pressing โ€˜qโ€™ allows us to gracefully exit the loop and close the video capture using cap.release() and the OpenCV windows using cv2.destroyAllWindows().
๐ŸŒ
OpenCV
docs.opencv.org โ€บ 4.13.0 โ€บ dd โ€บ d43 โ€บ tutorial_py_video_display.html
OpenCV: Getting Started with Videos
Playing video from file is the same as capturing it from camera, just change the camera index to a video file name. Also while displaying the frame, use appropriate time for cv.waitKey(). If it is too less, video will be very fast and if it is too high, video will be slow (Well, that is how ...
๐ŸŒ
Reddit
reddit.com โ€บ r/opencv โ€บ [question] how to read livestream video from web server?
r/opencv on Reddit: [Question] How to read livestream video from web server?
May 9, 2024 -

Recently I'm interested in doing video processing on video live-streamed by ESP32-CAM on web server.

I knew how to read image and video from computer folder, but I don't know how to read video from web server.

Is there any example project or tutorial that teaches how to read and process live video from web server by ESP32-CAM using OpenCV, preferably in C++ language?

๐ŸŒ
MachineLearningMastery
machinelearningmastery.com โ€บ home โ€บ blog โ€บ how to read and display videos using opencv
How to Read and Display Videos Using OpenCV - MachineLearningMastery.com
January 30, 2024 - Digital videos are close relatives of digital images because they are made up of many digital images sequentially displayed in rapid succession to create the effect of moving visual data. The OpenCV library provides several methods to work with videos, such as reading video data from different ...
๐ŸŒ
Medium
medium.com โ€บ @betul.gurbuz.dev โ€บ video-basics-with-opencv-d130d56f9add
Video Basics with OpenCV. Connect OpenCV to a WebCam, Write aโ€ฆ | by Betul Gurbuz | Medium
March 23, 2024 - The project captures real-time images from a webcam using the OpenCV library and YOLOv8 model. It performs object detection on these images, applies various analytic processes, and displays the results on the screen.
๐ŸŒ
Roboflow
roboflow.com โ€บ home โ€บ read video streams with cv2.videocapture
Read Video Streams with cv2.VideoCapture (OpenCV) | Roboflow
import cv2 as cv cap = cv.VideoCapture(0) while True: ret, frame = cap.read() if not ret: break cv.imshow('frame', frame) if cv.waitKey(1) == ord('q'): break cap.release() cv.destroyAllWindows() OpenCV can be used with the open source supervision Python package.
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 73147343 โ€บ how-to-display-and-read-a-live-camera-video-in-python-opencv
How to display and read a live camera video in Python OpenCV - Stack Overflow
I've been working on a code from the Roboflow team that is suppose to display a live video capture and give it's predictions from the model that I trained, but I encounter an error. ... cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:967: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'
๐ŸŒ
Cloudinary
cloudinary.com โ€บ home โ€บ getting started with cv2 video capture in python
Getting Started with cv2 Video Capture in Python | Cloudinary
April 12, 2026 - Typically, 0 refers to the default webcam, while 1 (or higher numbers) may point to additional cameras. If you pass a string containing a file path instead, the function will attempt to open and read that video file.
๐ŸŒ
Educative
educative.io โ€บ answers โ€บ how-to-capture-a-frame-from-real-time-camera-video-using-opencv
How to capture a frame from real-time camera video using OpenCV
The read() function returns a tuple of size 2. The first element of the tuple is a true or false, depending on whether the frame was captured successfully, and the second element of the tuple contains the actual video frame if it was successfully ...
๐ŸŒ
Medium
korlakuntasaikamal10.medium.com โ€บ reading-videos-in-opencv-using-cv2-videowriter-module-in-python-84d8706c12db
Reading Videos in OpenCV using cv2.VideoWriter Module in Python | by kamal_DS | Medium
February 8, 2023 - Reading Videos in OpenCV using cv2.VideoWriter module in Python: The cv2.VideoWriter module in OpenCV provides a simple interface for reading videos. To read a video in OpenCV, we need to create a cv2.VideoCapture object and open a video file ...
๐ŸŒ
Master Data Science
datahacker.rs โ€บ read-write-and-display-videos-opencv
OpenCV #002 Read, Write and Display Video - Master Data Science
March 14, 2020 - Using OpenCV it can be done in two ways, either by reading a video file or using the video stream directly from a camera connected to your computer. The first approach towards reading a video file is creating a VideoCapture Object and we need to specify the video filename. The second approach ...
Starred by 59 users
Forked by 17 users
Languages: Java