Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat: Use custom muxer as default

Richie McIlroy469262c66edb
diff --git a/apps/desktop/src-tauri/src/export.rs b/apps/desktop/src-tauri/src/export.rs
index f99e41251..3e24e1cfb 100644
--- a/apps/desktop/src-tauri/src/export.rs
+++ b/apps/desktop/src-tauri/src/export.rs
@@ -91,11 +91,7 @@ pub async fn export_video(
e.to_string()
})?;
- let result = if use_custom_muxer {
- exporter.export_with_custom_muxer().await
- } else {
- exporter.export_with_mp4_encoder().await
- };
+ let result = exporter.export_with_custom_muxer().await;
match result {
Ok(_) => {
diff --git a/crates/export/src/lib.rs b/crates/export/src/lib.rs
index fb7f90590..e2a00b46b 100644
--- a/crates/export/src/lib.rs
+++ b/crates/export/src/lib.rs
@@ -111,6 +111,8 @@ where
buffer: AudioFrameBuffer,
}
+ println!("Exporting with custom muxer");
+
let (tx_image_data, mut rx_image_data) = tokio::sync::mpsc::channel::<RenderedFrame>(4);
let (frame_tx, frame_rx) = std::sync::mpsc::sync_channel::<MP4Input>(4);
@@ -198,7 +200,6 @@ where
let mut frame = audio_info.wrap_frame(&frame_data, 0);
let pts = (frame_count as f64 * f64::from(audio_info.sample_rate) / f64::from(FPS)) as i64;
frame.set_pts(Some(pts));
- frame.set_duration(Some(samples as i64));
println!(
"Export: Sending audio frame {} with PTS: {:?}, samples: {}, data size: {}",
frame_count,