YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix: video encoding on windows + ci optim
Louis Beaumont08f1ec67c428
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.ymlindex 4a3319abb..4b4298e4e 100644--- a/.github/workflows/release-app.yml+++ b/.github/workflows/release-app.yml@@ -80,6 +80,11 @@ jobs:override: truetarget: ${{ matrix.target }}+ - uses: actions/cache@v3+ with:+ path: "**/node_modules"+ key: ${{ runner.os }}-modules-${{ hashFiles('**/bun.lockb') }}+- name: Cache Homebrew packagesif: matrix.platform == 'macos-latest'uses: actions/cache@v3@@ -112,6 +117,8 @@ jobs:~/.cargo/git/db/target/key: ${{ matrix.platform }}-cargo-${{ hashFiles('**/Cargo.lock') }}+ restore-keys: |+ ${{ runner.os }}-cargo-- name: Install Linux dependenciesif: matrix.platform == 'ubuntu-24.04'diff --git a/screenpipe-server/src/video.rs b/screenpipe-server/src/video.rsindex d49cfe8bf..d7c223d2a 100644--- a/screenpipe-server/src/video.rs+++ b/screenpipe-server/src/video.rs@@ -317,22 +317,25 @@ async fn start_ffmpeg_process(output_file: &str, fps: f64) -> Result<Child, anyh&fps_str,"-i","-",- "-vcodec",- "libx264",- "-preset",- "ultrafast",- "-pix_fmt",- "yuv420p",];- // Only add CRF option if not on Windows- // ! HACK this is temporary due to our windows prebuild system not having a complete enough ffmpeg (lot of ci infra to tweak)- // ! basically sacrificing some tiny video encoding quality on windows- if env::consts::OS != "windows" {- args.extend_from_slice(&["-crf", "25"]);+ if env::consts::OS == "windows" {+ // TODO switch back to libx264 when ffmpeg is updated in pre_build.js+ // Use MPEG-4 encoder for Windows+ args.extend_from_slice(&[+ "-vcodec",+ "mpeg4",+ "-q:v",+ "5", // Adjust quality (1-31, lower is better)+ "-preset",+ "ultrafast",+ ]);+ } else {+ // Use libx264 for other platforms+ args.extend_from_slice(&["-vcodec", "libx264", "-preset", "ultrafast", "-crf", "23"]);}- args.push(output_file);+ args.extend_from_slice(&["-pix_fmt", "yuv420p", output_file]);command.args(&args)