feat(downloads): editor concat — multi-segment join (cut-list)
Editor v2 backend: an edit_spec can carry a 'segments' cut-list that concatenates the kept ranges into ONE file (accurate=filter_complex trim+concat re-encode; fast=concat-demuxer stream-copy with per-segment inpoint/outpoint). normalize/edit_sig/clip_duration/needs_reencode handle segments; worker writes the concat list + runs build_concat_plan. Single-trim path (used by 'separate files' export) unchanged.
This commit is contained in:
parent
04c461837f
commit
b372d48ced
2 changed files with 88 additions and 10 deletions
|
|
@ -489,7 +489,12 @@ def _process_edit(job_id: int, asset_id: int) -> None:
|
|||
dest_staging = staging / f"out.{out_ext}"
|
||||
|
||||
_set_job(job_id, phase="editing", progress=0, speed_bps=None, eta_s=None)
|
||||
cmd = editmod.build_edit_cmd(src_path, dest_staging, edit_spec, out_ext)
|
||||
if edit_spec.get("segments"):
|
||||
cmd, prep = editmod.build_concat_plan(src_path, dest_staging, edit_spec, out_ext, staging)
|
||||
for p, content in prep.items():
|
||||
p.write_text(content, encoding="utf-8")
|
||||
else:
|
||||
cmd = editmod.build_edit_cmd(src_path, dest_staging, edit_spec, out_ext)
|
||||
editmod.run_ffmpeg(
|
||||
cmd,
|
||||
total_s,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue