This is a simple Flask app that streams video frames from the camera and allows users to record a video from a selected camera.
- Python 3
- Flask
- OpenCV
- Install dependencies by running
pip install -r requirements.txt
. - Run the app using
python Camera.py
. - Open a web browser and navigate to
http://localhost:8080
. - The camera stream should be visible on the page.
- Select a camera and recording duration, then click the "Record" button to start recording.
- The recorded video will be saved to disk.
Camera.py
: Contains the Flask app code.
This is a Python script that reads frames from a video file and displays them in a window using OpenCV.
- Python 3
- OpenCV
- Install OpenCV by running
pip install opencv-python
. - Save your video file in the same directory as the Python script.
- Update the file name in
cv2.VideoCapture()
to match your video file. - Run the script using
python ViewCam.py
. - The video should start playing in a window.
- Press 'q' to quit the window and stop the video.
ViewCam.py
: Contains the Python script code.
This project was inspired by the Camera Streaming and Recording using Flask and OpenCV example by Skydrige.