From 785b4c4ff5e59078ed424298f00ef40385daffb6 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 19 Sep 2024 16:50:19 +0200 Subject: [PATCH] Some adjustments to video sizes, max record length is now 80sek --- slaeforms/app.py | 2 +- slaeforms/static/videoscript.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/slaeforms/app.py b/slaeforms/app.py index c332efc..4a77a04 100644 --- a/slaeforms/app.py +++ b/slaeforms/app.py @@ -33,7 +33,7 @@ app = Flask(__name__) # configure the database, give it a path (it will be in the instances folder) app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///database.db" app.config["PERMANENT_SESSION_LIFETIME"] = 10800 #3 Stunden, 10800 sekunden -app.config['MAX_CONTENT_LENGTH'] = 16 * 1000 * 1000 # try and fix video upload not working +app.config['MAX_CONTENT_LENGTH'] = 20 * 1000 * 1000 # try and fix video upload not working db.init_app(app) #set the secret key (TODO change this for final deployment) diff --git a/slaeforms/static/videoscript.js b/slaeforms/static/videoscript.js index 8475395..5f54aee 100644 --- a/slaeforms/static/videoscript.js +++ b/slaeforms/static/videoscript.js @@ -123,8 +123,9 @@ async function cameraButton() { // initialize MediaRecorder, give it the webcam stream as input to record mediaRecorder = new MediaRecorder(stream, { - mimeType: "video/webm", // could use different video format - // videoBitsPerSecond: 5000000, // Standard bitrate for video is 2,5 mbps + mimeType: "video/webm", + audioBitsPerSecond: 0, + videoBitsPerSecond: 2000000, // Standard bitrate for video is 2,5 mbps }); // when data is available at the mediaRecorder (this means the recording has ended, since I have not specified time intervalls)