i am a developer working on a video editor project and trying to develop a feature that exports videos into capcut. One thing im stuck with i linking the media (lost media). Capcut seems to know where the files are from its draft_info.json file material paths but still wants me to link it manually.
Does anyone has experience with reverse engineering capcut projects? Would be awesome if the solution comes from here.
1 Answer
Try placing your media directly inside the CapCut project directory under material/import/ and update all references in draft_content.json to use relative paths (CapCut often prefers local paths for self-contained portability).
Try re-encoding media using FFmpeg:
ffmpeg -i input.mp4 -c:v libx264 -preset fast -crf 18 -c:a aac output.mp4
Update: Turns out CapCut uses more than just file paths as it likely checks UUIDs, import timestamps, and maybe even file hashes.
I found a full reverse-engineering process and a working Python script that automatically relinks CapCut media by updating draft_info.json and draft_content.json correctly.