Skip to content

Commit

Permalink
feat: Use custom muxer as default
Browse files Browse the repository at this point in the history
  • Loading branch information
richiemcilroy committed Jan 8, 2025
1 parent 2658127 commit 469262c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 1 addition & 5 deletions apps/desktop/src-tauri/src/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(_) => {
Expand Down
3 changes: 2 additions & 1 deletion crates/export/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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,
Expand Down

1 comment on commit 469262c

@vercel
Copy link

@vercel vercel bot commented on 469262c Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.