From ca56487f9169deebc1b25dad0366f0a6935e5879 Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Tue, 13 Oct 2026 09:32:00 -0700 Subject: [PATCH] Compress attached videos to 3 fps to match the proxy's Gemini sampling rate Co-Authored-By: Claude Opus 5.5 --- src/video.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video.js b/src/video.js index 4a9cfba..8907cf5 100644 --- a/src/video.js +++ b/src/video.js @@ -1,7 +1,7 @@ import { asDataURL } from './utils.js'; -// Videos are shrunk to 360p @ 4 fps before attaching; HEVC when the device can encode it, H.264 otherwise. -const SHORT_SIDE = 360, FPS = 4, VIDEO_BPS = { hevc: 130e3, avc: 160e3 }, AUDIO_BPS = 32e3; +// Videos are shrunk to 360p @ 3 fps (matches the proxy's Gemini sampling rate) before attaching; HEVC when the device can encode it, H.264 otherwise. +const SHORT_SIDE = 360, FPS = 3, VIDEO_BPS = { hevc: 130e3, avc: 160e3 }, AUDIO_BPS = 32e3; const even = n => Math.max(2, Math.round(n / 2) * 2); let mb; const loadMb = async () => {