individual clips and audio

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

dariondanjou

  • Posts: 2
  • Joined: Wed Feb 23, 2022 5:40 am
  • Real Name: Darion D'Anjou

Re: individual clips and audio

PostMon Oct 10, 2022 8:18 pm

bumshik wrote:there is a easy solution...read carefully....
1.Link ur video and separate audio file clicking opt + cmd + L
2. Then drag the linked clip into media pool for making subclip...
3. Then drag back the clip into ur timeline
4. go to deliver page and export individual clip with audio


1. This is the "Link Clips" function, right? I have a PC so my keyboard shortcuts aren't the same as yours. I've also replaced this 3 button command with the single C key. Can you confirm that me seeing the chain link on the left bottom corner of the clip, means the clip video and audio are linked as you are recommending? Also when I click one or the other, both video and all 9 audio channels are selected.

2. I've dragged all the timeline clips into a bin in the media pool. What's this "for making a subclip" part of the step? Do I need to do anything more for this step after dragging all the timeline clips into a bin in the media pool?

3. I guess I just drag all these clips back onto the timeline.

4. Now it should export the audio when I select "individual clips" option and check Export Audio toggle box, right?

I may be missing my understanding of especially step 2 or 3, because ultimately I've tried the above and it's not exporting the audio along with the video. It's just rendering the video. Resolve DOES export the synced audio if I export single clip only. Help! Does anyone see where I might be going wrong?
Offline

John Carl

  • Posts: 5
  • Joined: Wed Nov 16, 2022 6:58 pm
  • Real Name: John Carl

Re: individual clips and audio

PostWed Dec 07, 2022 6:45 am

Peter Cave wrote:Hi Jeff,

I work with Avid, FCPX, FCP7, Premiere & Resolve. None of those programs will do what you are asking. I have never seen ANY software capable of this. However, I agree it would be a useful option. There would have to be some serious audio options for routing tracks when the track count gets too high!


The software that does this is called "Silverstack" and it's made by a company called Pomfort. It's the industry standard software for making on-set dailies and transcodes.

I don't understand why Blackmagic Design hasn't added this core functionality. Resolve is supposed to be an "all-in-one" solution but they're missing the very first step in the image pipeline. On set, the DIT needs to dump and backup the footage, sync all the audio tracks, apply any on-set looks, tag the footage with any necessary metadata, and then export all of this together as dailies. That gets sent off to the post house.

Resolve is so close to being able to do the same but isn't quite there yet. You can import the footage, sync the audio and apply a look BUT... there is no automated way to export these individual clips with the new audio. The only way is to set individual in-and-out points for each clip. Or to forego the good audio. But this is a headache for me because my clients want to review the footage ASAP on Frame.io and they want it with the good audio. Frustratingly close... but so far.

Blackmagic Design would need to do so little to make it easier to create dailies on set. (One of the people in this thread has even already coded a Python script to do this.)

If Blackmagic Design also upped their live grade capabilities a little bit then they could take some Pomfort LiveGrade's market share as well. (Pomfort has separate software called LiveGrade, which is the industry standard for on-set color grading.)

But anyway, since Blackmagic Design either can't do it or won't do it, check out Pomfort's software. Yes it's another cost but it's the right tool for the job... for now.
Offline

John Carl

  • Posts: 5
  • Joined: Wed Nov 16, 2022 6:58 pm
  • Real Name: John Carl

Re: individual clips and audio

PostSun Dec 11, 2022 11:47 am

I asked ChatGPT to "Write a python script for Davinci Resolve that allows you to export all the clips on a timeline individually including the linked audio." It gave me this:

Code: Select all
# Import the necessary modules
import os
from resolve import resolve

# Set the path to the project file
project_file = "/path/to/project.drp"

# Load the project
project = resolve.Project.from_path(project_file)

# Get the first timeline in the project
timeline = project.timelines[0]

# Iterate over the clips on the timeline
for clip in timeline.clips:
    # Get the path of the clip's media file
    media_file = clip.media.path

    # Set the path for the exported clip
    export_file = os.path.join("/path/to/exports/", clip.name + ".mp4")

    # Export the clip
    project.export(
        export_file,
        clip.timeline_in,
        clip.timeline_out,
        include_audio=True,
        include_video=True,
        source_media_file=media_file,
    )


I asked ChatGPT how to use python scripts in Davinci Resolve and it gave me this:

To use Python scripts in DaVinci Resolve on a Mac, you will need to have Python installed on your computer and the DaVinci Resolve Python module installed. Here are the general steps you can follow to use Python scripts in DaVinci Resolve on a Mac:

  • Install Python on your Mac. You can download and install Python from the official Python website.
  • Install the DaVinci Resolve Python module. You can do this using the pip command, which is included with Python. Open a terminal window and run the following command to install the module:

Code: Select all
pip install resolve


  • Once the module is installed, you can use it to access the DaVinci Resolve API and interact with your project. You can write a Python script that uses the API to perform various tasks, such as exporting clips, modifying timelines, or generating reports.
  • To run your Python script in DaVinci Resolve, you will need to launch the Python CLI (command-line interface) from within DaVinci Resolve. Open DaVinci Resolve and go to the Tools menu, then select Python CLI. This will open a terminal window where you can enter and run Python commands and scripts.
  • In the Python CLI, you can run your Python script by using the execfile() function, which allows you to run a Python script from within the CLI. For example, if your script is saved in a file called myscript.py, you can run it by entering the following command in the Python CLI:

Code: Select all
execfile("/path/to/myscript.py")


This will run your Python script, and you should see the output in the Python CLI. You can also use the help() function in the Python CLI to get more information about the API and its functions.


- - -

Hope this works/helps/gives BMD developers a leap-off point to bundle this feature with the next update.
Offline

Rogurt

  • Posts: 74
  • Joined: Sat Nov 10, 2018 9:47 am
  • Real Name: Roger William

Re: individual clips and audio

PostFri Jun 23, 2023 2:13 pm

Hi all

Unfortunately I am too dumb to get resolve and python working together. There seems to be no tutorial whatsoever that shows how to set up everything on win (I found somethin for mac though).
Maybe anyone can give me simple advice or lead me to some tutorials.
I just need to apply the script that had been posted here - not learning python scripting...

Edit: I installed Python 3.11.4 and made sure the path thingy was checked. In Resolve the console wont give me an error "Python was not found" when clicking the Py3 button. On entering the code in the console I get an Error that makes me think that the installation was not correct...

Traceback (most recent call last):
File "<nofile>", line 5, in <module>
ModuleNotFoundError: No module named 'python_get_resolve'

Edit#2: I tried to follow the "pip install resolve" command thing in my windows command line but still I the error in resolve

Thanks a lot
Rogurt
AMD Ryzen 9 3950X @stock water cooled
AsRock Taichi x370 mainboard, latest Chipset Drivers (NVidia), latest Bios
G.Skill TridentZ DDR4 4 x 16 GB PC4-28800
1TB System SSD + 1 TB Nvme m2
NVidia RTX2070, 461.72 studio driver
Win10.0.19042 Resolve 17.1.1
Offline

balin77

  • Posts: 1
  • Joined: Tue Jul 25, 2023 9:08 pm
  • Real Name: Raphael Gubler

Re: individual clips and audio

PostTue Jul 25, 2023 9:13 pm

I have a solution to this issue:

first export the timeline as a single clip with its edited audio with the least compression possible. Then search for the clip in the media pool and use scene cut detection on that clip in order to recreate all the individual clips. Put them on a timeline and export them as individual clips.

This workaround is not perfect, since you have to export everything twice and if the individual clips are too similar the scene cut detection wont detect the diferent clips. But its still very useful to me.
Offline

Ludomir

  • Posts: 2
  • Joined: Wed Aug 30, 2023 3:21 pm
  • Real Name: Ludvig Jakob Trier

Re: individual clips and audio

PostWed Aug 30, 2023 3:44 pm

Hi there!

Me and ChatGTP made a really good code for u guys who just wanna copy/past like myself, and dont have Python installed.

Here's how to use it in DaVinci Resolve:

Open DaVinci Resolve.
From the drop-down menu for the workspace, select "Console" (ensure it's set to "Lua").
Type or paste in the following code:

Code: Select all
-- Get the main scripting objects
resolve = Resolve()
projectManager = resolve:GetProjectManager()
project = projectManager:GetCurrentProject()

if not project then
    print("No current project found!")
    return
end

-- Get current timeline
timeline = project:GetCurrentTimeline()
if not timeline then
    print("No current timeline found!")
    return
end

-- Iterate through each video track and its clips
for trackIndex = 1, timeline:GetTrackCount("video") do
    items = timeline:GetItemListInTrack("video", trackIndex)
   
    for _, item in pairs(items) do
        -- Make sure item is of correct type
        if type(item) == "userdata" then
            clipName = item:GetName()
           
            if clipName then
                clipStart = item:GetStart()
                clipEnd = item:GetEnd()
               
                -- Set in and out points for render
                renderSettings = {
                    ["MarkIn"] = clipStart,
                    ["MarkOut"] = clipEnd,
                    ["CustomName"] = clipName -- This ensures the rendered clip's name matches the timeline item name
                }

                project:SetRenderSettings(renderSettings)

                -- Add to the render queue
                project:AddRenderJob()
            else
                print("Failed to get clip name from item.")
            end
        else
            print("Skipped item of type: " .. type(item))
        end
    end
end

-- Note: To start rendering all the queued jobs, you can use:
-- project:StartRendering()
-- But to avoid accidental render starts, you may wish to manually start it in the Deliver page.


This script will use your current render settings and add all clips as "individual clips" to the render queue with audio tracks, color grading, etc. Moreover, it names the rendered file based on its name in the media pool. Once you've executed the script, you can proceed to hit the "Render All" button.

This is my first post here, and honestly, I hadn't dabbled in coding until today. I encountered a challenge and decided to harness the capabilities of ChatGPT. Let me know if this works for you! A massive thank you to this community for the invaluable assistance you've provided over the years!
Offline

zymarc

  • Posts: 2
  • Joined: Tue Sep 12, 2023 4:28 pm
  • Real Name: Marcin Zydek

Re: individual clips and audio

PostTue Sep 12, 2023 4:34 pm

On the Deliver page, in the Video tab, select the "Render timeline effects" checkbox, and you'll get the timeline audio. (Added in Resolve 18.0)

I've just found it on another thread after an hour of searching and it saved me an additional hour of workarounds.
Offline

Ludomir

  • Posts: 2
  • Joined: Wed Aug 30, 2023 3:21 pm
  • Real Name: Ludvig Jakob Trier

Re: individual clips and audio

PostTue Sep 12, 2023 8:11 pm

zymarc wrote:On the Deliver page, in the Video tab, select the "Render timeline effects" checkbox, and you'll get the timeline audio. (Added in Resolve 18.0)

I've just found it on another thread after an hour of searching and it saved me an additional hour of workarounds.


Yeah, but does it work if you have multiple audio tracks?
Offline

zymarc

  • Posts: 2
  • Joined: Tue Sep 12, 2023 4:28 pm
  • Real Name: Marcin Zydek

Re: individual clips and audio

PostWed Sep 13, 2023 3:42 pm

Yes, it does.
Previous

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], Marc Wielage, Peter Chamberlain and 232 guests