This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Streaming Video Recorder</title> | |
</head> | |
<body> | |
<h1>Streaming Video Recorder</h1> | |
<div id="recorder"> | |
<button id="record">Video record</button> | |
<button id="stop">Stop video record</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import threading | |
class RecordingThread (threading.Thread): | |
def __init__(self, name, camera): | |
threading.Thread.__init__(self) | |
self.name = name | |
self.isRunning = True | |
self.cap = camera |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, render_template, Response, jsonify, request | |
from camera import VideoCamera | |
import pyaudio | |
app = Flask(__name__) | |
############ Audio recording section ############ | |
FORMAT = pyaudio.paInt16 | |
CHANNELS = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Document</title> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask,render_template,Response | |
import cv2 | |
import pyaudio | |
app=Flask(__name__) | |
camera=cv2.VideoCapture(0) | |
FORMAT = pyaudio.paInt16 | |
CHANNELS = 2 |