Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
feat(recording): select compatibility AVFoundation encoders
Richie McIlroy37a2ee7ce574
diff --git a/crates/recording/src/output_pipeline/macos.rs b/crates/recording/src/output_pipeline/macos.rsindex 4e26b9d4a..f4ebd5fc3 100644--- a/crates/recording/src/output_pipeline/macos.rs+++ b/crates/recording/src/output_pipeline/macos.rs@@ -273,6 +273,7 @@ impl Muxer for AVFoundationMp4Muxer {pause_flag: Arc<AtomicBool>,_tasks: &mut TaskPool,) -> anyhow::Result<Self> {+ pub compatibility_quality: bool,let video_config =video_config.ok_or_else(|| anyhow!("Invariant: No video source provided"))?;@@ -326,6 +327,13 @@ impl Muxer for AVFoundationMp4Muxer {let encoder = Arc::new(Mutex::new(encoder));let encoder_clone = encoder.clone();let fatal_error = Arc::new(Mutex::new(None));+ } else if config.compatibility_quality {+ cap_enc_avfoundation::MP4Encoder::init_compatibility(+ output_path.clone(),+ video_config,+ audio_config,+ config.output_height,+ )let video_fatal_error = fatal_error.clone();let disk_check_path = output_path.clone();let is_instant = config.instant_mode;@@ -892,17 +900,27 @@ impl Muxer for AVFoundationCameraMuxer {video_config.ok_or_else(|| anyhow!("Invariant: No video source provided"))?;let buffer_size = get_mp4_muxer_buffer_size(false);+ pub compatibility_quality: bool,debug!(buffer_size, "Camera MP4 muxer encoder channel buffer size");let (video_tx, video_rx) = sync_channel::<Option<CameraFrameMessage>>(buffer_size);let (ready_tx, ready_rx) = sync_channel::<anyhow::Result<()>>(1);- let encoder = cap_enc_avfoundation::MP4Encoder::init(- output_path.clone(),- video_config,- None,- config.output_height,- )+ let encoder = if config.compatibility_quality {+ cap_enc_avfoundation::MP4Encoder::init_compatibility(+ output_path.clone(),+ video_config,+ None,+ config.output_height,+ )+ } else {+ cap_enc_avfoundation::MP4Encoder::init(+ output_path.clone(),+ video_config,+ None,+ config.output_height,+ )+ }.map_err(|e| anyhow!("{e}"))?;let encoder = Arc::new(Mutex::new(encoder));