Python Script for Exporting Blender Animations to CapCut-Compatible Format

Hi everyone,

I run a website that provides CapCut templates and video editing resources, and I’m currently working on a workflow that allows users to create animations in Blender and export them in a format that can be used directly in CapCut. However, I’m facing some technical challenges with my Python script:

  1. Exporting Motion Data:
  • I’m trying to extract keyframe animation data from Blender and convert it into a JSON format that CapCut can recognize. While I can retrieve keyframe positions, rotations, and scales using bpy, I’m unsure how to format them properly for CapCut’s editing system. Does anyone have experience with CapCut’s JSON structure for animation?
  1. Converting Blender Camera and Effects for CapCut:
  • CapCut allows some basic 3D-like effects and camera motion. I’d like to export Blender’s camera animation so it can be replicated in CapCut. What’s the best way to translate Blender’s camera movements into a format CapCut can interpret?
  1. Rendering Alpha-Enabled Videos for Overlay in CapCut:
  • I want to render animations with a transparent background (RGBA) so users can overlay them in CapCut. I’m using FFmpeg for encoding, but CapCut doesn’t seem to recognize WebM or ProRes with alpha channels. What’s the best format and encoding settings for transparent video layers in CapCut?
  1. Automating Batch Export with Python:
  • I’ve written a basic Python script that automates animation export from Blender, but it only works for simple scenes. When handling multiple objects with constraints or drivers, the data isn’t exporting correctly. Are there any best practices for batch-exporting animated objects in Blender via Python?

What I’ve Tried:

  • Extracted keyframe data with bpy.data.objects["Object"].animation_data and converted it to JSON, but the structure doesn’t seem compatible with CapCut.
  • Used bpy.ops.render.opengl(animation=True) to export sequences as PNGs with transparency, but batch processing is slow.
  • Experimented with different video codecs in FFmpeg, but CapCut doesn’t recognize some transparent video formats.

Has anyone here worked on exporting animations from Blender for use in CapCut or similar video editing software? Any guidance on JSON formatting, camera export, or transparency-friendly encoding would be greatly appreciated!

Thanks in advance!

Is there anyone who can help me with this?

Is there anyone who can help me with this? I would love your guidance

I am seeking advice thanks.

No idea what CapCut is but to achieve this you either need to find description of CapCut acceptable format or investigate it yourself. From what you’re saying, it seems CapCut have some option to accept jsons for import - then you need to find some working example of json and replicate it’s structure in your Blender script. Also software that supports importing this format may also support exporting it - so you can export known type of data from it to .json and investigate resulting file.

Thanks for your response! CapCut is a popular mobile and desktop video editing app, and it does support some JSON-based motion templates, though documentation on its structure is scarce.

I’ve been trying to reverse-engineer its JSON format by exporting keyframe data from CapCut’s built-in templates, but I haven’t found a clear pattern yet. If anyone has experience with similar motion JSON formats from other editors (like After Effects or Lottie), that could be helpful for reference.

As for exporting directly from Blender, I’ll keep experimenting with structuring the JSON output to match what CapCut expects. If anyone has suggestions on the best way to analyze JSON output from CapCut or automate batch exports with Python, I’d love to hear them!

Thanks again!

Json is as close to humanly readable as you can get, try to export an extremely simple scene from your soft and open the file with a text editor, preferably one that supports json formatting like notepad++ and you should be able to reverse-engineer it.