Skip to content

Black Screen in CapCut Preview #48

Closed

Description

@iamvince

Hello! I'm experiencing issue of Black Screen in CapCut. The software versions are:

CapCut Version: 6.7
OS: Windows 11

Steps I took in CapCut API:

Response:
{
"error": "",
"output": {
"draft_id": "dfd_cat_1760015650_231b8d91",
"draft_url": "https://www.install-ai-guider.top/draft/downloader?draft_id=dfd_cat_1760015650_231b8d91&is_capcut=1"
},
"success": true
}

  • Invoked save_draft, below is request and response pair of API
    Request:
    {
    "draft_id": "dfd_cat_1760015650_231b8d91",
    "draft_folder": "/Users/Pawan/AppData/Local/CapCut/User Data/Projects/com.lveditor.draft",
    "is_capcut": 8845
    }

Response:
{
"error": "",
"output": {
"draft_url": "",
"success": true
},
"success": true
}

  • Copy and Pasted the draft manually to CapCut Draft directory i.e. /Users/Pawan/AppData/Local/CapCut/User Data/Projects/com.lveditor.draf

  • Opened the draft but files doesn't shows in media only in timeline and even preview is Black Screen.

Steps took to fix, but didn't work:

  • In CapCut Performance settings turned off : Interface Rendering and SpeedUp hardware decoding inside Encoding and Decoding section. But, it didn't fix the issue.
  • Tried to remove cache and restarted capcut that also didn't work.

In draft_info.json file: "videos" sub-section of "materials" main section in json file looks like as below. Please check if "media_path" and "path" variable has correct values.

"videos": [
{
"audio_fade": null,
"category_id": "",
"category_name": "local",
"check_flag": 63487,
"crop": {
"upper_left_x": 0.0,
"upper_left_y": 0.0,
"upper_right_x": 1.0,
"upper_right_y": 0.0,
"lower_left_x": 0.0,
"lower_left_y": 1.0,
"lower_right_x": 1.0,
"lower_right_y": 1.0
},
"crop_ratio": "free",
"crop_scale": 1.0,
"duration": 10800000000,
"height": 1080,
"id": "ef4c74a7c4673cd09e0f539cedb3fff4",
"local_material_id": "",
"material_id": "ef4c74a7c4673cd09e0f539cedb3fff4",
"material_name": "image_2ff56732bbdb32bb.png",
"media_path": "",
"path": "/Users/Pawan/AppData/Local/CapCut/User Data/Projects/com.lveditor.draft\dfd_cat_1760015650_231b8d91\assets\image\image_2ff56732bbdb32bb.png",
"remote_url": "https://images.pexels.com/photos/16415238/pexels-photo-16415238.jpeg",
"type": "photo",
"width": 1920
}
],

Please find attached screenshot for your reference.
Image

I also found this on stackoverflow if it could be of help : https://stackoverflow.com/questions/79627704/capcut-reverse-engineer-link-media

Thank you for this amazing open source project!

Activity

  1. sun-guannan commented on Oct 10, 2025

    @sun-guannan
    Owner

    Hello! Based on the detailed steps and JSON configuration you provided, here is the analysis and the most likely solution to the Black Screen issue:

    Analysis of the Black Screen Issue

    Your issue strongly suggests a file path mismatch preventing the CapCut application from locating the local media file within the draft.

    1. CapCut API Drafts and Media Panel:
      Drafts generated via the CapCut API are designed to load and work directly in the timeline based on the project file (draft_info.json). It is often the case that these API-created assets will not appear in the CapCut's Media panel; they are typically only visible on the timeline. Therefore, the fact that your file isn't in the Media panel is normal and not the main cause of the black screen.

    2. Incorrect draft_folder Parameter:
      The core problem appears to be a misconfiguration of the draft_folder parameter in your save_draft API call.

      • Your Request: You explicitly mentioned your OS is Windows 11.
      • Your save_draft Request Path:
        "draft_folder": "/Users/Pawan/AppData/Local/CapCut/User Data/Projects/com.lveditor.draft" 
      • The Conflict: The path /Users/Pawan/... is a common format used on macOS or Unix-like systems, even though you are running Windows 11. On Windows, this path should typically start with a drive letter (e.g., C:\) and use backslashes (\) or correctly formatted forward slashes (/). CapCut is likely failing to parse this non-native path correctly, even after you manually copy the files.

    Recommended Fix

    You need to ensure the draft_folder parameter in the save_draft API call points to the correct, Windows-native path format.

    1. Correct the save_draft Parameter

    When invoking the save_draft API, set the draft_folder parameter to your local CapCut Draft directory using the proper Windows path format.

    Example of a Corrected Path (Using Windows Drive Letter and Backslashes):

    {
    "draft_id": "dfd_cat_1760015650_231b8d91",
    "draft_folder": "C:\\Users\\Pawan\\AppData\\Local\\CapCut\\User Data\\Projects\\com.lveditor.draft",
    "is_capcut": 1
    }
    • Note 1: The path must begin with the correct drive letter (e.g., C:).
    • Note 2: If you use backslashes (\) in JSON, they must be escaped with a double backslash (\\).

    2. Verify Local Asset Files

    After successfully running the corrected save_draft API:

    • Crucially, check the generated directory inside your CapCut projects folder:
      C:\Users\Pawan\AppData\Local\CapCut\User Data\Projects\com.lveditor.draft\dfd_cat_1760015650_231b8d91\assets\image\
    • Confirm that the file image_2ff56732bbdb32bb.png exists in this location.

    By fixing the path format in the API call to match your Windows OS, CapCut should be able to correctly link the timeline entry to the local asset, resolving the black screen preview.

  2. iamvince commented on Oct 10, 2025

    @iamvince
    Author

    Thank you for your quick response. I tried with your suggested approach but it is still showing the same black screen preview.

    For your reference:

    • Below is the save_draft API request
      Request BODY:
      { "draft_id": "dfd_cat_1760110737_031efb69", "draft_folder": "C:\\Users\\Pawan\\AppData\\Local\\CapCut\\User Data\\Projects\\com.lveditor.draft", "is_capcut": 1 }

    • draft_info.json :
      "videos": [ { "audio_fade": null, "category_id": "", "category_name": "local", "check_flag": 63487, "crop": { "upper_left_x": 0.0, "upper_left_y": 0.0, "upper_right_x": 1.0, "upper_right_y": 0.0, "lower_left_x": 0.0, "lower_left_y": 1.0, "lower_right_x": 1.0, "lower_right_y": 1.0 }, "crop_ratio": "free", "crop_scale": 1.0, "duration": 10800000000, "height": 1080, "id": "ef4c74a7c4673cd09e0f539cedb3fff4", "local_material_id": "", "material_id": "ef4c74a7c4673cd09e0f539cedb3fff4", "material_name": "image_2ff56732bbdb32bb.png", "media_path": "", "path": "C:\\Users\\Pawan\\AppData\\Local\\CapCut\\User Data\\Projects\\com.lveditor.draft\\dfd_cat_1760110737_031efb69\\assets\\image\\image_2ff56732bbdb32bb.png", "remote_url": "https://images.pexels.com/photos/16415238/pexels-photo-16415238.jpeg", "type": "photo", "width": 1920 } ],

    • Checked asset is present in the directory asset/image. Attached images are the proof.

    Note: "User Data" in draft_folder path has space in between both words, is this could be the issue. If yes, how to fix?
    "draft_folder": "C:\\Users\\Pawan\\AppData\\Local\\CapCut\\User Data\\Projects\\com.lveditor.draft"

    Note: I am not manually loading files on timeline, drafts folder shows the timeline correct. I moved the draft from CapCutAPI folder to CapCut Drafts folder manualy by copy pasting. But there after on opening the draft in capcut it shows timeline itself I am not importing assets on timeline myself it is self done by draft configuration of capcutapi logic that created this draft.

    Image Image

    Please help!

  3. iamvince commented on Oct 11, 2025

    @iamvince
    Author

    Did you get the chance to look into the issue. I urge you to please replicate it once at your end on windows box. Regards

  4. iamvince commented on Oct 13, 2025

    @iamvince
    Author

    Sir, any update ?

  5. sun-guannan commented on Oct 15, 2025

    @sun-guannan
    Owner
  6. iamvince commented on Oct 15, 2025

    @iamvince
    Author

    Thanks for your response, As mentioned in am using the
    CapCut Version: 6.7
    OS: Windows 11

    But I will try both 6.5 and must updated CapCut version currently and will get back to you on this shortly. Thanks once again.

  7. iamvince commented on Oct 15, 2025

    @iamvince
    Author

    Thanks for your quick support as always, The issue is resolved it was not not just the path issue that you resolved but the asset transformation as well in add_image api i.e. I have added image and kept transformation values for position and scale in add_image API call too large that it went off the preview area. I made changes in CapCut for the transformation values and asset became visible in center.

    add_image API Request Body, i was calling:
    { "image_url": "https://images.pexels.com/photos/16415238/pexels-photo-16415238.jpeg", "start": 1, "end": 3, "width": 4202, "height": 1355, "draft_id": "dfd_cat_1760111867_127a7fba", "transform_x": 7568.649224096875, "transform_y": 6346.510303016399, "scale_x": 3119, "scale_y": 3977, "flip_horizontal": false }

    So the issue was with this:
    "transform_x": 7568.649224096875, "transform_y": 6346.510303016399, "scale_x": 3119, "scale_y": 3977,

    Proof attached for working draft.

    Image
  8. sun-guannan commented on Nov 9, 2025

    @sun-guannan
    Owner

    That's excellent news! I'm glad to hear the issue is resolved, and thanks for sharing the details about the asset transformation values being too large. It makes perfect sense that setting the transform_x, transform_y, and scale_x/scale_y to very large numbers in the add_image API request would push the image completely outside the visible preview area.

    Transformation Values are Relative, Not Pixel-Based

    I also wanted to clarify the nature of the transformation parameters for future use.

    The parameters currently used in the API, such as transform_x, transform_y, position_x, and position_y, are relative values, not absolute pixel values.

    • These relative values are converted into actual pixel coordinates based on the dimensions of the editing screen (or canvas).
    • For example, the final pixel transformation values (_px) are calculated as follows:
      transform_x_px = transform_x * screen_width
      transform_y_px = transform_y * screen_height
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions