Spaces:
Sleeping
Sleeping
Update src/capsule_builder.py
Browse files224 unmodified lines225226227224 unmodified linesexcept Exception as e:print(f"[Export] ❌ Erreur ZIP : {e}")return None224 unmodified lines225226227228229230231232233234235236237238239240241242243244245224 unmodified linesexcept Exception as e:print(f"[Export] ❌ Erreur ZIP : {e}")return Nonedef assemble_final_fast():"""Concaténation instantanée sans réencodage (FFmpeg direct)."""import subprocess, osif not capsules:return None, "❌ Aucune capsule."list_path = os.path.join(OUT_DIR, "concat_list.txt")with open(list_path, "w", encoding="utf-8") as f:for c in capsules:f.write(f"file '{c['file']}'\n")out_path = os.path.join(OUT_DIR, "VIDEO_COMPLETE_FAST.mp4")cmd = ["ffmpeg", "-f", "concat", "-safe", "0", "-i", list_path,"-c", "copy", out_path]subprocess.run(cmd, check=True)return out_path, "🎉 Vidéo finale assemblée instantanément (sans réencodage)"
src/capsule_builder.py+18