Python 101 Part 6 – Supercharging Code Writing With ChatGPT

August 13, 2024

Using Python to extract Chapter Markers and create a VTT subtitle file, Kaur Hendrikson teaches how to code with an 'AI' assistant.


Series

Your New Python Besties – GitHub Copilot + ChatGPT

In this Insight, learn to use GitHub Copilot, a machine-learning coding assistant. With its help, you’ll write a script for turning Resolve timeline markers into a VTT subtitles file for use as chapter markers. And while you can do this easily within Resolve, writing this code is an excellent test of our skills.

In this example, we are forced to run test prints and figure out how the Resolve API names functions and metadata for timeline frame rates, markers, and marker elements while using our machine-learning Copilot to do things like covert frame numbers into timecode based on the frame rate. We make mistakes along the way, but Copilot helps solve those errors and writes some tricky code to get us to a valid VTT file.

Extra Credit

If you’re following along with this series, here’s some extra credit. After creating the VTT script, modify this script so it also exports a .TXT file in the follow format:

MM:SS Chapter Name

The goal is to create simple Chapter text that can be cut and pasted into the description of a YouTube video – automatically creating YouTube chapters.

At the end of this Extra Credit, one script will create a valid VTT file and a simple text document – which Resolve won’t do for you.

Key takeaways from this Insight

By the end of this Insight, you should understand how to:

  • Install GitHub Copilot
  • Invoke Copilot and double-check its work
  • Test and troubleshoot each step of your code to verify what Resolve’s API is providing
  • Use Copilot to solve errors
  • Create and write to a new text (.vtt) file
  • GitHub Copilot Landing Page – “GitHub Copilot suggests code completions as developers type and turns natural language prompts into coding suggestions based on the project’s context and style conventions.”

Questions or Comments?

How is this Python series going for you? Let me know! I’m looking for more scripting ideas, so ask for them in the comments.

– Kaur

Member Content

Sorry... the rest of this content is for members only. You'll need to login or Join Now to continue (we hope you do!).

Need more information about our memberships? Click to learn more.

Membership options
Member Login

Are you using our app? For the best experience, please login using the app's launch screen


1,200+ Tutorials, Articles, and Webinars To Explore

Get 7-day access to our library of over 1,200+ tutorials - for $5!
Do you like what you see? Maintain access for less than $5 per month.


Start Your Test Drive!
Loading...