HighRes von Cam im PC scalen

This commit is contained in:
ChK
2026-03-15 10:19:28 +01:00
parent 37b506e87e
commit a7ed2775dc
3 changed files with 75 additions and 6 deletions

View File

@@ -113,6 +113,8 @@ console.log(`[DEV] Using devices: ${DEV0} (video0), ${DEV1} (video1)`);
// Cam0: MJPEG pass-through if available (lowest latency)
const cam0 = new FFmpegStreamer(DEV0, {
name: 'video0',
width: 640,
height: 480,
fps: 30,
quality: 8, // 5 wäre besser
input: {
@@ -124,7 +126,7 @@ const cam0 = new FFmpegStreamer(DEV0, {
threadQueueSize: 64,
channel: 0,
},
tryFormats: ['mjpeg', 'yuyv422', 'rgb24'],
tryFormats: ['yuyv422', 'mjpeg', 'rgb24'],
});
@@ -132,6 +134,8 @@ const cam0 = new FFmpegStreamer(DEV0, {
// Cam1: your working timing on /dev/video2; let driver pick format first
const cam1 = new FFmpegStreamer(DEV1, {
name: 'video1',
width: 640,
height: 480,
fps: 30,
quality: 8, // 5 wäre besser
input: {
@@ -219,7 +223,7 @@ function handleControlMessage(ws, msg) {
try {
switch (msg.action) {
case 'snapshot': {
console.log('Snapshot requested');
const outDir = path.join(__dirname, 'public', 'snapshots');
screenShot.snapshot(outDir, cam0, cam1, ws);
break;