Skip to content

Commit

Permalink
feat: ffmpeg sidecar
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Nov 11, 2024
1 parent 93a4f6b commit e70445b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion screenpipe-app-tauri/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
version = "0.10.4"
version = "0.10.5"
description = ""
authors = ["you"]
license = ""
Expand Down
6 changes: 5 additions & 1 deletion screenpipe-server/src/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use log::{debug, error};
use log::{info, warn};
use screenpipe_core::{find_ffmpeg_path, Language};
use screenpipe_vision::{continuous_capture, CaptureResult, OcrEngine};
use std::env;
use std::path::PathBuf;
use std::process::Stdio;
use std::sync::Arc;
Expand Down Expand Up @@ -168,6 +167,11 @@ pub async fn start_ffmpeg_process(output_file: &str, fps: f64) -> Result<Child,
"pad=width=ceil(iw/2)*2:height=ceil(ih/2)*2",
];

// TODO: issue on macos https://github.com/mediar-ai/screenpipe/pull/580
#[cfg(target_os = "macos")]
args.extend_from_slice(&["-vcodec", "libx264", "-preset", "ultrafast", "-crf", "23"]);

#[cfg(not(target_os = "macos"))]
args.extend_from_slice(&["-vcodec", "libx265", "-preset", "ultrafast", "-crf", "23"]);

args.extend_from_slice(&["-pix_fmt", "yuv420p", output_file]);
Expand Down

0 comments on commit e70445b

Please sign in to comment.