Skip to content

Open-source AI podcast clipper. Generate vertical clips with face tracking and burned-in captions. CLI, MCP server, web app.

Release 2.7.16

Nika Siradze68827a6d4395
diff --git a/backend/main.py b/backend/main.py
index ee6c224..52ec787 100644
--- a/backend/main.py
+++ b/backend/main.py
@@ -188,6 +188,7 @@ def handle_create_clip(task_id: str, params: dict):
face_map=params.get("face_map"),
keep_segments=params.get("keep_segments"),
trim_opening=params.get("trim_opening"),
+ preserve_timing=params.get("preserve_timing", False),
allow_ass_fallback=params.get("allow_ass_fallback", False),
use_ass_captions=params.get("use_ass_captions", False),
keep_caption_overlay=params.get("keep_caption_overlay", False),
diff --git a/backend/services/clip_generator.py b/backend/services/clip_generator.py
index cfc1c8e..ab4c078 100644
--- a/backend/services/clip_generator.py
+++ b/backend/services/clip_generator.py
@@ -296,6 +296,25 @@ def _transition_autofix_passes(jumps_possible: bool) -> int:
return 2 if jumps_possible else 0
+def _render_transition_autofix_passes(
+ preserve_timing: bool,
+ reframe: bool,
+ crop_strategy: str,
+ crop_keyframes: list = None,
+ keep_segments: list = None,
+) -> int:
+ if preserve_timing:
+ return 0
+ return _transition_autofix_passes(
+ _reframe_can_jump(
+ reframe=reframe,
+ crop_strategy=crop_strategy,
+ crop_keyframes=crop_keyframes,
+ keep_segments=keep_segments,
+ )
+ )
+
+
def _auto_fix_transition_jumps(video_path: str, max_passes: int = 1) -> bool:
"""
Bounded auto-fix for jumpy transitions. Never loops indefinitely.
@@ -711,6 +730,7 @@ def generate_clip(
clean_fillers: bool = True,
keep_segments: list[dict] = None,
trim_opening: Optional[bool] = None,
+ preserve_timing: bool = False,
allow_ass_fallback: bool = False,
use_ass_captions: bool = False,
keep_caption_overlay: bool = False,
@@ -1124,13 +1144,12 @@ def generate_clip(
# Optional bounded QA/autofix pass for transition jumps.
# Hard-capped to avoid any infinite rerender loop.
- max_autofix_passes = _transition_autofix_passes(
- _reframe_can_jump(
- reframe=spec.reframe,
- crop_strategy=crop_strategy,
- crop_keyframes=crop_keyframes,
- keep_segments=keep_segments,
- )
+ max_autofix_passes = _render_transition_autofix_passes(
+ preserve_timing=preserve_timing,
+ reframe=spec.reframe,
+ crop_strategy=crop_strategy,
+ crop_keyframes=crop_keyframes,
+ keep_segments=keep_segments,
)
if max_autofix_passes > 0:
if progress_callback:
diff --git a/cli/VERSION b/cli/VERSION
index f24054f..35b46ae 100644
--- a/cli/VERSION
+++ b/cli/VERSION
@@ -1 +1 @@
-2.7.15
+2.7.16
diff --git a/package-lock.json b/package-lock.json
index b7e6282..d349279 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "podcli",
- "version": "2.7.15",
+ "version": "2.7.16",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "podcli",
- "version": "2.7.15",
+ "version": "2.7.16",
"license": "AGPL-3.0-only",
"dependencies": {
"@fontsource/dm-sans": "^5.3.0",
diff --git a/package.json b/package.json
index b351cef..744b649 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "podcli",
- "version": "2.7.15",
+ "version": "2.7.16",
"private": true,
"description": "AI-powered podcast clip generator for TikTok/YouTube Shorts. Transcribe, find viral moments, export vertical clips with burned captions.",
"type": "module",
diff --git a/src/ui/web-server.ts b/src/ui/web-server.ts
index 400e24d..4a431d7 100644
--- a/src/ui/web-server.ts
+++ b/src/ui/web-server.ts
@@ -3102,6 +3102,10 @@ app.post("/api/clips/:id/rerender", async (req, res) => {
}
// If trimmed wider/narrower, keep only words inside the new bounds.
const words = allWords.filter((w: any) => typeof w?.start !== "number" || (w.start >= startSecond && w.start < endSecond));
+ const recipeAsset = (key: "logo_path" | "outro_path" | "intro_path") => {
+ const value = recipe[key];
+ return typeof value === "string" && value.trim() ? value : undefined;
+ };
try {
const result = await executor.execute<ClipResult>("create_clip", {
video_path: clip.source_video,
@@ -3111,11 +3115,12 @@ app.post("/api/clips/:id/rerender", async (req, res) => {
crop_strategy: trimOnly ? (recipe.crop_strategy as string) || clip.crop_strategy || "face" : "manual",
...(trimOnly ? {} : { crop_keyframes: keyframes }),
transcript_words: words,
- logo_path: (recipe.logo_path as string) ?? clip.logo_path ?? null,
- outro_path: trimOnly ? null : (recipe.outro_path as string) ?? clip.outro_path ?? null,
- intro_path: trimOnly ? null : ("intro_path" in recipe ? (recipe.intro_path ?? null) : (clip.intro_path ?? null)),
+ logo_path: recipeAsset("logo_path") ?? clip.logo_path ?? null,
+ outro_path: recipeAsset("outro_path") ?? clip.outro_path ?? null,
+ intro_path: recipeAsset("intro_path") ?? clip.intro_path ?? null,
clean_fillers: trimOnly ? false : (recipe.clean_fillers !== undefined ? recipe.clean_fillers : true),
trim_opening: trimOnly ? false : undefined,
+ preserve_timing: trimOnly ? true : undefined,
...(trimOnly ? {} : recipe.keep_segments ? { keep_segments: recipe.keep_segments } : {}),
title: clip.title,
output_dir: dirname(clip.output_path),
@@ -3141,7 +3146,6 @@ app.post("/api/clips/:id/rerender", async (req, res) => {
duration: result.data.duration ?? clip.duration,
file_size_mb: result.data.file_size_mb ?? clip.file_size_mb,
output_path: outPath,
- ...(trimOnly ? { intro_path: "", outro_path: "", logo_backup_path: "" } : {}),
});
res.json({ ok: true, output_path: outPath, file_size_mb: result.data.file_size_mb, thumbnail_baked: thumbnailBaked });
} catch (e: any) {
diff --git a/tests/test_clip_generator.py b/tests/test_clip_generator.py
index 7711ca8..88db064 100644
--- a/tests/test_clip_generator.py
+++ b/tests/test_clip_generator.py
@@ -321,6 +321,28 @@ class TransitionAutofixGatingTests(unittest.TestCase):
with mock.patch.dict(os.environ, {"PODCLI_TRANSITION_AUTOFIX_PASSES": "junk"}):
self.assertEqual(cg._transition_autofix_passes(True), 2)
+ def test_preserve_timing_skips_transition_autofix(self):
+ with mock.patch.dict(os.environ, {"PODCLI_TRANSITION_AUTOFIX_PASSES": "2"}):
+ self.assertEqual(
+ cg._render_transition_autofix_passes(
+ preserve_timing=True,
+ reframe=True,
+ crop_strategy="face",
+ ),
+ 0,
+ )
+
+ def test_regular_face_crop_still_runs_transition_autofix(self):
+ with mock.patch.dict(os.environ, {"PODCLI_TRANSITION_AUTOFIX_PASSES": "2"}):
+ self.assertEqual(
+ cg._render_transition_autofix_passes(
+ preserve_timing=False,
+ reframe=True,
+ crop_strategy="face",
+ ),
+ 2,
+ )
+
class OutputPathReservationTests(unittest.TestCase):
def setUp(self):