AutoShorts is a local-first desktop application for turning long-form video or audio recordings into high-impact, vertical short-form clip candidates (9:16 portrait) with AI-powered viral moment ranking.
Rust
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct EnvironmentStatus {
pub data_dir: String,
pub has_ffmpeg: bool,
pub has_ffprobe: bool,
pub has_deepgram_key: bool,
pub has_anthropic_key: bool,
pub has_deepseek_key: bool,
pub has_gemini_key: bool,
pub has_openai_key: bool,
pub has_openrouter_key: bool,
pub has_groq_key: bool,
pub llm_provider: String,
pub has_local_whisper_model: bool,
pub has_ollama: bool,
pub has_ytdlp: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct MediaProbe {
pub duration_sec: Option<f64>,
pub has_video: bool,
pub width: Option<i64>,
pub height: Option<i64>,
pub video_codec: Option<String>,
pub audio_codec: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Project {
pub id: String,
pub name: Option<String>,
pub source_path: String,
pub source_duration: Option<f64>,
pub status: String,
pub transcription_mode: String,
pub caption_style: Option<String>,
pub created_at: String,
pub updated_at: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Transcript {
pub id: String,
pub project_id: String,
pub engine: String,
pub raw_json: String,
pub language: Option<String>,
pub created_at: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Candidate {
pub id: String,
pub project_id: String,
pub start_sec: f64,
pub end_sec: f64,
pub score: f64,
pub hook: String,
pub rationale: String,
pub rank: i64,
pub selected: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Clip {
pub id: String,
pub candidate_id: String,
pub status: String,
pub output_path: Option<String>,
pub face_track_json: Option<String>,
pub caption_ass_path: Option<String>,
pub render_log: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ClipCopy {
pub id: String,
pub clip_id: String,
pub platform: String,
pub hook_text: Option<String>,
pub caption_text: Option<String>,
pub hashtags: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProjectDetail {
pub project: Project,
pub transcript: Option<Transcript>,
pub candidates: Vec<Candidate>,
pub clips: Vec<Clip>,
pub copy: Vec<ClipCopy>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct NormalizedTranscript {
pub language: String,
pub duration: f64,
pub speakers: Vec<String>,
pub words: Vec<TranscriptWord>,
pub segments: Vec<TranscriptSegment>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TranscriptWord {
pub text: String,
pub start: f64,
pub end: f64,
pub speaker: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct TranscriptSegment {
pub start: f64,
pub end: f64,
pub speaker: Option<String>,
pub text: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CandidateDraft {
pub start: f64,
pub end: f64,
pub score: f64,
pub hook: String,
pub rationale: String,
}