Skip to main content

Crate oximedia_edit

Crate oximedia_edit 

Source
Expand description

Video timeline editor for OxiMedia.

oximedia-edit provides a comprehensive video editing system with:

  • Multi-track timeline: Manage video, audio, and subtitle tracks
  • Clip operations: Add, remove, move, trim, split clips
  • Advanced editing: Ripple, roll, slip, and slide edits
  • Effects system: Apply effects with keyframe animation
  • Transitions: Cross-fades, dissolves, wipes, and more
  • Rendering: Real-time preview and high-quality export

§Example

use oximedia_edit::{Timeline, TimelineEditor, Clip, ClipType};
use oximedia_core::Rational;

// Create a timeline
let mut timeline = Timeline::new(
    Rational::new(1, 1000),  // 1ms timebase
    Rational::new(30, 1),     // 30 fps
);

// Add video track
let video_track = timeline.add_track(oximedia_edit::TrackType::Video);

// Create and add a clip
let clip = Clip::new(1, ClipType::Video, 0, 5000); // 5 seconds
timeline.add_clip(video_track, clip)?;

// Edit operations
let mut editor = TimelineEditor::new();
timeline.set_playhead(2500); // Seek to 2.5 seconds
editor.split_at_playhead(&mut timeline)?;

§Architecture

The editing system is built around these core components:

§Timeline

The Timeline is the central structure containing multiple Tracks. Each track holds Clips that represent media segments.

§Clips

Clips are segments of media with timing information:

  • Timeline position and duration
  • Source media and in/out points
  • Speed and direction (normal/reverse)
  • Effects and opacity

§Effects

The effect module provides an effects system with:

  • Common effects (brightness, blur, color correction)
  • Keyframe animation with interpolation
  • Effect stacks per clip

§Transitions

Transitions provide smooth blending between adjacent clips:

  • Video transitions (dissolve, wipe, zoom)
  • Audio cross-fades
  • Easing functions

§Editing Operations

The TimelineEditor provides editing operations:

  • Cut, copy, paste
  • Split and trim
  • Ripple, roll, slip, slide edits
  • Speed changes and reverse

§Rendering

The render module handles timeline rendering:

§Green List Only

Like all OxiMedia components, oximedia-edit only supports patent-free codecs (AV1, VP9, VP8, Opus, Vorbis, FLAC). Attempting to use patent- encumbered codecs will result in errors.

Re-exports§

pub use clip::Clip;
pub use clip::ClipId;
pub use clip::ClipRef;
pub use clip::ClipSelection;
pub use clip::ClipType;
pub use clip::Clipboard;
pub use edit::EditMode;
pub use edit::TimelineEditor;
pub use effect::Effect;
pub use effect::EffectInstance;
pub use effect::EffectPreset;
pub use effect::EffectStack;
pub use effect::EffectType;
pub use effect::InterpolationMode;
pub use effect::Parameter;
pub use effect::ParameterValue;
pub use error::EditError;
pub use error::EditResult;
pub use group::ClipGroup;
pub use group::CompoundClip;
pub use group::CompoundClipManager;
pub use group::GroupManager;
pub use group::LinkManager;
pub use group::LinkType;
pub use marker::InOutPoints;
pub use marker::Marker;
pub use marker::MarkerId;
pub use marker::MarkerManager;
pub use marker::MarkerType;
pub use marker::Region;
pub use marker::RegionManager;
pub use render::BackgroundRenderer;
pub use render::ExportRenderer;
pub use render::ExportSettings;
pub use render::PreviewRenderer;
pub use render::RawFrameCache;
pub use render::RenderConfig;
pub use render::RenderFrame;
pub use render::RenderQuality;
pub use render::TimelineRenderer;
pub use render::RAW_FRAME_CACHE_CAPACITY;
pub use timeline::PlaybackState;
pub use timeline::Timeline;
pub use timeline::TimelineConfig;
pub use timeline::Track;
pub use timeline::TrackType;
pub use transition::EasingFunction;
pub use transition::Transition;
pub use transition::TransitionBuilder;
pub use transition::TransitionManager;
pub use transition::TransitionParameters;
pub use transition::TransitionPresets;
pub use transition::TransitionType;

Modules§

auto_edit
Automatic editing operations.
blade_tool
Blade/razor tool for cutting clips at specific frame positions.
clip
Clip types and management.
clip_arrange
Clip arrangement operations: distribute, align, close gaps, snap to grid.
clip_speed
Clip speed and reverse control for timeline clips.
collab_edit
Collaborative editing support for the timeline editor.
color_grade_edit
Color grading edit nodes for the timeline editor.
color_label
Clip color labels and metadata tags for organizational workflow.
edit
Edit operations for the timeline.
edit_context
Edit context management for scoped editing operations.
edit_macro
Edit macro recording and playback.
edit_preset
Edit presets and templates for common editing patterns.
edl
Edit Decision List (EDL) parsing and generation.
edl_import
EDL import: parse CMX 3600 edit decision lists into crate::clip::Clip slices.
effect
Effect system with keyframe animation.
error
Error types for the timeline editor.
export
Timeline export: CMX3600 EDL, FCP-compatible XML, and CSV clip-list.
frame_prefetch
Predictive pre-fetch for frames near the playhead position.
fx_strip
FX strip and effect slot management for clips.
group
Clip grouping and linking.
group_edit
Group editing operations for multi-clip batch modifications.
history
Edit history for undo/redo functionality.
history_tree
Branching history tree for undo/redo.
incremental_render
Incremental / dirty-region rendering for the timeline editor.
insert_mode
Insert mode semantics for clip placement operations.
interval_tree
Interval tree for O(log n) clip lookup by time position.
magnetic_snap
Magnetic timeline snapping for clip alignment.
marker
Timeline markers and regions.
marker_edit
Marker editing operations for timeline annotation management.
multi_export
Multi-format export from a single timeline.
multicam
Multi-camera editing support with sync point alignment.
multitrack
Multi-track edit operations.
nested_sequence
Nested sequence (sub-sequence) support for timeline editing.
parallel_render
Parallel / multi-threaded rendering for the timeline editor.
picture_in_picture
Picture-in-picture layout with position-preset and keyframe animation.
pip
Picture-in-Picture (PiP) layout with position/scale keyframes.
prelude
Prelude module for convenient imports.
proxy
Proxy workflow for efficient editing.
render
Timeline rendering.
render_queue
Render queue for batch export of multiple timelines.
render_source
Render source resolution for the timeline rendering pipeline.
ripple
Ripple editing operations for the timeline.
selection
Selection management for timeline editing.
slip_slide
Slip and slide edit operations for the timeline editor.
smart_trim
Smart / intelligent trim operations for the timeline editor.
timeline
Timeline and track structures.
timeline_export
EDL/XML timeline export for interchange with external NLEs.
timeline_validator
Timeline validation: detect structural issues such as overlapping clips, gaps, zero-duration clips, inconsistent source ranges, and orphan references.
title_overlay
Title and text overlay generation for timeline editing.
track_lock
Track locking and protection system.
transition
Transition effects between clips.
trim_mode
Trim mode and dual-roller trim operations.
trim_selection
Trim-to-selection: extract a contiguous sub-range from a clip list.
waveform
Audio waveform generation for visual editing feedback.

Constants§

VERSION
Version information.