[Python] How to insert Text+ clips on specific video tracks using DaVinci Resolve Python API?

Discussão em 'Python' iniciado por Stack, Maio 25, 2025.

  1. Stack

    Stack Membro Participativo

    I'm working on a DaVinci Resolve automation project where I want to create a dialogue-style video. The idea is to overlay lines of dialog (generated audio and corresponding text) using Text+ titles programmatically through the Resolve scripting API.

    What I'm trying to do:

    • I have a JSON file that looks like this:

    [
    {
    "sequence": 1,
    "response": "Hi",
    "voiceId": 2
    },
    {
    "sequence": 2,
    "response": "How are you?",
    "voiceId": 3
    },
    {
    "sequence": 3,
    "response": "I'm good!",
    "voiceId": 4
    },
    ...
    ]


    [​IMG]

    • For every 3 audio clips, I want to add 3 Text+ titles — one per clip — to Video Tracks 2, 3, and 4.
    • Each Text+ should:
      • Appear when its corresponding audio starts.
      • Remain visible until the last audio in the group ends.
      • Be editable manually later on in the Resolve interface (so Compound Clips or subtitles are not suitable).
    What’s not working:


    When using:

    timeline.SetCurrentTimecode(...)
    timeline.InsertFusionTitleIntoTimeline("Text+")
    clip.SetProperty("TrackIndex", 2)


    [​IMG]

    • The inserted Text+ clips always go to V1.
    • Trying to move them to V2/V3/V4 with .SetProperty("TrackIndex", X) doesn't seem to work.
    • There is no clear way to control the target video track during InsertFusionTitleIntoTimeline.
    Question:


    How can I programmatically insert Text+ clips to Video Track 2, 3, and 4, using Python API in DaVinci Resolve, and set their duration and text accordingly?

    Any workaround or hacky approach that avoids Compound Clips would be helpful!

    Continue reading...

Compartilhe esta Página