fix: video size error handling — validation, timeouts, failure surfacing

Backend:
- Increase ffmpeg/ffprobe timeouts from 15s to 60s for large videos
- Classify processing errors (timeout, OOM, corrupt) with user-facing messages
- Emit failure details via media:job:update socket event (error field)
- Bump refboard container memory 512M → 1G

Frontend:
- Client-side file size validation (200MB) before upload starts
- Oversized files show immediate error in upload manager, skip upload
- Handle media:job:update status='failed' — surface error in upload panel
- Add processingFailed() to UploadManager for video processing errors
This commit is contained in:
Hiren Kangad
2026-03-10 19:04:42 +05:30
parent 38fb3edf14
commit 784554e40d
5 changed files with 64 additions and 7 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ function probeVideo(buffer) {
'-show_format',
'-show_streams',
tmpFile,
], { timeout: 15000 }, (err, stdout) => {
], { timeout: 60000 }, (err, stdout) => {
cleanup(tmpFile, tmpDir);
if (err) {
console.warn('[video-utils] ffprobe failed:', err.message);
@@ -91,7 +91,7 @@ function extractPoster(buffer) {
'-q:v', '3', // JPEG quality (2=best, 31=worst)
'-y', // overwrite
tmpOutput,
], { timeout: 15000 }, (err) => {
], { timeout: 60000 }, (err) => {
if (err) {
console.warn('[video-utils] ffmpeg poster extraction failed:', err.message);
cleanup(tmpInput, tmpDir);