Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Simplify segment path handling for DASH output
Richie McIlroy6a84ceefc676
diff --git a/crates/enc-ffmpeg/src/mux/segmented_stream.rs b/crates/enc-ffmpeg/src/mux/segmented_stream.rsindex e1e257c96..b4f938c03 100644--- a/crates/enc-ffmpeg/src/mux/segmented_stream.rs+++ b/crates/enc-ffmpeg/src/mux/segmented_stream.rs@@ -183,18 +183,8 @@ impl SegmentedVideoEncoder {let mut output = format::output_as(&manifest_path, "dash")?;- let init_seg_path = base_path.join(INIT_SEGMENT_NAME);- let media_seg_pattern = base_path.join("segment_$Number%03d$.m4s");-- #[cfg(windows)]- let init_seg_str = init_seg_path.to_string_lossy().replace('\\', "/");- #[cfg(windows)]- let media_seg_str = media_seg_pattern.to_string_lossy().replace('\\', "/");-- #[cfg(not(windows))]- let init_seg_str = init_seg_path.to_string_lossy().to_string();- #[cfg(not(windows))]- let media_seg_str = media_seg_pattern.to_string_lossy().to_string();+ let init_seg_str = INIT_SEGMENT_NAME;+ let media_seg_str = "segment_$Number%03d$.m4s";unsafe {let opts = output.as_mut_ptr();@@ -205,8 +195,8 @@ impl SegmentedVideoEncoder {ffmpeg::ffi::av_opt_set((*opts).priv_data, k.as_ptr(), v.as_ptr(), 0);};- set_opt("init_seg_name", &init_seg_str);- set_opt("media_seg_name", &media_seg_str);+ set_opt("init_seg_name", init_seg_str);+ set_opt("media_seg_name", media_seg_str);set_opt("seg_duration",&config.segment_duration.as_secs_f64().to_string(),