Python help, Adapting UC Slater to add Subtitles

So I’m betting there is a more efficient way to go about this, but I had a job coming up where I need to add subtitles to 11 spots in all aspect ratios. (including a separate version for tiktok). I had my producer instruct editorial who was going to build references for the subtitles to do it in Premiere and basically give me a toolkit, because why the heck would I want them to just send refs when they already built them. My plan is to export 4444s and add them to my sequence in flame, Then I got to thinking, could I adapt what UC Slater does with adding slates to the front of my sequence to adding my subtitles on a new track above my sequence. I’m just not sure how to execute it, chatGPT just keeps giving me generic python scripts no matter how many times I send it Autodesk’s Python guide.

You could definitely repurpose UC Slater to add a subtitle track instead of slates. You’ll have to adjust the timecodes. For instance, tc_OUT = flame.PyTime("00:59:58:00", frameRate) might become seq_tc = flame.PyTime("01:00:00:00", frameRate)

And then add:
flame.execute_shortcut("Set Focus on Top Visible Track") flame.execute_shortcut("New Video Track")
under item.open().

Then you should probably comment out item.name = str(slateName)[1:-1] so it doesn’t change the name of your sequences. Obviously, you’d have to put the subtitles and sequences in the same order.

1 Like

If you’re on 2024 or later you have the subtitles track that allows you to import SRT files. Has worked very well for me.

2 Likes

Oh awesome thank you! That’s what I was trying to play around with but I just don’t know python very well. Thank you so much!

1 Like

Yeah, I had a feeling there was a less complicated solution to this now haha. I’ll try the SRTs and hope for the best.

1 Like

Gotcha. You can try this: uc_subtitler.zip (30.4 KB)

I added some comments that help explain what the main part of the script is doing, which is really just executing shortcuts.

3 Likes

thank you so much, thats way more than I expected. I really appreciate the help.

2 Likes