Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

feat: consolidate selected video clips through rendered media

Konstantin Chuykovfc7e6a91c42f
diff --git a/docs/merging-clips.md b/docs/merging-clips.md
new file mode 100644
index 00000000..53e7ba9a
--- /dev/null
+++ b/docs/merging-clips.md
@@ -0,0 +1,38 @@
+# Merge selected clips
+
+Select two or more video clips on one track, then choose **Merge selected
+clips** in the right-click menu or use the merge button beside the scissors
+in the timeline toolbar. There is no limit of two clips. Clips can come from
+different files, and source sections removed while editing stay removed.
+
+Concat renders the selection in timeline order into `media/merged-*/merged.mp4`
+inside the project. Once the render finishes, one clip replaces the selection
+at the same position, with the same timeline duration. Timeline gaps inside
+the selection remain black/silent gaps. Other tracks are not included.
+
+The file uses the timeline's frame size, frame rate and colour space (H.264
+for SDR, ten-bit HEVC for HDR). Clip transforms, effects, speed changes,
+internal transitions and sound settings are baked into it. These individual
+settings can no longer be edited separately on the merged clip. Encoding
+is not lossless. Original source files and bin entries remain available.
+
+Click the merge button again, or choose **Cancel merging** from the context
+menu, to cancel. Closing the project also cancels the operation. Errors and
+cancellation leave the original clips in place. If the selected clips or their
+media change while rendering, Concat discards the result rather than replacing
+a newer edit. Undo restores all the original clips in one step; redo restores
+the merged clip. Keep the generated media when saving or moving the project.
+
+The action refuses locked tracks, overlapping clips, missing/duplicate ids,
+a selection with an unselected clip inside its span, subframe boundaries whose
+rounding cannot fit one clip without losing frames, or transitions that cross
+its boundary. Include both sides of a transition and reattach detached audio
+before merging. MP4 has no alpha channel: merging above other visible content
+is refused so a baked black background cannot obscure lower tracks. Rendered
+files are project media, not disposable preview cache.
+
+For API callers, the existing `mergeClips` command still rejoins continuous
+parts without rendering. The new `consolidateClips` command adopts a completed,
+probed render as an atomic edit; callers must render the selection before
+applying it. `concat_host::consolidate::Consolidation` builds that request and
+checks that its inputs are still current before adoption.
diff --git a/src/crates/concat-export/src/lib.rs b/src/crates/concat-export/src/lib.rs
index 149489d1..5982a512 100644
--- a/src/crates/concat-export/src/lib.rs
+++ b/src/crates/concat-export/src/lib.rs
@@ -24,7 +24,9 @@ pub mod chains;
pub mod flatten;
mod resolve;
-use resolve::{BuiltTimeline, TransitionSpan, Treatment, animation_of, build_timeline, quantise};
+use resolve::{
+ BuiltTimeline, TransitionSpan, Treatment, animation_of, build_timeline, quantise, quantise_at,
+};
use std::collections::{BTreeMap, HashMap};
use std::path::{Path, PathBuf};
@@ -365,6 +367,11 @@ pub struct ExportRequest {
/// say.
#[serde(default)]
pub hdr: bool,
+ /// Original timeline origin when rendering a selection moved to zero.
+ /// Preserves the global video frame grid and shader clock; audio, clip
+ /// clocks and keyframe fractions keep their local timing.
+ #[serde(default)]
+ pub effect_time_offset: f64,
/// The flattened clip list to render.
pub clips: Vec<ExportClip>,
}
@@ -533,6 +540,14 @@ pub(crate) fn transitions_at(shapes: &[TransitionShape], frame: i64) -> Vec<Tran
/// path, so a project saved before packaged transitions existed renders
/// exactly as it always did.
fn resolve_transitions(clips: &mut Vec<ExportClip>, rate: FrameRate) -> Vec<TransitionSpan> {
+ resolve_transitions_at(clips, rate, 0.0)
+}
+
+fn resolve_transitions_at(
+ clips: &mut Vec<ExportClip>,
+ rate: FrameRate,
+ origin: f64,
+) -> Vec<TransitionSpan> {
for clip in clips.iter_mut() {
clip.track *= 2;
}
@@ -691,7 +706,7 @@ fn resolve_transitions(clips: &mut Vec<ExportClip>, rate: FrameRate) -> Vec<Tran
// The dissolve a GPU-less path shows; the shader's own blend
// overrides it where a GPU runs the transition.
b.video_fade_in = d;
- let start = quantise(b.start, rate);
+ let start = quantise_at(b.start, rate, origin);
let end = start + quantise(d, rate);
spans.push(TransitionSpan {
start,
@@ -883,6 +898,11 @@ pub fn render_on(
compositor: Option<WgpuCompositor>,
mut reporter: Reporter<'_>,
) -> Result<String, String> {
+ if !request.effect_time_offset.is_finite()
+ || request.effect_time_offset.abs() > concat_project::model::ranges::MAX_TIME
+ {
+ return Err("the effect timeline offset is not a valid time".into());
+ }
if request.clips.is_empty() {
return Err("there is nothing on the timeline to export".to_owned());
}
@@ -912,7 +932,7 @@ pub fn render_on(
// else reads the clip list, so the picture and sound paths below never
// know transitions exist.
let mut resolved = request.clips.clone();
- let transitions = resolve_transitions(&mut resolved, rate);
+ let transitions = resolve_transitions_at(&mut resolved, rate, request.effect_time_offset);
// Stills composite exactly like footage; they only differ in how they are
// decoded, which is handled where the decoder is opened.
@@ -1305,6 +1325,7 @@ fn render_picture(
destination: &Path,
reporter: &mut Reporter<'_>,
) -> Result<(), String> {
+ let effect_offset = quantise(request.effect_time_offset, rate);
let mut compositor = match compositor {
Some(lent) => lent,
None => best_compositor()?,
@@ -1517,7 +1538,10 @@ fn render_picture(
// that died under it is black, and is drawn again on the device
// that takes over. The copy is cheap - the pictures are shared.
let mut composed = composite_treated(
- &mut compositor,
+ &mut EffectClock {
+ inner: &mut compositor,
+ offset: effect_offset,
+ },
frame_plan.clone(),
&treatments,
&transitions,
@@ -1533,7 +1557,10 @@ fn render_picture(
);
compositor = recovered(losses, hdr)?;
composed = composite_treated(
- &mut compositor,
+ &mut EffectClock {
+ inner: &mut compositor,
+ offset: effect_offset,
+ },
frame_plan.clone(),
&treatments,
&transitions,
@@ -1592,6 +1619,46 @@ fn passes_at(
Catalogue::builtin().shader_passes_at(effects, at, reveal_maps.get(&clip).cloned())
}
+/// Only the shader clock moves. Planning, source decoding, animated effect
+/// parameters and transition progress use the selection's local timeline.
+struct EffectClock<'a> {
+ inner: &'a mut dyn Compositor,
+ offset: Rational,
+}
+
+impl Compositor for EffectClock<'_> {
+ fn render(&mut self, plan: &FramePlan) -> Frame {
+ if self.offset == Rational::ZERO {
+ return self.inner.render(plan);
+ }
+ let mut shifted = plan.clone();
+ shifted.time += self.offset;
+ for layer in &mut shifted.layers {
+ layer.clip_start += self.offset;
+ }
+ self.inner.render(&shifted)
+ }
+
+ fn combine(
+ &mut self,
+ width: u32,
+ height: u32,
+ time: f32,
+ from: &Frame,
+ to: &Frame,
+ pass: &concat_core::shader::TransitionPass,
+ ) -> Option<Frame> {
+ self.inner.combine(
+ width,
+ height,
+ time + self.offset.as_f64() as f32,
+ from,
+ to,
+ pass,
+ )
+ }
+}
+
/// Draws `plan` with every treatment live at its instant applied to the
/// stack beneath its track: each goes into the plan, and the compositor
/// applies it where it draws.
@@ -2038,6 +2105,7 @@ pub fn preview_plan(
color_range: concat_media::ColorRange::Limited,
color_space,
hdr: false,
+ effect_time_offset: 0.0,
clips: Vec::new(),
};
PreviewPlan {
@@ -2612,6 +2680,7 @@ mod tests {
color_range: concat_media::ColorRange::Limited,
color_space: ColorSpace::Sdr,
hdr: false,
+ effect_time_offset: 0.0,
clips: vec![footage],
};
assert!(!nested.exists());
@@ -2692,6 +2761,7 @@ mod tests {
color_range: concat_media::ColorRange::Limited,
color_space: ColorSpace::Sdr,
hdr: false,
+ effect_time_offset: 0.0,
clips: vec![footage],
};
let cancel = AtomicBool::new(false);
diff --git a/src/crates/concat-export/src/resolve.rs b/src/crates/concat-export/src/resolve.rs
index 55c44f64..ac8f92ed 100644
--- a/src/crates/concat-export/src/resolve.rs
+++ b/src/crates/concat-export/src/resolve.rs
@@ -223,7 +223,7 @@ pub(crate) fn build_timeline(
// Quantise to the frame grid on the way in. The UI works in f64
// seconds; the engine works in exact rationals, and this is the seam
// where a value stops being approximate.
- let start = quantise(clip.start, rate);
+ let start = quantise_at(clip.start, rate, request.effect_time_offset);
let duration = quantise(clip.duration, rate);
if duration.is_zero() {
continue;
@@ -446,3 +446,9 @@ pub(crate) fn fitted_size(
pub(crate) fn quantise(seconds: f64, rate: FrameRate) -> Rational {
rate.time_of_frame((seconds * rate.fps().as_f64()).round().max(0.0) as i64)
}
+
+/// Rebase a frame-grid timestamp without rounding a raw subtraction. Audio
+/// keeps the raw local placement; video retains its original global grid.
+pub(crate) fn quantise_at(seconds: f64, rate: FrameRate, origin: f64) -> Rational {
+ quantise(seconds + origin, rate) - quantise(origin, rate)
+}
diff --git a/src/crates/concat-host/src/consolidate.rs b/src/crates/concat-host/src/consolidate.rs
new file mode 100644
index 00000000..105914b9
--- /dev/null
+++ b/src/crates/concat-host/src/consolidate.rs
@@ -0,0 +1,219 @@
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors
+
+//! A frozen selection rendered through the normal exporter before an atomic
+//! `ConsolidateClips` edit. Source files are never rewritten.
+
+use std::path::Path;
+
+use concat_export::{ExportRequest, flatten::flatten_timeline_in};
+use concat_project::commands::NewMedia;
+use concat_project::model::{Clip, MediaItem, Project, VideoSettings};
+use concat_project::{Command, consolidation_clips};
+
+/// The exact clips and media a render reads. Rechecked before replacement so
+/// editing, undo, relinking or switching timelines cannot adopt stale work.
+pub struct Consolidation {
+ timeline_id: String,
+ video: VideoSettings,
+ clips: Vec<Clip>,
+ media: Vec<MediaItem>,
+}
+
+impl Consolidation {
+ /// Captures a valid selection without changing the project.
+ pub fn new(project: &Project, ids: &[String]) -> Result<Self, String> {
+ let clips =
+ consolidation_clips(project.active(), ids).map_err(|error| error.to_string())?;
+ let media = clips
+ .iter()
+ .map(|clip| {
+ project
+ .media_by_id(&clip.media_id)
+ .cloned()
+ .ok_or_else(|| "A selected clip's media is missing.".to_owned())
+ })
+ .collect::<Result<Vec<_>, _>>()?;
+ Ok(Self {
+ timeline_id: project.active().id.clone(),
+ video: project.active().video,
+ clips,
+ media,
+ })
+ }
+
+ /// The lane the replacement belongs on, for the window's lock check.
+ pub fn track_id(&self) -> &str {
+ &self.clips[0].track_id
+ }
+
+ /// The host-rendered media may replace the captured clips only while
+ /// their inputs and the timeline's output settings still match.
+ pub fn replacement(&self, project: &Project, item: NewMedia) -> Result<Command, String> {
+ let ids: Vec<_> = self.clips.iter().map(|clip| clip.id.clone()).collect();
+ if project.active().id != self.timeline_id
+ || project.active().video != self.video
+ || consolidation_clips(project.active(), &ids).ok().as_ref() != Some(&self.clips)
+ || self
+ .media
+ .iter()
+ .any(|media| project.media_by_id(&media.id) != Some(media))
+ {
+ return Err("The selected clips changed while merging. Please try again.".into());
+ }
+ Ok(Command::ConsolidateClips {
+ clip_ids: ids,
+ item,
+ })
+ }
+
+ /// A render of the selection alone, moved to zero. Timeline gaps stay
+ /// gaps; source gaps left by deleting pauses are never put back. Track
+ /// visibility and mute stay live on the replacement rather than baking
+ /// silence or black into a file that could later be unmuted/unhidden.
+ pub fn request(&self, project: &Project, folder: &Path, output: &Path) -> ExportRequest {
+ let mut alone = project.clone();
+ let timeline = alone.active_mut();
+ let start = self.clips[0].start;
+ timeline.clips = self
+ .clips
+ .iter()
+ .cloned()
+ .map(|mut clip| {
+ clip.start -= start;
+ std::sync::Arc::new(clip)
+ })
+ .collect();
+ for track in &mut timeline.tracks {
+ track.visible = true;
+ track.muted = false;
+ }
+ let mut clips = flatten_timeline_in(&alone, None, Some(folder));
+ // The exporter rounds its end to frames. A hidden, silent marker
+ // makes it round up for a source file: even a fractional last frame
+ // must be available when the replacement is trimmed to the exact
+ // original span. Do not stretch clips/keys/fades to achieve this.
+ let end = clips
+ .iter()
+ .map(|clip| clip.start + clip.duration)
+ .fold(0.0, f64::max);
+ let padded = (end * self.video.rate() - 1e-9).ceil() / self.video.rate();
+ if padded > end + 1e-9 {
+ let mut marker = concat_export::ExportClip::blank(
+ concat_export::ClipKind::Layer,
+ 0.0,
+ padded,
+ alone.active().tracks.len(),
+ );
+ marker.hidden = true;
+ marker.muted = true;
+ marker.has_audio = Some(false);
+ clips.push(marker);
+ }
+ let hdr = self.video.color_space.is_hdr();
+ ExportRequest {
+ output: output.to_string_lossy().into_owned(),
+ width: self.video.width,
+ height: self.video.height,
+ rate_num: self.video.rate_num,
+ rate_den: self.video.rate_den,
+ crf: 16,
+ preset: "fast".into(),
+ codec: if hdr {
+ crate::export::VideoCodec::Hevc
+ } else {
+ crate::export::VideoCodec::H264
+ },
+ ten_bit: hdr,
+ rate_mode: Default::default(),
+ bitrate_kbps: 0,
+ color_range: Default::default(),
+ color_space: self.video.color_space,
+ hdr,
+ effect_time_offset: start,
+ clips,
+ }
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use concat_project::model::{ClipKind, MediaKind};
+
+ fn selection() -> (Project, Vec<String>) {
+ let mut project = Project::default();
+ let track = project.active().tracks[0].id.clone();
+ project.media.push(MediaItem {
+ id: "m1".into(),
+ path: "/original.mp4".into(),
+ kind: MediaKind::Video,
+ duration: Some(30.0),
+ has_audio: true,
+ ..Default::default()
+ });
+ let mut ids = Vec::new();
+ for (id, start, source_start) in [("c1", 5.0, 0.0), ("c2", 6.0, 10.0), ("c3", 8.0, 20.0)] {
+ let mut clip = Clip::blank(id, &track, ClipKind::Video, id, start, 1.0);
+ clip.media_id = "m1".into();
+ clip.source_start = source_start;
+ clip.volume = 0.5;
+ project.active_mut().clips.push(std::sync::Arc::new(clip));
+ ids.push(id.to_owned());
+ }
+ (project, ids)
+ }
+
+ #[test]
+ fn render_keeps_source_cuts_audio_settings_and_timeline_gaps() {
+ let (project, ids) = selection();
+ let plan = Consolidation::new(&project, &ids).unwrap();
+ let request = plan.request(
+ &project,
+ Path::new("/project"),
+ Path::new("/project/merged.mp4"),
+ );
+ assert_eq!(
+ request
+ .clips
+ .iter()
+ .map(|clip| clip.start)
+ .collect::<Vec<_>>(),
+ [0.0, 1.0, 3.0]
+ );
+ assert_eq!(
+ request
+ .clips
+ .iter()
+ .map(|clip| clip.source_start)
+ .collect::<Vec<_>>(),
+ [0.0, 10.0, 20.0]
+ );
+ assert!(
+ request
+ .clips
+ .iter()
+ .all(|clip| clip.volume == 0.5 && clip.has_audio == Some(true))
+ );
+ }
+
+ #[test]
+ fn rejects_stale_clips_and_relinked_sources() {
+ let (mut project, ids) = selection();
+ let plan = Consolidation::new(&project, &ids).unwrap();
+ // Obtain a NewMedia independently of a real file for the adoption check.
+ let item: NewMedia = serde_json::from_value(serde_json::json!({
+ "path":"/merged.mp4", "name":"Merged", "duration":4.0,
+ "kind":"video", "width":1920, "height":1080,
+ "frameRate":30.0, "frameRateFraction":"30/1", "videoCodec":"h264",
+ "audioCodec":"aac", "hasAudio":true
+ }))
+ .unwrap();
+ assert!(plan.replacement(&project, item.clone()).is_ok());
+ project.active_mut().clip_mut("c2").unwrap().source_start = 11.0;
+ assert!(plan.replacement(&project, item.clone()).is_err());
+ project.active_mut().clip_mut("c2").unwrap().source_start = 10.0;
+ project.media[0].path = "/relinked.mp4".into();
+ assert!(plan.replacement(&project, item).is_err());
+ }
+}
diff --git a/src/crates/concat-host/src/export.rs b/src/crates/concat-host/src/export.rs
index 74698c29..31fe778b 100644
--- a/src/crates/concat-host/src/export.rs
+++ b/src/crates/concat-host/src/export.rs
@@ -78,6 +78,7 @@ pub fn request(session: &Session, spec: &ExportSpec, titles: Vec<ExportClip>) ->
color_range: spec.color_range,
color_space: session.video().color_space,
hdr: spec.hdr,
+ effect_time_offset: 0.0,
clips,
}
}
diff --git a/src/crates/concat-host/src/lib.rs b/src/crates/concat-host/src/lib.rs
index 727862f8..d519e254 100644
--- a/src/crates/concat-host/src/lib.rs
+++ b/src/crates/concat-host/src/lib.rs
@@ -20,6 +20,7 @@
pub mod brush;
pub mod cards;
+pub mod consolidate;
pub mod crash;
pub mod cutout;
pub mod dirs;
diff --git a/src/crates/concat-host/tests/export.rs b/src/crates/concat-host/tests/export.rs
index 9afc7b35..b80d03f7 100644
--- a/src/crates/concat-host/tests/export.rs
+++ b/src/crates/concat-host/tests/export.rs
@@ -1997,3 +1997,287 @@ fn a_reversed_span_plays_its_seconds_backwards() {
heard.expect_tone(1.5);
heard.expect_quiet(2.5);
}
+
+/// The selection after deleting pauses is a new source, not a longer
+/// window on the old recording. Rendering the replacement must never bring
+/// the deleted seconds back, and its sound must make the same cuts.
+#[test]
+fn consolidation_after_pause_removal_preserves_picture_sound_and_undo() {
+ use concat_host::consolidate::Consolidation;
+
+ let scratch = Scratch::new("consolidation");
+ let sources = Sources::make(scratch.path());
+ let mut studio = Studio::new(scratch.path(), "Merged", video(WIDTH, HEIGHT, 30, 1));
+ let media_id = studio.import(&sources.peek);
+ studio.apply(Command::AddClipAtFirstFree {
+ media_id,
+ start: 0.0,
+ });
+ for time in [1.0, 2.0, 3.0, 5.0] {
+ studio.apply(Command::SplitClips {
+ clip_ids: studio.clip_ids(),
+ time,
+ });
+ }
+ let removed = studio
+ .project()
+ .active()
+ .clips
+ .iter()
+ .filter(|clip| clip.source_start == 1.0 || clip.source_start == 3.0)
+ .map(|clip| clip.id.clone())
+ .collect();
+ studio.apply(Command::RemoveClips {
+ clip_ids: removed,
+ ripple: true,
+ });
+ let ids = studio.clip_ids();
+ assert_eq!(ids.len(), 3);
+ for id in &ids {
+ studio.apply(Command::UpdateClip {
+ clip_id: id.clone(),
+ patch: ClipPatch {
+ volume: Some(0.6),
+ ..Default::default()
+ },
+ });
+ }
+ let before = studio.project().clone();
+ let plan = Consolidation::new(studio.project(), &ids).expect("valid selection");
+ let folder = Path::new(studio.session.path()).join("media");
+ std::fs::create_dir_all(&folder).unwrap();
+ let output = folder.join("merged.mp4");
+ let request = plan.request(studio.project(), Path::new(studio.session.path()), &output);
+ export::run(&request, &AtomicBool::new(false), |_| {}).expect("renders merged media");
+ let exported = Exported::read("merged media", &output, (30, 1));
+ exported.expect_length(3.0);
+ exported.expect_sound(3.0);
+ for (at, second) in [(0.5, 0), (1.5, 2), (2.5, 5)] {
+ exported.expect_second(at, second);
+ }
+ exported.expect_quiet(0.5);
+ exported.expect_quiet(1.5);
+ exported.expect_tone(2.5);
+
+ let item = media::probe(output.to_str().unwrap())
+ .unwrap()
+ .to_new_media();
+ let command = plan
+ .replacement(studio.project(), item)
+ .expect("inputs unchanged");
+ studio.apply(command);
+ assert_eq!(studio.clip_ids().len(), 1);
+ let merged = &studio.project().active().clips[0];
+ assert_eq!(
+ (merged.volume, merged.speed, merged.source_start),
+ (1.0, 1.0, 0.0)
+ );
+ // The usual export also saves/reopens the project, exercising persistence.
+ let final_export = studio.export("one merged clip");
+ final_export.expect_length(3.0);
+ final_export.expect_sound(3.0);
+ final_export.expect_second(1.5, 2);
+ final_export.expect_second(2.5, 5);
+ final_export.expect_tone(2.5);
+ studio.session.undo();
+ assert_eq!(studio.project(), &before);
+ studio.session.redo();
+ assert_eq!(studio.clip_ids().len(), 1);
+
+ let cancelled = AtomicBool::new(true);
+ let cancelled_path = folder.join("cancelled.mp4");
+ let request = plan.request(&before, Path::new(studio.session.path()), &cancelled_path);
+ assert!(export::run(&request, &cancelled, |_| {}).is_err());
+ assert!(
+ !cancelled_path.exists(),
+ "a cancelled render is never a completed source"
+ );
+}
+
+#[test]
+fn consolidation_of_silent_fractional_frames_covers_the_original_span() {
+ use concat_host::consolidate::Consolidation;
+
+ let scratch = Scratch::new("consolidation-fractional");
+ let source = scratch.path().join("silent.mp4");
+ picture(&source, FrameRate::THIRTY, 3, VideoCodec::H264);
+ let mut studio = Studio::new(scratch.path(), "Fractional", video(WIDTH, HEIGHT, 30, 1));
+ let media_id = studio.import(&source);
+ let id = studio
+ .apply(Command::AddClipAtFirstFree {
+ media_id,
+ start: 0.0,
+ })
+ .unwrap();
+ studio.apply(Command::TrimClip {
+ clip_id: id,
+ edge: TrimEdge::End,
+ delta: -1.92,
+ ripple: false,
+ });
+ studio.apply(Command::SplitClips {
+ clip_ids: studio.clip_ids(),
+ time: 0.54,
+ });
+ let plan = Consolidation::new(studio.project(), &studio.clip_ids()).unwrap();
+ let output = scratch.path().join("merged.mp4");
+ let request = plan.request(studio.project(), Path::new(studio.session.path()), &output);
+ export::run(&request, &AtomicBool::new(false), |_| {}).unwrap();
+ let exported = Exported::read("fractional source", &output, (30, 1));
+ exported.expect_length(1.1); // 33 frames cover the original 1.08 seconds.
+ exported.expect_no_sound();
+ let item = media::probe(output.to_str().unwrap())
+ .unwrap()
+ .to_new_media();
+ studio.apply(plan.replacement(studio.project(), item).unwrap());
+ assert!((studio.project().active().clips[0].duration - 1.08).abs() < 1e-9);
+}
+
+#[test]
+fn consolidation_preserves_the_timeline_clock_of_animated_effects() {
+ use concat_host::consolidate::Consolidation;
+
+ let scratch = Scratch::new("consolidation-clock");
+ let source = scratch.path().join("bright.mp4");
+ let mut encoder = Encoder::create(
+ &source,
+ WIDTH,
+ HEIGHT,
+ FrameRate::THIRTY,
+ &EncodeOptions {
+ preset: "ultrafast".into(),
+ ..Default::default()
+ },
+ )
+ .unwrap();
+ let mut frame = Frame::black(WIDTH, HEIGHT);
+ frame.fill([220, 220, 220, 255]);
+ for _ in 0..60 {
+ encoder.write_frame(&frame).unwrap();
+ }
+ encoder.finish().unwrap();
+ let mut studio = Studio::new(scratch.path(), "Clock", video(WIDTH, HEIGHT, 30, 1));
+ let media_id = studio.import(&source);
+ let id = studio
+ .apply(Command::AddClipAtFirstFree {
+ media_id,
+ start: 5.0,
+ })
+ .unwrap();
+ studio.apply(Command::UpdateClip {
+ clip_id: id,
+ patch: ClipPatch {
+ video_effects: Some(vec![AppliedFilter {
+ id: "concat.bloom-pulse".into(),
+ params: [("amount".into(), 100.0), ("speed".into(), 2.0)]
+ .into_iter()
+ .collect(),
+ enabled: true,
+ keys: Default::default(),
+ }]),
+ ..Default::default()
+ },
+ });
+ studio.apply(Command::SplitClips {
+ clip_ids: studio.clip_ids(),
+ time: 6.0,
+ });
+ let baseline = studio.export("before consolidation");
+ let plan = Consolidation::new(studio.project(), &studio.clip_ids()).unwrap();
+ let output = scratch.path().join("merged.mp4");
+ let request = plan.request(studio.project(), Path::new(studio.session.path()), &output);
+ assert_eq!(request.effect_time_offset, 5.0);
+ export::run(&request, &AtomicBool::new(false), |_| {}).unwrap();
+ let baked = Exported::read("baked effect", &output, (30, 1));
+ for at in [0.2, 0.5, 0.8, 1.2, 1.5] {
+ let expected = baseline.colour_at(5.0 + at);
+ let got = baked.colour_at(at);
+ assert!(
+ got.iter()
+ .zip(expected)
+ .all(|(got, expected)| got.abs_diff(expected) <= 3),
+ "effect phase changed at {at}s: expected {expected:?}, got {got:?}"
+ );
+ }
+}
+
+#[test]
+fn consolidation_keeps_the_global_frame_grid_at_fractional_starts() {
+ use concat_host::consolidate::Consolidation;
+
+ let scratch = Scratch::new("consolidation-frame-grid");
+ let source = scratch.path().join("source.mp4");
+ picture(&source, FrameRate::THIRTY, 3, VideoCodec::H264);
+ let mut studio = Studio::new(scratch.path(), "Grid", video(WIDTH, HEIGHT, 30, 1));
+ let media_id = studio.import(&source);
+ let id = studio
+ .apply(Command::AddClipAtFirstFree {
+ media_id,
+ start: 5.01,
+ })
+ .unwrap();
+ studio.apply(Command::TrimClip {
+ clip_id: id,
+ edge: TrimEdge::End,
+ delta: -0.98,
+ ripple: false,
+ });
+ studio.apply(Command::SplitClips {
+ clip_ids: studio.clip_ids(),
+ time: 5.05,
+ });
+ // JSON parsing can normalize a raw subframe float by one ULP. Compare
+ // actual persisted renders here, not the generic helper's exact f64
+ // equality assertion; the boundary being tested is the video frame grid.
+ let draw = |studio: &mut Studio, label: &str| {
+ studio.session.save(None).unwrap();
+ let reopened = Session::open(studio.session.path(), studio.session.settings()).unwrap();
+ let output = studio.exports.join(format!("{label}.mp4"));
+ let request = export::request(
+ &reopened,
+ &ExportSpec {
+ output: output.to_string_lossy().into_owned(),
+ crf: 16,
+ preset: "fast".into(),
+ ..Default::default()
+ },
+ Vec::new(),
+ );
+ export::run(&request, &AtomicBool::new(false), |_| {}).unwrap();
+ Exported::read(label, &output, (30, 1))
+ };
+ let baseline = draw(&mut studio, "original-frame-grid");
+ let plan = Consolidation::new(studio.project(), &studio.clip_ids()).unwrap();
+ let output = scratch.path().join("merged.mp4");
+ let request = plan.request(studio.project(), Path::new(studio.session.path()), &output);
+ export::run(&request, &AtomicBool::new(false), |_| {}).unwrap();
+ let baked = Exported::read("rebased grid", &output, (30, 1));
+ let item = media::probe(output.to_str().unwrap())
+ .unwrap()
+ .to_new_media();
+ studio.apply(plan.replacement(studio.project(), item).unwrap());
+ let final_export = draw(&mut studio, "adopted-frame-grid");
+ assert_eq!(final_export.frames.len(), baseline.frames.len());
+ for frame in [0, 1, 2, 3, 4, 30, 60] {
+ let expected = baseline.frames[150 + frame]
+ .pixel(WIDTH / 2, HEIGHT / 2)
+ .unwrap();
+ let got = baked.frames[frame].pixel(WIDTH / 2, HEIGHT / 2).unwrap();
+ let adopted = final_export.frames[150 + frame]
+ .pixel(WIDTH / 2, HEIGHT / 2)
+ .unwrap();
+ assert!(
+ adopted
+ .iter()
+ .zip(expected)
+ .all(|(got, expected)| got.abs_diff(expected) <= 3),
+ "adopted frame {frame}: expected {expected:?}, got {adopted:?}"
+ );
+ assert!(
+ got.iter()
+ .zip(expected)
+ .all(|(got, expected)| got.abs_diff(expected) <= 3),
+ "frame {frame}: expected {expected:?}, got {got:?}"
+ );
+ }
+}
diff --git a/src/crates/concat-project/src/commands/clips.rs b/src/crates/concat-project/src/commands/clips.rs
index dd75582b..40eb5b80 100644
--- a/src/crates/concat-project/src/commands/clips.rs
+++ b/src/crates/concat-project/src/commands/clips.rs
@@ -609,6 +609,42 @@ pub(super) fn apply(
})
}
+ Command::ConsolidateClips { clip_ids, item } => {
+ let clips = consolidation_clips(project.active(), &clip_ids)?;
+ let first = &clips[0];
+ let end = clips
+ .iter()
+ .map(|clip| clip.start + clip.duration)
+ .fold(0.0, f64::max);
+ let duration = end - first.start;
+ if item.kind != MediaKind::Video
+ || item.path.is_empty()
+ || item.duration.is_none_or(|length| length + 1e-6 < duration)
+ {
+ return Err(CommandError::CannotMerge {
+ reason: "The merged video does not cover the selected clips.".into(),
+ });
+ }
+ let path = item.path.clone();
+ super::media::apply(project, mint, Command::AddMedia { item })?;
+ let media = project
+ .media
+ .iter()
+ .find(|media| media.path == path)
+ .expect("imported above");
+ let mut merged =
+ default_clip(first.id.clone(), first.track_id.clone(), media, first.start);
+ merged.duration = duration;
+ let timeline = project.active_mut();
+ let selected: HashSet<_> = clip_ids.iter().collect();
+ timeline.clips.retain(|clip| !selected.contains(&clip.id));
+ timeline.clips.push(Arc::new(merged));
+ Ok(Outcome {
+ created_id: Some(first.id.clone()),
+ applied: true,
+ })
+ }
+
Command::RemoveClips { clip_ids, ripple } => {
let timeline = project.active_mut();
let doomed: HashSet<&str> = clip_ids.iter().map(String::as_str).collect();
@@ -851,3 +887,118 @@ pub fn why_not_merge(timeline: &Timeline, clip_ids: &[String]) -> Option<String>
}
None
}
+
+/// Validates a selection for rendering into one clip, in timeline order.
+/// Gaps remain in the render. Unselected clips in its span are refused so
+/// the replacement cannot cover them. Source order and file need not match.
+pub fn consolidation_clips(
+ timeline: &Timeline,
+ clip_ids: &[String],
+) -> Result<Vec<Clip>, CommandError> {
+ let refuse = |reason: &str| CommandError::CannotMerge {
+ reason: reason.into(),
+ };
+ let selected: HashSet<_> = clip_ids.iter().collect();
+ if selected.len() < 2 || selected.len() != clip_ids.len() {
+ return Err(refuse("Select two or more distinct video clips to merge."));
+ }
+ let mut clips: Vec<Clip> = clip_ids
+ .iter()
+ .map(|id| {
+ timeline
+ .clip(id)
+ .cloned()
+ .ok_or_else(|| refuse("A selected clip no longer exists."))
+ })
+ .collect::<Result<_, _>>()?;
+ clips.sort_by(|a, b| a.start.total_cmp(&b.start));
+ let first = &clips[0];
+ if clips
+ .iter()
+ .any(|clip| clip.kind != ClipKind::Video || clip.track_id != first.track_id)
+ {
+ return Err(refuse("Select video clips on the same track to merge."));
+ }
+ if timeline.track(&first.track_id).is_none() {
+ return Err(CommandError::TrackGone);
+ }
+ if clips
+ .windows(2)
+ .any(|pair| pair[1].start < pair[0].start + pair[0].duration - 1e-6)
+ {
+ return Err(refuse("Overlapping clips cannot be merged."));
+ }
+ if timeline.clips.iter().any(|clip| {
+ clip.detached_from
+ .as_ref()
+ .is_some_and(|id| selected.contains(id))
+ }) {
+ return Err(refuse(
+ "Reattach detached audio before merging its video clips.",
+ ));
+ }
+ let end = clips
+ .iter()
+ .map(|clip| clip.start + clip.duration)
+ .fold(0.0, f64::max);
+ if timeline.clips.iter().any(|clip| {
+ clip.track_id == first.track_id
+ && !selected.contains(&clip.id)
+ && clip.start < end - 1e-6
+ && clip.start + clip.duration > first.start + 1e-6
+ }) {
+ return Err(refuse("Select every clip inside the span to merge."));
+ }
+ // Rounding several subframe spans is not always equivalent to rounding
+ // their union. Refuse a span that one ordinary clip could truncate, or
+ // whose pieces overlap after quantisation, instead of losing a frame.
+ let fps = timeline.video.rate();
+ let frame = |seconds: f64| (seconds * fps).round();
+ let rendered_end = clips
+ .iter()
+ .map(|clip| frame(clip.start) + frame(clip.duration))
+ .fold(0.0, f64::max);
+ if rendered_end != frame(first.start) + frame(end - first.start)
+ || clips
+ .windows(2)
+ .any(|pair| frame(pair[1].start) < frame(pair[0].start) + frame(pair[0].duration))
+ {
+ return Err(refuse(
+ "Align clip boundaries to the timeline frame grid before merging.",
+ ));
+ }
+ // MP4 bakes against black and cannot carry the selection's alpha.
+ // Refuse a bake that would cover an existing lower-track composite.
+ let lane = timeline
+ .tracks
+ .iter()
+ .position(|track| track.id == first.track_id)
+ .expect("checked above");
+ if timeline.clips.iter().any(|clip| {
+ clip.kind != ClipKind::Audio
+ && clip.start < end
+ && clip.start + clip.duration > first.start
+ && timeline
+ .tracks
+ .iter()
+ .take(lane)
+ .any(|track| track.id == clip.track_id && track.visible)
+ }) {
+ return Err(refuse(
+ "Clips above other visible content cannot be merged into an opaque video.",
+ ));
+ }
+ // An edge transition needs footage outside the selected span. Internal
+ // transitions are rendered normally; never silently bake only half one.
+ if first.transition_in.is_some()
+ || timeline.clips.iter().any(|clip| {
+ clip.track_id == first.track_id
+ && !selected.contains(&clip.id)
+ && (clip.start - end).abs() < 1e-6
+ && clip.transition_in.is_some()
+ })
+ {
+ return Err(refuse("Include both sides of a transition in the merge."));
+ }
+ Ok(clips)
+}
diff --git a/src/crates/concat-project/src/commands/mod.rs b/src/crates/concat-project/src/commands/mod.rs
index ea91e32d..2dba7c05 100644
--- a/src/crates/concat-project/src/commands/mod.rs
+++ b/src/crates/concat-project/src/commands/mod.rs
@@ -20,7 +20,7 @@ use crate::model::{
mod audio;
mod clips;
-pub use clips::why_not_merge;
+pub use clips::{consolidation_clips, why_not_merge};
mod media;
mod properties;
mod timelines;
@@ -560,6 +560,15 @@ pub enum Command {
/// The pieces to rejoin, any order.
clip_ids: Vec<String>,
},
+ /// Replaces selected video clips with their host-rendered media, as one
+ /// undoable edit. Keeps the earliest clip's id, track and timeline span;
+ /// resets baked properties. The host must render only these clips first.
+ ConsolidateClips {
+ /// Two or more video clips on one track, in any order.
+ clip_ids: Vec<String>,
+ /// The completed, probed render stored in the project media folder.
+ item: NewMedia,
+ },
/// Deletes clips from the active timeline. Unknown ids are ignored.
RemoveClips {
/// The clips to delete.
@@ -899,9 +908,9 @@ impl Command {
}
match self {
Command::Batch { commands } => commands.iter().any(Command::has_non_finite),
- Command::AddMedia { item } | Command::FillSlot { item, .. } => {
- bad(item.duration) || bad(item.frame_rate)
- }
+ Command::AddMedia { item }
+ | Command::FillSlot { item, .. }
+ | Command::ConsolidateClips { item, .. } => bad(item.duration) || bad(item.frame_rate),
Command::AddClip { start, .. } | Command::AddClipAtFirstFree { start, .. } => {
bad([*start])
}
@@ -1080,6 +1089,7 @@ pub fn apply(
| Command::ReplaceClipMedia { .. }
| Command::SetClipEnhanced { .. }
| Command::MergeClips { .. }
+ | Command::ConsolidateClips { .. }
| Command::RemoveClips { .. }) => clips::apply(project, mint, command),
command @ (Command::UpdateClip { .. }
| Command::SetClipSpeed { .. }
diff --git a/src/crates/concat-project/src/lib.rs b/src/crates/concat-project/src/lib.rs
index 14459305..767804de 100644
--- a/src/crates/concat-project/src/lib.rs
+++ b/src/crates/concat-project/src/lib.rs
@@ -28,7 +28,7 @@ pub mod model;
pub mod placement;
pub mod speed;
-pub use commands::{Command, CommandError, Outcome, why_not_merge};
+pub use commands::{Command, CommandError, Outcome, consolidation_clips, why_not_merge};
pub use doc::{DOCUMENT_VERSION, DocumentSettings, document_version, from_document, to_document};
pub use editor::{Editor, RetiredFields};
pub use model::Project;
@@ -974,6 +974,245 @@ mod tests {
assert_eq!(editor.project().active().tracks.len(), 4);
}
+ #[test]
+ fn consolidation_replaces_many_edited_pieces_and_undo_restores_everything() {
+ let (mut editor, media_id, first) = fixture();
+ let track = editor.project().active().tracks[0].id.clone();
+ let mut ids = vec![first.clone()];
+ ids.extend(lane(&mut editor, &media_id, &track, &[10.0, 20.0]));
+ for (n, id) in ids.iter().enumerate() {
+ let clip = editor.project_mut().active_mut().clip_mut(id).unwrap();
+ clip.source_start = n as f64 * 15.0;
+ clip.scale = 1.5;
+ clip.volume = 0.6;
+ clip.speed = 1.2;
+ }
+ let before = editor.project().clone();
+ let Command::AddMedia { mut item } = media("/project/media/merged.mp4", 30.0, true) else {
+ unreachable!()
+ };
+ item.name = "Merged clips".into();
+ let command: Command = serde_json::from_value(json!({
+ "op": "consolidateClips", "clipIds": ids.iter().rev().collect::<Vec<_>>(), "item": item
+ }))
+ .expect("the consolidation command is available to API callers too");
+ let outcome = editor.apply(command).expect("consolidates");
+ assert_eq!(outcome.created_id.as_deref(), Some(first.as_str()));
+ let timeline = editor.project().active();
+ assert_eq!(timeline.clips.len(), 1);
+ let merged = timeline.clip(&first).unwrap();
+ assert_eq!(
+ (merged.start, merged.duration, merged.source_start),
+ (0.0, 30.0, 0.0)
+ );
+ assert_eq!((merged.scale, merged.volume, merged.speed), (1.0, 1.0, 1.0));
+ assert_eq!(
+ editor.project().media.len(),
+ 2,
+ "original media stays in the bin"
+ );
+ let after = editor.project().clone();
+ editor.undo();
+ assert_eq!(editor.project(), &before);
+ editor.redo();
+ assert_eq!(editor.project(), &after);
+ let document = editor.to_document(&settings());
+ assert_eq!(Editor::from_document(&document).unwrap().project(), &after);
+ }
+
+ #[test]
+ fn consolidation_refuses_invalid_selections_without_changing_the_edit() {
+ let (mut editor, media_id, first) = fixture();
+ let track = editor.project().active().tracks[0].id.clone();
+ let rest = lane(&mut editor, &media_id, &track, &[10.0, 20.0]);
+ let Command::AddMedia { item } = media("/merged.mp4", 30.0, true) else {
+ unreachable!()
+ };
+ for ids in [
+ vec![first.clone()],
+ vec![first.clone(), first.clone()],
+ vec![first.clone(), "gone".into()],
+ vec![first.clone(), rest[1].clone()], // Would cover an unselected clip.
+ ] {
+ let before = editor.project().clone();
+ assert!(
+ editor
+ .apply(Command::ConsolidateClips {
+ clip_ids: ids,
+ item: item.clone()
+ })
+ .is_err()
+ );
+ assert_eq!(editor.project(), &before);
+ }
+ let other = editor.project().active().tracks[1].id.clone();
+ editor
+ .project_mut()
+ .active_mut()
+ .clip_mut(&rest[0])
+ .unwrap()
+ .track_id = other;
+ assert!(
+ crate::consolidation_clips(
+ editor.project().active(),
+ &[first.clone(), rest[0].clone()]
+ )
+ .is_err()
+ );
+ editor
+ .project_mut()
+ .active_mut()
+ .clip_mut(&rest[0])
+ .unwrap()
+ .track_id = track;
+ editor
+ .project_mut()
+ .active_mut()
+ .clip_mut(&rest[0])
+ .unwrap()
+ .kind = ClipKind::Audio;
+ assert!(
+ crate::consolidation_clips(editor.project().active(), &[first, rest[0].clone()])
+ .is_err()
+ );
+ }
+
+ #[test]
+ fn consolidation_accepts_different_sources_and_preserves_its_span_and_neighbours() {
+ let (mut editor, _, first) = fixture();
+ let second_media = editor
+ .apply(media("/b.mp4", 10.0, false))
+ .unwrap()
+ .created_id
+ .unwrap();
+ let track = editor.project().active().tracks[0].id.clone();
+ let others = lane(&mut editor, &second_media, &track, &[12.0, 30.0]);
+ let neighbour = editor.project().active().clip(&others[1]).unwrap().clone();
+ let Command::AddMedia { item } = media("/merged.mp4", 22.0, true) else {
+ unreachable!()
+ };
+ editor
+ .apply(Command::ConsolidateClips {
+ clip_ids: vec![others[0].clone(), first.clone()],
+ item,
+ })
+ .unwrap();
+ let timeline = editor.project().active();
+ assert_eq!(
+ timeline.clip(&first).unwrap().duration,
+ 22.0,
+ "timeline gaps remain gaps"
+ );
+ assert_eq!(timeline.clip(&others[1]).unwrap(), &neighbour);
+ assert_eq!(editor.project().media.len(), 3);
+ }
+
+ #[test]
+ fn consolidation_refuses_a_short_or_non_video_render_atomically() {
+ let (mut editor, media_id, first) = fixture();
+ let track = editor.project().active().tracks[0].id.clone();
+ let second = lane(&mut editor, &media_id, &track, &[10.0])[0].clone();
+ let Command::AddMedia { mut item } = media("/bad.mp4", 1.0, true) else {
+ unreachable!()
+ };
+ let before = editor.project().clone();
+ assert!(
+ editor
+ .apply(Command::ConsolidateClips {
+ clip_ids: vec![first.clone(), second.clone()],
+ item: item.clone()
+ })
+ .is_err()
+ );
+ item.duration = Some(20.0);
+ item.kind = MediaKind::Audio;
+ assert!(
+ editor
+ .apply(Command::ConsolidateClips {
+ clip_ids: vec![first, second],
+ item
+ })
+ .is_err()
+ );
+ assert_eq!(editor.project(), &before);
+ }
+
+ #[test]
+ fn consolidation_refuses_layered_content_and_detached_audio() {
+ let (mut editor, media_id, first) = fixture();
+ let track = editor.project().active().tracks[0].id.clone();
+ let second = lane(&mut editor, &media_id, &track, &[10.0])[0].clone();
+ let ids = vec![first.clone(), second];
+ let original = editor.project().clone();
+ let upper = editor.project().active().tracks[1].id.clone();
+ for id in &ids {
+ editor
+ .project_mut()
+ .active_mut()
+ .clip_mut(id)
+ .unwrap()
+ .track_id = upper.clone();
+ }
+ lane(&mut editor, &media_id, &track, &[0.0]);
+ assert!(
+ crate::consolidation_clips(editor.project().active(), &ids).is_err(),
+ "opaque output must not cover lower content"
+ );
+ *editor.project_mut() = original;
+ editor
+ .apply(Command::DetachAudio { clip_id: first })
+ .unwrap();
+ assert!(
+ crate::consolidation_clips(editor.project().active(), &ids).is_err(),
+ "do not leave detached audio linked to a removed source"
+ );
+ }
+
+ #[test]
+ fn consolidation_requires_both_sides_of_edge_transitions() {
+ let (mut editor, media_id, first) = fixture();
+ let track = editor.project().active().tracks[0].id.clone();
+ let rest = lane(&mut editor, &media_id, &track, &[10.0, 20.0]);
+ editor
+ .project_mut()
+ .active_mut()
+ .clip_mut(&rest[0])
+ .unwrap()
+ .transition_in = Some(crate::model::Transition {
+ id: "cross-fade".into(),
+ duration: 0.4,
+ });
+ assert!(
+ crate::consolidation_clips(
+ editor.project().active(),
+ &[first.clone(), rest[0].clone()]
+ )
+ .is_ok(),
+ "internal transitions are baked"
+ );
+ assert!(
+ crate::consolidation_clips(editor.project().active(), &rest).is_err(),
+ "incoming boundary transition needs its predecessor"
+ );
+ assert!(
+ crate::consolidation_clips(editor.project().active(), &[first, rest[1].clone()])
+ .is_err()
+ );
+ }
+
+ #[test]
+ fn consolidation_refuses_subframe_spans_that_would_lose_a_rendered_frame() {
+ let (mut editor, media_id, first) = fixture();
+ let track = editor.project().active().tracks[0].id.clone();
+ let second = lane(&mut editor, &media_id, &track, &[10.0])[0].clone();
+ for (id, start) in [(&first, 5.01), (&second, 5.05)] {
+ let clip = editor.project_mut().active_mut().clip_mut(id).unwrap();
+ clip.start = start;
+ clip.duration = 0.04;
+ }
+ assert!(crate::consolidation_clips(editor.project().active(), &[first, second]).is_err());
+ }
+
#[test]
fn duplicate_media_paths_are_ignored() {
let mut editor = Editor::new();
diff --git a/src/crates/concat/locales/ar.json b/src/crates/concat/locales/ar.json
index 280382cd..545d35c4 100644
--- a/src/crates/concat/locales/ar.json
+++ b/src/crates/concat/locales/ar.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "تم تحميل {0} من الحزم المخصّصة من {1}",
"studio.lockTrack": "قفل المسار",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "أحادي",
"studio.mute": "كتم",
"studio.noRoomForTransition": "لا يوجد متّسع لانتقال هنا: يجب ألا يقل طول كل مقطع عن إطار واحد",
@@ -931,7 +941,6 @@
"studio.savingFrame": "جارٍ حفظ الإطار…",
"studio.selectClipTimelineFirst": "حدّد مقطعًا على المخطط الزمني أولًا",
"studio.selectTwoAdjacentClips": "حدّد مقطعين يلتقيان على المسار نفسه، ثم اختر انتقالًا",
- "studio.selectTwoClipsMerge": "حدّد مقطعين لدمجهما",
"studio.selectVideoImageClip": "حدّد مقطع فيديو أو صورة على المخطط الزمني أولًا",
"studio.selectVideoImageText": "حدّد مقطع فيديو أو صورة أو نص على المخطط الزمني أولًا",
"studio.settings": "الإعدادات…",
diff --git a/src/crates/concat/locales/bn.json b/src/crates/concat/locales/bn.json
index 04dfa05a..52eb1d50 100644
--- a/src/crates/concat/locales/bn.json
+++ b/src/crates/concat/locales/bn.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{1} থেকে {0}টি কাস্টম প্যাকেজ লোড হয়েছে",
"studio.lockTrack": "ট্র্যাক লক করুন",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "মনো",
"studio.mute": "মিউট",
"studio.noRoomForTransition": "এখানে ট্রানজিশনের জায়গা নেই: দুটি ক্লিপকেই কমপক্ষে এক ফ্রেম লম্বা হতে হবে",
@@ -931,7 +941,6 @@
"studio.savingFrame": "ফ্রেম সংরক্ষণ হচ্ছে…",
"studio.selectClipTimelineFirst": "আগে টাইমলাইনে একটি ক্লিপ নির্বাচন করুন",
"studio.selectTwoAdjacentClips": "একই ট্র্যাকে মিলে এমন দুটি ক্লিপ নির্বাচন করুন, তারপর একটি ট্রানজিশন বেছে নিন",
- "studio.selectTwoClipsMerge": "একত্র করতে দুটি ক্লিপ নির্বাচন করুন",
"studio.selectVideoImageClip": "আগে টাইমলাইনে একটি ভিডিও বা ছবির ক্লিপ নির্বাচন করুন",
"studio.selectVideoImageText": "আগে টাইমলাইনে একটি ভিডিও, ছবি বা টেক্সট ক্লিপ নির্বাচন করুন",
"studio.settings": "সেটিংস…",
diff --git a/src/crates/concat/locales/de.json b/src/crates/concat/locales/de.json
index cba8a259..48b8a5e8 100644
--- a/src/crates/concat/locales/de.json
+++ b/src/crates/concat/locales/de.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{0} eigene(s) Paket(e) aus {1} geladen",
"studio.lockTrack": "Spur sperren",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "mono",
"studio.mute": "Stumm",
"studio.noRoomForTransition": "Hier ist kein Platz für einen Übergang: beide Clips müssen mindestens ein Bild lang sein",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Bild wird gespeichert…",
"studio.selectClipTimelineFirst": "Wähle zuerst einen Clip auf der Zeitleiste",
"studio.selectTwoAdjacentClips": "Wähle zwei Clips, die auf derselben Spur aneinanderstoßen, und dann einen Übergang",
- "studio.selectTwoClipsMerge": "Wähle zwei Clips zum Zusammenführen",
"studio.selectVideoImageClip": "Wähle zuerst einen Video- oder Bildclip auf der Zeitleiste",
"studio.selectVideoImageText": "Wähle zuerst einen Video-, Bild- oder Textclip auf der Zeitleiste",
"studio.settings": "Einstellungen…",
diff --git a/src/crates/concat/locales/en.json b/src/crates/concat/locales/en.json
index 90e537d4..4304d362 100644
--- a/src/crates/concat/locales/en.json
+++ b/src/crates/concat/locales/en.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "Loaded {0} custom package(s) from {1}",
"studio.lockTrack": "Lock track",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "mono",
"studio.mute": "Mute",
"studio.noRoomForTransition": "There's no room for a transition here: both clips need to be at least a frame long",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Saving the frame…",
"studio.selectClipTimelineFirst": "Select a clip on the timeline first",
"studio.selectTwoAdjacentClips": "Select two clips that meet on the same track, then pick a transition",
- "studio.selectTwoClipsMerge": "Select two clips to merge",
"studio.selectVideoImageClip": "Select a video or image clip on the timeline first",
"studio.selectVideoImageText": "Select a video, image or text clip on the timeline first",
"studio.settings": "Settings…",
diff --git a/src/crates/concat/locales/es.json b/src/crates/concat/locales/es.json
index 63767fcc..3cced8aa 100644
--- a/src/crates/concat/locales/es.json
+++ b/src/crates/concat/locales/es.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{0} paquete(s) personalizado(s) cargado(s) desde {1}",
"studio.lockTrack": "Bloquear pista",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "mono",
"studio.mute": "Silenciar",
"studio.noRoomForTransition": "No hay espacio para una transición aquí: ambos clips deben durar al menos un fotograma",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Guardando el fotograma…",
"studio.selectClipTimelineFirst": "Selecciona primero un clip en la línea de tiempo",
"studio.selectTwoAdjacentClips": "Selecciona dos clips que se toquen en la misma pista y luego elige una transición",
- "studio.selectTwoClipsMerge": "Selecciona dos clips para unirlos",
"studio.selectVideoImageClip": "Selecciona primero un clip de vídeo o imagen en la línea de tiempo",
"studio.selectVideoImageText": "Selecciona primero un clip de vídeo, imagen o texto en la línea de tiempo",
"studio.settings": "Ajustes…",
diff --git a/src/crates/concat/locales/fa.json b/src/crates/concat/locales/fa.json
index 68a7dbe5..4f4f9441 100644
--- a/src/crates/concat/locales/fa.json
+++ b/src/crates/concat/locales/fa.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{0} بسته سفارشی از {1} بارگذاری شد",
"studio.lockTrack": "قفل کردن ترک",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "Mono",
"studio.mute": "بی‌صدا",
"studio.noRoomForTransition": "اینجا جایی برای گذار نیست: هر دو کلیپ باید دست‌کم یک فریم طول داشته باشند",
@@ -931,7 +941,6 @@
"studio.savingFrame": "در حال ذخیرهٔ فریم…",
"studio.selectClipTimelineFirst": "ابتدا یک کلیپ را روی تایم‌لاین انتخاب کنید",
"studio.selectTwoAdjacentClips": "دو کلیپ را که در یک ترک به هم می‌رسند انتخاب کنید، سپس یک گذار برگزینید",
- "studio.selectTwoClipsMerge": "دو کلیپ را برای ادغام انتخاب کنید",
"studio.selectVideoImageClip": "ابتدا یک ویدئو یا تصویر کلیپ را روی تایم‌لاین انتخاب کنید",
"studio.selectVideoImageText": "ابتدا یک کلیپ ویدئو، تصویر یا متن را روی تایم‌لاین انتخاب کنید",
"studio.settings": "تنظیمات…",
diff --git a/src/crates/concat/locales/fr.json b/src/crates/concat/locales/fr.json
index 81e8b9b4..b8a3593b 100644
--- a/src/crates/concat/locales/fr.json
+++ b/src/crates/concat/locales/fr.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{0} paquet(s) personnalisé(s) chargé(s) depuis {1}",
"studio.lockTrack": "Verrouiller la piste",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "mono",
"studio.mute": "Muet",
"studio.noRoomForTransition": "Pas de place pour une transition ici : les deux clips doivent durer au moins une image",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Enregistrement de l’image…",
"studio.selectClipTimelineFirst": "Sélectionnez d'abord un clip sur la timeline",
"studio.selectTwoAdjacentClips": "Sélectionnez deux clips qui se touchent sur la même piste, puis choisissez une transition",
- "studio.selectTwoClipsMerge": "Sélectionnez deux clips à fusionner",
"studio.selectVideoImageClip": "Sélectionnez d'abord un clip vidéo ou image sur la timeline",
"studio.selectVideoImageText": "Sélectionnez d'abord un clip vidéo, image ou texte sur la timeline",
"studio.settings": "Réglages…",
diff --git a/src/crates/concat/locales/he.json b/src/crates/concat/locales/he.json
index 4807cc5b..9f1c7146 100644
--- a/src/crates/concat/locales/he.json
+++ b/src/crates/concat/locales/he.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "נטענו {0} חבילות מותאמות מתוך {1}",
"studio.lockTrack": "נעילת ערוץ",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "מונו",
"studio.mute": "השתקה",
"studio.noRoomForTransition": "אין כאן מקום למעבר: שני הקליפים צריכים להיות באורך פריים אחד לפחות",
@@ -931,7 +941,6 @@
"studio.savingFrame": "שומר את הפריים…",
"studio.selectClipTimelineFirst": "יש לבחור קודם קליפ בציר הזמן",
"studio.selectTwoAdjacentClips": "יש לבחור שני קליפים שנפגשים באותו ערוץ, ואז לבחור מעבר",
- "studio.selectTwoClipsMerge": "יש לבחור שני קליפים למיזוג",
"studio.selectVideoImageClip": "יש לבחור קודם קליפ וידאו או תמונה בציר הזמן",
"studio.selectVideoImageText": "יש לבחור קודם קליפ וידאו, תמונה או טקסט בציר הזמן",
"studio.settings": "הגדרות…",
diff --git a/src/crates/concat/locales/hi.json b/src/crates/concat/locales/hi.json
index ada8d920..258ffa5e 100644
--- a/src/crates/concat/locales/hi.json
+++ b/src/crates/concat/locales/hi.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{1} से {0} कस्टम पैकेज लोड हुए",
"studio.lockTrack": "ट्रैक लॉक करें",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "मोनो",
"studio.mute": "म्यूट करें",
"studio.noRoomForTransition": "यहां ट्रांज़िशन के लिए जगह नहीं है: दोनों क्लिप कम से कम एक फ़्रेम लंबी होनी चाहिए",
@@ -931,7 +941,6 @@
"studio.savingFrame": "फ़्रेम सेव हो रहा है…",
"studio.selectClipTimelineFirst": "पहले टाइमलाइन पर कोई क्लिप चुनें",
"studio.selectTwoAdjacentClips": "एक ही ट्रैक पर आपस में मिलती दो क्लिप चुनें, फिर कोई ट्रांज़िशन चुनें",
- "studio.selectTwoClipsMerge": "मर्ज करने के लिए दो क्लिप चुनें",
"studio.selectVideoImageClip": "पहले टाइमलाइन पर कोई वीडियो या इमेज क्लिप चुनें",
"studio.selectVideoImageText": "पहले टाइमलाइन पर कोई वीडियो, इमेज या टेक्स्ट क्लिप चुनें",
"studio.settings": "सेटिंग…",
diff --git a/src/crates/concat/locales/hr.json b/src/crates/concat/locales/hr.json
index 9d7c7ad6..62030434 100644
--- a/src/crates/concat/locales/hr.json
+++ b/src/crates/concat/locales/hr.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "Učitano {0} prilagođenih paketa iz {1}",
"studio.lockTrack": "Zaključaj traku",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "mono",
"studio.mute": "Utišaj",
"studio.noRoomForTransition": "Ovdje nema mjesta za prijelaz: oba isječka moraju trajati barem jednu sličicu",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Spremanje sličice…",
"studio.selectClipTimelineFirst": "Prvo odaberite klip na vremenskoj liniji",
"studio.selectTwoAdjacentClips": "Odaberite dva isječka koja se dodiruju na istoj traci, zatim odaberite prijelaz",
- "studio.selectTwoClipsMerge": "Odaberite dva klipa za spajanje",
"studio.selectVideoImageClip": "Prvo odaberite video ili slikovni klip na vremenskoj liniji",
"studio.selectVideoImageText": "Prvo odaberite video, slikovni ili tekstualni klip na vremenskoj liniji",
"studio.settings": "Postavke…",
diff --git a/src/crates/concat/locales/id.json b/src/crates/concat/locales/id.json
index 66e0d6b8..61c8bcd3 100644
--- a/src/crates/concat/locales/id.json
+++ b/src/crates/concat/locales/id.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{0} paket kustom dimuat dari {1}",
"studio.lockTrack": "Kunci trek",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "mono",
"studio.mute": "Bisukan",
"studio.noRoomForTransition": "Tidak ada ruang untuk transisi di sini: kedua klip harus sepanjang minimal satu bingkai",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Menyimpan bingkai…",
"studio.selectClipTimelineFirst": "Pilih klip di linimasa dulu",
"studio.selectTwoAdjacentClips": "Pilih dua klip yang bersambung di trek yang sama, lalu pilih transisi",
- "studio.selectTwoClipsMerge": "Pilih dua klip untuk digabung",
"studio.selectVideoImageClip": "Pilih klip video atau gambar di linimasa dulu",
"studio.selectVideoImageText": "Pilih klip video, gambar, atau teks di linimasa dulu",
"studio.settings": "Pengaturan…",
diff --git a/src/crates/concat/locales/it.json b/src/crates/concat/locales/it.json
index 505dc54d..0076b187 100644
--- a/src/crates/concat/locales/it.json
+++ b/src/crates/concat/locales/it.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{0} pacchetti personalizzati caricati da {1}",
"studio.lockTrack": "Blocca traccia",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "mono",
"studio.mute": "Muto",
"studio.noRoomForTransition": "Non c'è spazio per una transizione qui: entrambe le clip devono durare almeno un fotogramma",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Salvataggio del fotogramma…",
"studio.selectClipTimelineFirst": "Seleziona prima una clip sulla timeline",
"studio.selectTwoAdjacentClips": "Seleziona due clip che si toccano sulla stessa traccia, poi scegli una transizione",
- "studio.selectTwoClipsMerge": "Seleziona due clip da unire",
"studio.selectVideoImageClip": "Seleziona prima una clip video o immagine sulla timeline",
"studio.selectVideoImageText": "Seleziona prima una clip video, immagine o testo sulla timeline",
"studio.settings": "Impostazioni…",
diff --git a/src/crates/concat/locales/ja.json b/src/crates/concat/locales/ja.json
index 143c2be5..48808699 100644
--- a/src/crates/concat/locales/ja.json
+++ b/src/crates/concat/locales/ja.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{1} から {0} 個のカスタムパッケージを読み込みました",
"studio.lockTrack": "トラックをロック",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "モノラル",
"studio.mute": "ミュート",
"studio.noRoomForTransition": "ここにはトランジションを入れる余地がありません。両方のクリップが少なくとも 1フレーム必要です",
@@ -931,7 +941,6 @@
"studio.savingFrame": "フレームを保存中…",
"studio.selectClipTimelineFirst": "まずタイムラインでクリップを選択してください",
"studio.selectTwoAdjacentClips": "同じトラックで隣り合う 2つのクリップを選び、トランジションを選択してください",
- "studio.selectTwoClipsMerge": "結合するクリップを 2つ選択してください",
"studio.selectVideoImageClip": "まずタイムラインで映像または画像のクリップを選択してください",
"studio.selectVideoImageText": "まずタイムラインでビデオ、画像、またはテキストのクリップを選択してください",
"studio.settings": "設定…",
diff --git a/src/crates/concat/locales/ko.json b/src/crates/concat/locales/ko.json
index 5c837598..c7a696b3 100644
--- a/src/crates/concat/locales/ko.json
+++ b/src/crates/concat/locales/ko.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{1}에서 사용자 지정 패키지 {0}개를 불러왔습니다",
"studio.lockTrack": "트랙 잠금",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "mono",
"studio.mute": "음소거",
"studio.noRoomForTransition": "여기에는 전환을 넣을 공간이 없습니다. 두 클립 모두 최소 한 프레임 이상이어야 합니다",
@@ -931,7 +941,6 @@
"studio.savingFrame": "프레임 저장 중…",
"studio.selectClipTimelineFirst": "먼저 타임라인에서 클립을 선택하세요",
"studio.selectTwoAdjacentClips": "같은 트랙에서 맞닿은 두 클립을 선택한 뒤 전환을 고르세요",
- "studio.selectTwoClipsMerge": "합칠 클립 두 개를 선택하세요",
"studio.selectVideoImageClip": "먼저 타임라인에서 영상 또는 이미지 클립을 선택하세요",
"studio.selectVideoImageText": "먼저 타임라인에서 영상, 이미지 또는 텍스트 클립을 선택하세요",
"studio.settings": "설정…",
diff --git a/src/crates/concat/locales/nl.json b/src/crates/concat/locales/nl.json
index bc1a7f68..ae54fd0d 100644
--- a/src/crates/concat/locales/nl.json
+++ b/src/crates/concat/locales/nl.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "Eigen pakketten geladen: {0}, uit {1}",
"studio.lockTrack": "Spoor vergrendelen",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "mono",
"studio.mute": "Dempen",
"studio.noRoomForTransition": "Hier is geen ruimte voor een overgang: beide clips moeten minstens één frame lang zijn",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Frame opslaan…",
"studio.selectClipTimelineFirst": "Selecteer eerst een clip op de tijdlijn",
"studio.selectTwoAdjacentClips": "Selecteer twee clips die elkaar raken op hetzelfde spoor en kies dan een overgang",
- "studio.selectTwoClipsMerge": "Selecteer twee clips om samen te voegen",
"studio.selectVideoImageClip": "Selecteer eerst een video- of afbeeldingsclip op de tijdlijn",
"studio.selectVideoImageText": "Selecteer eerst een video-, afbeeldings- of tekstclip op de tijdlijn",
"studio.settings": "Instellingen…",
diff --git a/src/crates/concat/locales/pl.json b/src/crates/concat/locales/pl.json
index dde6b33c..e8882274 100644
--- a/src/crates/concat/locales/pl.json
+++ b/src/crates/concat/locales/pl.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "Wczytane własne pakiety: {0}, z {1}",
"studio.lockTrack": "Zablokuj ścieżkę",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "mono",
"studio.mute": "Wycisz",
"studio.noRoomForTransition": "Nie ma tu miejsca na przejście: oba klipy muszą mieć co najmniej jedną klatkę długości",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Zapisywanie klatki…",
"studio.selectClipTimelineFirst": "Najpierw zaznacz klip na osi czasu",
"studio.selectTwoAdjacentClips": "Zaznacz dwa klipy, które stykają się na tej samej ścieżce, a potem wybierz przejście",
- "studio.selectTwoClipsMerge": "Zaznacz dwa klipy do scalenia",
"studio.selectVideoImageClip": "Najpierw zaznacz na osi czasu klip wideo lub obraz",
"studio.selectVideoImageText": "Najpierw zaznacz na osi czasu klip wideo, obraz lub tekst",
"studio.settings": "Ustawienia…",
diff --git a/src/crates/concat/locales/pt-BR.json b/src/crates/concat/locales/pt-BR.json
index 4dde6bad..749fd145 100644
--- a/src/crates/concat/locales/pt-BR.json
+++ b/src/crates/concat/locales/pt-BR.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{0} pacote(s) personalizado(s) carregado(s) de {1}",
"studio.lockTrack": "Bloquear faixa",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "mono",
"studio.mute": "Mudo",
"studio.noRoomForTransition": "Não há espaço para uma transição aqui: os dois clipes precisam ter pelo menos um quadro",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Salvando o quadro…",
"studio.selectClipTimelineFirst": "Selecione primeiro um clipe na linha do tempo",
"studio.selectTwoAdjacentClips": "Selecione dois clipes que se encontram na mesma faixa e depois escolha uma transição",
- "studio.selectTwoClipsMerge": "Selecione dois clipes para unir",
"studio.selectVideoImageClip": "Selecione primeiro um clipe de vídeo ou imagem na linha do tempo",
"studio.selectVideoImageText": "Selecione primeiro um clipe de vídeo, imagem ou texto na linha do tempo",
"studio.settings": "Configurações…",
diff --git a/src/crates/concat/locales/ru.json b/src/crates/concat/locales/ru.json
index ea772f1f..687f0c7e 100644
--- a/src/crates/concat/locales/ru.json
+++ b/src/crates/concat/locales/ru.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "Загружено пользовательских пакетов: {0} из {1}",
"studio.lockTrack": "Заблокировать дорожку",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Отменить объединение ({0}%)",
+ "studio.mergeCancelled": "Объединение отменено. Исходные фрагменты сохранены.",
+ "studio.mergeCouldNotReplace": "Не удалось заменить выделенные фрагменты.",
+ "studio.mergeExportBusy": "Дождитесь завершения экспорта перед объединением.",
+ "studio.mergeFailed": "Не удалось объединить фрагменты: {0}",
+ "studio.mergeFinished": "Фрагменты объединены. Отмена действия восстановит исходные фрагменты.",
+ "studio.mergeSelected": "Объединить выделенные фрагменты",
+ "studio.mergeStarted": "Объединение фрагментов. Нажмите кнопку объединения ещё раз для отмены.",
+ "studio.mergeTrackLocked": "Разблокируйте дорожку перед объединением.",
+ "studio.mergedClips": "Объединённые фрагменты",
"studio.mono": "моно",
"studio.mute": "Без звука",
"studio.noRoomForTransition": "Здесь нет места для перехода: оба клипа должны длиться не меньше кадра",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Сохранение кадра…",
"studio.selectClipTimelineFirst": "Сначала выберите клип на таймлайне",
"studio.selectTwoAdjacentClips": "Выберите два клипа, которые стыкуются на одной дорожке, затем выберите переход",
- "studio.selectTwoClipsMerge": "Выберите два клипа для объединения",
"studio.selectVideoImageClip": "Сначала выберите видео или изображение на таймлайне",
"studio.selectVideoImageText": "Сначала выберите видео, изображение или текстовый клип на таймлайне",
"studio.settings": "Настройки…",
diff --git a/src/crates/concat/locales/th.json b/src/crates/concat/locales/th.json
index e1548c41..415a0307 100644
--- a/src/crates/concat/locales/th.json
+++ b/src/crates/concat/locales/th.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "โหลดแพ็กเกจกำหนดเอง {0} รายการจาก {1} แล้ว",
"studio.lockTrack": "ล็อกแทร็ก",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "โมโน",
"studio.mute": "ปิดเสียง",
"studio.noRoomForTransition": "ไม่มีที่ว่างสำหรับทรานซิชันตรงนี้: ทั้งสองคลิปต้องยาวอย่างน้อยหนึ่งเฟรม",
@@ -931,7 +941,6 @@
"studio.savingFrame": "กำลังบันทึกเฟรม…",
"studio.selectClipTimelineFirst": "เลือกคลิปบนไทม์ไลน์ก่อน",
"studio.selectTwoAdjacentClips": "เลือกสองคลิปที่ต่อกันบนแทร็กเดียวกัน แล้วเลือกทรานซิชัน",
- "studio.selectTwoClipsMerge": "เลือกสองคลิปเพื่อรวม",
"studio.selectVideoImageClip": "เลือกคลิปวิดีโอหรือภาพบนไทม์ไลน์ก่อน",
"studio.selectVideoImageText": "เลือกคลิปวิดีโอ ภาพ หรือข้อความบนไทม์ไลน์ก่อน",
"studio.settings": "การตั้งค่า…",
diff --git a/src/crates/concat/locales/tr.json b/src/crates/concat/locales/tr.json
index e25ba27e..310edb72 100644
--- a/src/crates/concat/locales/tr.json
+++ b/src/crates/concat/locales/tr.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{1} konumundan {0} özel paket yüklendi",
"studio.lockTrack": "Parçayı kilitle",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "mono",
"studio.mute": "Sessiz",
"studio.noRoomForTransition": "Burada geçiş için yer yok: her iki klip de en az bir kare uzunluğunda olmalı",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Kare kaydediliyor…",
"studio.selectClipTimelineFirst": "Önce zaman çizelgesinde bir klip seçin",
"studio.selectTwoAdjacentClips": "Aynı parçada birbirine değen iki klip seçin, sonra bir geçiş seçin",
- "studio.selectTwoClipsMerge": "Birleştirmek için iki klip seçin",
"studio.selectVideoImageClip": "Önce zaman çizelgesinde bir video veya görüntü klibi seçin",
"studio.selectVideoImageText": "Önce zaman çizelgesinde bir video, görüntü veya metin klibi seçin",
"studio.settings": "Ayarlar…",
diff --git a/src/crates/concat/locales/uk.json b/src/crates/concat/locales/uk.json
index 69d6ff12..75ff014b 100644
--- a/src/crates/concat/locales/uk.json
+++ b/src/crates/concat/locales/uk.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "Завантажено власних пакетів: {0} з {1}",
"studio.lockTrack": "Заблокувати доріжку",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "моно",
"studio.mute": "Вимкнути звук",
"studio.noRoomForTransition": "Тут немає місця для переходу: обидва кліпи мають бути завдовжки щонайменше один кадр",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Збереження кадру…",
"studio.selectClipTimelineFirst": "Спершу виберіть кліп на часовій шкалі",
"studio.selectTwoAdjacentClips": "Виберіть два кліпи, що стикуються на одній доріжці, а потім виберіть перехід",
- "studio.selectTwoClipsMerge": "Виберіть два кліпи для об’єднання",
"studio.selectVideoImageClip": "Спершу виберіть на часовій шкалі кліп із відео чи зображенням",
"studio.selectVideoImageText": "Спершу виберіть на часовій шкалі кліп із відео, зображенням чи текстом",
"studio.settings": "Налаштування…",
diff --git a/src/crates/concat/locales/ur.json b/src/crates/concat/locales/ur.json
index 102267f9..9f1b165c 100644
--- a/src/crates/concat/locales/ur.json
+++ b/src/crates/concat/locales/ur.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "{1} سے {0} حسبِ منشا پیکج لوڈ ہوئے",
"studio.lockTrack": "ٹریک لاک کریں",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "مونو",
"studio.mute": "خاموش کریں",
"studio.noRoomForTransition": "یہاں ٹرانزیشن کی جگہ نہیں: دونوں کلپس کم از کم ایک فریم لمبے ہونے چاہییں",
@@ -931,7 +941,6 @@
"studio.savingFrame": "فریم محفوظ ہو رہا ہے…",
"studio.selectClipTimelineFirst": "پہلے ٹائم لائن پر کوئی کلپ منتخب کریں",
"studio.selectTwoAdjacentClips": "ایک ہی ٹریک پر ملنے والے دو کلپس منتخب کریں، پھر کوئی ٹرانزیشن چنیں",
- "studio.selectTwoClipsMerge": "ملانے کے لیے دو کلپس منتخب کریں",
"studio.selectVideoImageClip": "پہلے ٹائم لائن پر کوئی ویڈیو یا تصویری کلپ منتخب کریں",
"studio.selectVideoImageText": "پہلے ٹائم لائن پر کوئی ویڈیو، تصویر یا متن کلپ منتخب کریں",
"studio.settings": "ترتیبات…",
diff --git a/src/crates/concat/locales/vi.json b/src/crates/concat/locales/vi.json
index 266e6e96..fe46c9e8 100644
--- a/src/crates/concat/locales/vi.json
+++ b/src/crates/concat/locales/vi.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "Đã tải {0} gói tùy chỉnh từ {1}",
"studio.lockTrack": "Khóa đường",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "đơn âm",
"studio.mute": "Tắt tiếng",
"studio.noRoomForTransition": "Không đủ chỗ cho chuyển cảnh: cả hai clip phải dài ít nhất một khung hình",
@@ -931,7 +941,6 @@
"studio.savingFrame": "Đang lưu khung hình…",
"studio.selectClipTimelineFirst": "Trước tiên, hãy chọn một clip trên dòng thời gian",
"studio.selectTwoAdjacentClips": "Chọn hai clip tiếp giáp nhau trên cùng một đường, sau đó chọn chuyển cảnh",
- "studio.selectTwoClipsMerge": "Chọn hai clip để ghép",
"studio.selectVideoImageClip": "Trước tiên, hãy chọn clip video hoặc hình ảnh trên dòng thời gian",
"studio.selectVideoImageText": "Trước tiên, hãy chọn clip video, hình ảnh hoặc văn bản trên dòng thời gian",
"studio.settings": "Cài đặt…",
diff --git a/src/crates/concat/locales/vn.json b/src/crates/concat/locales/vn.json
index 2ea54e99..3048c311 100644
--- a/src/crates/concat/locales/vn.json
+++ b/src/crates/concat/locales/vn.json
@@ -897,6 +897,16 @@
"studio.loadedCustomPackagesFrom": "Đã tải {0} gói tùy chỉnh từ {1}",
"studio.lockTrack": "Khóa đường",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "đơn âm",
"studio.mute": "Tắt tiếng",
"studio.noRoomForTransition": "Không đủ chỗ cho chuyển cảnh: cả hai clip phải dài ít nhất một khung hình",
@@ -920,7 +930,6 @@
"studio.savingFrame": "Đang lưu khung hình…",
"studio.selectClipTimelineFirst": "Trước tiên, hãy chọn một clip trên dòng thời gian",
"studio.selectTwoAdjacentClips": "Chọn hai clip tiếp giáp nhau trên cùng một đường, sau đó chọn chuyển cảnh",
- "studio.selectTwoClipsMerge": "Chọn hai clip để ghép",
"studio.selectVideoImageClip": "Trước tiên, hãy chọn clip video hoặc hình ảnh trên dòng thời gian",
"studio.selectVideoImageText": "Trước tiên, hãy chọn clip video, hình ảnh hoặc văn bản trên dòng thời gian",
"studio.settings": "Cài đặt…",
diff --git a/src/crates/concat/locales/zh-Hans.json b/src/crates/concat/locales/zh-Hans.json
index e1501c7c..bb9d5e3d 100644
--- a/src/crates/concat/locales/zh-Hans.json
+++ b/src/crates/concat/locales/zh-Hans.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "已从 {1} 加载 {0} 个自定义包",
"studio.lockTrack": "锁定轨道",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "单声道",
"studio.mute": "静音",
"studio.noRoomForTransition": "这里没有放转场的空间:两个片段都至少需要一帧长",
@@ -931,7 +941,6 @@
"studio.savingFrame": "正在保存帧…",
"studio.selectClipTimelineFirst": "请先在时间线上选择一个片段",
"studio.selectTwoAdjacentClips": "选择同一轨道上相邻的两个片段,然后选择一个转场",
- "studio.selectTwoClipsMerge": "选择两个片段进行合并",
"studio.selectVideoImageClip": "请先在时间线上选择一个视频或图片片段",
"studio.selectVideoImageText": "请先在时间线上选择一个视频、图片或文本片段",
"studio.settings": "设置…",
diff --git a/src/crates/concat/locales/zh-TW.json b/src/crates/concat/locales/zh-TW.json
index 50d081db..685ea1a7 100644
--- a/src/crates/concat/locales/zh-TW.json
+++ b/src/crates/concat/locales/zh-TW.json
@@ -908,6 +908,16 @@
"studio.loadedCustomPackagesFrom": "已載入 {0} 個自訂套件,來源:{1}",
"studio.lockTrack": "鎖定軌道",
"studio.lut": "LUT",
+ "studio.mergeCancelProgress": "Cancel merging ({0}%)",
+ "studio.mergeCancelled": "Merging cancelled. The original clips are unchanged.",
+ "studio.mergeCouldNotReplace": "Could not replace the selected clips.",
+ "studio.mergeExportBusy": "Wait for the current export before merging clips.",
+ "studio.mergeFailed": "Could not merge clips: {0}",
+ "studio.mergeFinished": "Selected clips merged. Undo restores the original clips.",
+ "studio.mergeSelected": "Merge selected clips",
+ "studio.mergeStarted": "Merging selected clips. Click Merge again to cancel.",
+ "studio.mergeTrackLocked": "Unlock the track before merging clips.",
+ "studio.mergedClips": "Merged clips",
"studio.mono": "單聲道",
"studio.mute": "靜音",
"studio.noRoomForTransition": "這裡沒有放轉場的空間:兩個片段都至少需要一格長",
@@ -931,7 +941,6 @@
"studio.savingFrame": "正在儲存畫格…",
"studio.selectClipTimelineFirst": "請先在時間軸上選取一個片段",
"studio.selectTwoAdjacentClips": "選取同一軌道上相鄰的兩個片段,然後選擇一個轉場",
- "studio.selectTwoClipsMerge": "選取兩個片段進行合併",
"studio.selectVideoImageClip": "請先在時間軸上選取一個影片或圖片片段",
"studio.selectVideoImageText": "請先在時間軸上選取一個影片、圖片或文字片段",
"studio.settings": "設定…",
diff --git a/src/crates/concat/src/studio.rs b/src/crates/concat/src/studio.rs
index 70656cdb..3acdd267 100644
--- a/src/crates/concat/src/studio.rs
+++ b/src/crates/concat/src/studio.rs
@@ -38,11 +38,14 @@ use concat_host::{
templates,
};
use concat_media::{Pyramid, jpeg};
+use concat_project::Command;
use concat_project::commands::{ClipMove, ClipPatch, TrackFlag, TrimEdge};
use concat_project::model::{
self, AppliedFilter, Clip, Project, TextAlign, TextStyle, Timeline, Track, Transition,
};
-use concat_project::{Command, why_not_merge};
+
+mod consolidate;
+use consolidate::MergeJob;
use slint::{Model, ModelRc, SharedString, VecModel};
use crate::dock::{
@@ -948,6 +951,8 @@ pub struct Studio {
enhance_jobs: HashMap<String, (bool, f32)>,
/// Reverse writing a clip's backwards copy, by clip: how far along.
reverse_jobs: HashMap<String, f32>,
+ /// A selection being rendered into one clip, with its own cancel flag.
+ merge_job: Option<MergeJob>,
/// The smart stroke being read, by the same name, while one is.
region_job: Option<String>,
/// The last smart stroke as the stage drew it, kept on screen from the
@@ -2163,6 +2168,7 @@ impl Studio {
cutout_jobs: HashMap::new(),
enhance_jobs: HashMap::new(),
reverse_jobs: HashMap::new(),
+ merge_job: None,
region_job: None,
pending_stroke: None,
host,
@@ -6696,27 +6702,6 @@ impl Studio {
self.selection.clear();
}
- pub fn merge_blocked(&self) -> Option<String> {
- if self.selection.len() != 2 {
- return Some(t("studio.selectTwoClipsMerge"));
- }
- why_not_merge(self.timeline(), &self.selection)
- }
-
- pub fn merge(&mut self) {
- if self.merge_blocked().is_some() {
- return;
- }
- let ids = self.selection.clone();
- let kept = ids[0].clone();
- self.apply(Command::MergeClips { clip_ids: ids });
- self.selection = if self.clip(&kept).is_some() {
- vec![kept]
- } else {
- Vec::new()
- };
- }
-
/// A freeze frame at the playhead on a picture clip.
///
/// Video extracts a JPEG still into the project cache; images reuse their
@@ -7249,6 +7234,7 @@ impl Studio {
self.host.reversers.cancel();
self.enhance_jobs.clear();
self.reverse_jobs.clear();
+ self.cancel_merge();
self.cutout_jobs.clear();
self.region_job = None;
if let Some(session) = self.session.as_mut() {
@@ -7962,6 +7948,7 @@ impl Studio {
editor.set_picture_selected(picture_selected);
editor.set_freezable(freezable);
editor.set_reversible(reversible);
+ editor.set_merge_label(self.merge_label().into());
editor.set_merge_blocked_because(match self.merge_blocked() {
Some(reason) => reason.into(),
None => SharedString::new(),
@@ -9623,6 +9610,13 @@ impl Studio {
&platform::keys(&["Control", "B"]),
straddled && !locked,
),
+ action(
+ "merge",
+ self.merge_label(),
+ Glyph::Merge,
+ "",
+ self.merge_blocked().is_none(),
+ ),
action(
"freeze",
"Freeze frame".into(),
@@ -10366,6 +10360,7 @@ impl Studio {
self.split_at(at, true);
}
"freeze" => self.freeze_at_playhead(),
+ "merge" => self.merge(),
// The menu opens the clip's Enhance in the inspector, where its
// switch starts it and later turns it off and on again.
"enhance" => {
diff --git a/src/crates/concat/src/studio/consolidate.rs b/src/crates/concat/src/studio/consolidate.rs
new file mode 100644
index 00000000..16287fa0
--- /dev/null
+++ b/src/crates/concat/src/studio/consolidate.rs
@@ -0,0 +1,213 @@
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// SPDX-FileCopyrightText: 2026 Jareer and Concat contributors
+
+//! Selection consolidation: render first, then replace in one undo step.
+
+use std::path::PathBuf;
+use std::sync::atomic::{AtomicBool, Ordering};
+
+use concat_host::consolidate::Consolidation;
+use concat_project::consolidation_clips;
+
+use super::*;
+
+pub(super) struct MergeJob {
+ cancel: Arc<AtomicBool>,
+ progress: f32,
+}
+
+/// Removes an unadopted render even when its project was closed before
+/// the worker's callback arrived. Successful edits keep the generated media
+/// through undo/redo and across cache clearing.
+struct RenderedFile {
+ folder: PathBuf,
+ keep: bool,
+}
+
+impl Drop for RenderedFile {
+ fn drop(&mut self) {
+ if !self.keep {
+ let _ = std::fs::remove_file(self.folder.join("merged.mp4"));
+ let _ = std::fs::remove_dir(&self.folder);
+ }
+ }
+}
+
+impl Studio {
+ pub fn merge_blocked(&self) -> Option<String> {
+ if self.merge_job.is_some() {
+ return None; // The same action cancels a running merge.
+ }
+ if self.host.exporter.is_busy() {
+ return Some(t("studio.mergeExportBusy"));
+ }
+ if self.selection.iter().any(|id| {
+ self.clip(id)
+ .is_some_and(|clip| self.locked(&clip.track_id))
+ }) {
+ return Some(t("studio.mergeTrackLocked"));
+ }
+ consolidation_clips(self.timeline(), &self.selection)
+ .err()
+ .map(|error| error.to_string())
+ }
+
+ pub(super) fn merge_label(&self) -> String {
+ match &self.merge_job {
+ Some(job) => tf(
+ "studio.mergeCancelProgress",
+ &[&format!("{:.0}", job.progress * 100.0)],
+ ),
+ None => t("studio.mergeSelected"),
+ }
+ }
+
+ pub(super) fn cancel_merge(&mut self) {
+ if let Some(job) = self.merge_job.take() {
+ job.cancel.store(true, Ordering::Relaxed);
+ }
+ }
+
+ pub fn merge(&mut self) {
+ if let Some(job) = &self.merge_job {
+ job.cancel.store(true, Ordering::Relaxed);
+ return;
+ }
+ self.flush_commit();
+ if let Some(reason) = self.merge_blocked() {
+ self.notify(&reason, true);
+ return;
+ }
+ let Some(session) = self.session.as_ref() else {
+ return;
+ };
+ let plan = match Consolidation::new(session.project(), &self.selection) {
+ Ok(plan) => plan,
+ Err(error) => {
+ self.notify(&error, true);
+ return;
+ }
+ };
+ let job = match self.host.exporter.begin() {
+ Ok(job) => job,
+ Err(error) => {
+ self.notify(&error, true);
+ return;
+ }
+ };
+ let root = PathBuf::from(session.path());
+ let stamp = std::time::SystemTime::now()
+ .duration_since(std::time::UNIX_EPOCH)
+ .unwrap_or_default()
+ .as_nanos();
+ let folder = root.join("media").join(format!("merged-{stamp}"));
+ if let Err(error) =
+ std::fs::create_dir_all(root.join("media")).and_then(|()| std::fs::create_dir(&folder))
+ {
+ self.notify(&tf("studio.mergeFailed", &[&error.to_string()]), true);
+ return;
+ }
+ let rendered = RenderedFile {
+ folder: folder.clone(),
+ keep: false,
+ };
+ let output = folder.join("merged.mp4");
+ let request = plan.request(session.project(), &root, &output);
+ let compositor = self.host.monitor.off_thread();
+ self.merge_job = Some(MergeJob {
+ cancel: job.cancel_handle(),
+ progress: 0.0,
+ });
+ self.pause();
+ self.notify(&t("studio.mergeStarted"), false);
+ let epoch = crate::host::project_epoch();
+ spawn_in_project(
+ move || {
+ let mut last = -1.0;
+ let result = concat_host::export::run_on(
+ &request,
+ compositor,
+ job.cancel_flag(),
+ |progress| {
+ let fraction =
+ (progress.frame as f32 / progress.total.max(1) as f32).clamp(0.0, 1.0);
+ if fraction - last >= 0.02 {
+ last = fraction;
+ on_ui_in_project(epoch, move |studio, _, _| {
+ if let Some(job) = studio.merge_job.as_mut() {
+ job.progress = fraction;
+ }
+ });
+ }
+ },
+ );
+ let cancel = job.cancel_handle();
+ (plan, rendered, output, cancel, result)
+ },
+ |studio, _, _, (plan, mut rendered, output, cancel, result)| {
+ studio.merge_job = None;
+ if cancel.load(Ordering::Relaxed) {
+ studio.notify(&t("studio.mergeCancelled"), false);
+ return;
+ }
+ let outcome = result.and_then(|_| {
+ let summary = media::probe(&output.to_string_lossy())?;
+ let mut item = summary.to_new_media();
+ item.name = t("studio.mergedClips");
+ item.origin = Some(model::MediaOrigin::Processed);
+ studio.flush_commit();
+ let command = plan.replacement(studio.project(), item)?;
+ // Locking a lane while rendering must also prevent adoption.
+ if studio.locked(plan.track_id()) {
+ return Err(t("studio.mergeTrackLocked"));
+ }
+ studio
+ .apply(command)
+ .ok_or_else(|| t("studio.mergeCouldNotReplace"))
+ });
+ match outcome {
+ Ok(id) => {
+ rendered.keep = true;
+ studio.selection = vec![id];
+ studio.transition_selected = None;
+ studio.request_media_art();
+ studio.request_preview();
+ studio.notify(&t("studio.mergeFinished"), false);
+ }
+ Err(error) => studio.notify(&tf("studio.mergeFailed", &[&error]), true),
+ }
+ },
+ );
+ }
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn unadopted_render_is_removed_but_adopted_media_survives() {
+ let folder =
+ std::env::temp_dir().join(format!("concat-merge-cleanup-{}", std::process::id()));
+ std::fs::create_dir(&folder).unwrap();
+ let output = folder.join("merged.mp4");
+ std::fs::write(&output, b"rendered source").unwrap();
+ drop(RenderedFile {
+ folder: folder.clone(),
+ keep: false,
+ });
+ assert!(
+ !folder.exists(),
+ "cancel, failure and stale delivery clean up the source"
+ );
+ std::fs::create_dir(&folder).unwrap();
+ std::fs::write(&output, b"adopted source").unwrap();
+ drop(RenderedFile {
+ folder: folder.clone(),
+ keep: true,
+ });
+ assert!(output.is_file(), "undo/redo still needs adopted media");
+ std::fs::remove_file(output).unwrap();
+ std::fs::remove_dir(folder).unwrap();
+ }
+}
diff --git a/src/crates/concat/ui/editor.slint b/src/crates/concat/ui/editor.slint
index 468fc6e9..2f51291c 100644
--- a/src/crates/concat/ui/editor.slint
+++ b/src/crates/concat/ui/editor.slint
@@ -310,6 +310,7 @@ export global Editor {
in-out property <bool> can-undo;
in-out property <bool> can-redo;
in-out property <string> merge-blocked-because;
+ in-out property <string> merge-label;
/// What the selection offers the tray's sound and word tools: one clip
/// with sound for Captions to start on, one title for Speak to read.
/// Hints, not gates - both sheets open without them.
diff --git a/src/crates/concat/ui/timeline/tray.slint b/src/crates/concat/ui/timeline/tray.slint
index d9545547..c5d25643 100644
--- a/src/crates/concat/ui/timeline/tray.slint
+++ b/src/crates/concat/ui/timeline/tray.slint
@@ -169,6 +169,7 @@ export component TimelineTray inherits Rectangle {
in property <bool> can-redo;
/// Empty when the selection can be merged; otherwise why it cannot.
in property <string> merge-blocked-because;
+ in property <string> merge-label;
/// What the selection offers the sound and word tools. Each is one
/// clip's worth of truth, decided by Rust; see the Editor global.
in property <bool> sound-selected;
@@ -279,7 +280,7 @@ export component TimelineTray inherits Rectangle {
// so `label` — the accessible name, and where a tooltip will read
// from — is the honest place to park it. A permanent caption in
// the tray would answer a question nobody had asked yet.
- label: root.merge-blocked-because == "" ? "Merge selected"
+ label: root.merge-blocked-because == "" ? root.merge-label
: root.merge-blocked-because;
enabled: root.merge-blocked-because == "";
icon-size: 16px;
diff --git a/src/crates/concat/ui/workspace/seat.slint b/src/crates/concat/ui/workspace/seat.slint
index 3ef91fdf..ac8bddb4 100644
--- a/src/crates/concat/ui/workspace/seat.slint
+++ b/src/crates/concat/ui/workspace/seat.slint
@@ -388,6 +388,7 @@ export component Seat inherits Rectangle {
can-undo: Editor.can-undo;
can-redo: Editor.can-redo;
merge-blocked-because: Editor.merge-blocked-because;
+ merge-label: Editor.merge-label;
sound-selected: Editor.sound-selected;
title-selected: Editor.title-selected;
picture-selected: Editor.picture-selected;
diff --git a/src/crates/concat/ui/workspace/timeline-pane.slint b/src/crates/concat/ui/workspace/timeline-pane.slint
index 8e27b92f..cd1a3d4a 100644
--- a/src/crates/concat/ui/workspace/timeline-pane.slint
+++ b/src/crates/concat/ui/workspace/timeline-pane.slint
@@ -47,6 +47,7 @@ export component TimelinePane inherits Rectangle {
in property <bool> can-undo;
in property <bool> can-redo;
in property <string> merge-blocked-because;
+ in property <string> merge-label;
in property <bool> sound-selected;
in property <bool> title-selected;
in property <bool> picture-selected;
@@ -318,6 +319,7 @@ export component TimelinePane inherits Rectangle {
can-undo: root.can-undo;
can-redo: root.can-redo;
merge-blocked-because: root.merge-blocked-because;
+ merge-label: root.merge-label;
sound-selected: root.sound-selected;
title-selected: root.title-selected;
picture-selected: root.picture-selected;