SRT files import to Flame

Hi, Is there anything around that will read in an SRT file and make titles for me on a layer.

Give this a shot:

It will convert a srt file into a xml file that can import into Flame.

Mike

3 Likes

Thank you so much.

I noticed that when you import an srt into premier that there is a box underneath each line of text. Is that information in the srt file or is that the way premiere imports the file.

I tried to replicate the black box underneath in Flame but it’s a chore to go through every segment fixing the box underneath the text.

Yes, I dont know if there is an easy way to add prober black bars under the text. The one in the text module doesn’t leave proper spacing around text.
I think I used bfx in timeline with in action a black colour solid which I could easily scale the right amount.

Hey Mike, sorry to jump on this, I installed SRT to XML V1.3 and it appears as an option in the media panel, but when I put it to work, nothing really happens, any ideas? The file works perfectly in Davinci…
Many thanks

Are you getting any errors in the shell?

this:

xml_save_file_path: /Users/chadiabo/Desktop/Subtitle 12.xml

config file saved <<<
Traceback (most recent call last):
File “/opt/Autodesk/shared/python/srt_to_xml/srt_to_xml.py”, line 445, in confirm_entry_fields
return self.convert()
File “/opt/Autodesk/shared/python/srt_to_xml/srt_to_xml.py”, line 578, in convert
self.srt_start_timecode = self.calculate_frames(srt_timecode_line.split(’ ', 1)[0])
File “/opt/Autodesk/shared/python/srt_to_xml/srt_to_xml.py”, line 410, in calculate_frames
milliseconds = timecode_split[1]
IndexError: list index out of range

Looks like there’s a issue with the script converting the time code. Any chance you’re able to email the srt? Or part of it?

sure, can you please send me your email
Many thanks

I finally had a chance to take a quick look at the srt you sent me. It looks like the empty lines after the timecode are throwing the script off. Right now when the script sees an empty line it’s expecting a new event to start. I’ll have to make a little change to the way it looks for a new event. I should probably have it look for a line with timecode to use as the new event identifier.

Just used this for the first time. It’s fantastic. Thank you @MikeV

2 Likes

Glad to hear it’s helping you out. Couldn’t have done it without @AndyBrown . He came up with the idea for it and helped with a lot of testing.

So many Andy’s around here…

4 Likes

Hi Mike, I have been tweaking the config file for a few things but I cant get the scale of the text to remain correct for the different aspects I need it for. Eg. On a 16x9 canvas all is good, but if you make an xml based on 1x1 the the scale of the text gets squash like its doing a fill. I’ve tried tweaking the aspect and frame size but they dont seem make any difference. I’ve worked out that if I put a value into y/scale of 56.25 the text goes back to 1:1.
I think Flame is resizing the text as a fill instead of centre cut, crop or letterbox. Also the resize node has no affect on a text node. Very strange. @fredwarren

Best way (how I do it) is import everything as 16x9. Make sure, RGBA is set on the text elements.
Select all titles from 16x9 and copy
Then go to the 1x1 sequence, add empty bfx and paste the titles in there. This way the aspect ratio stays 16x9
Now you can use the front and matte output and resize them in an Action to proper size.
Finished :smiley:

Great idea. Thank you.

Hi amazing script! is there a way to maintain the font?

Edit TTG file for the win!

Do you have a SRT file that has a font assigned? If it’s something you’re able to send me I can look into it. In the mean time there’s another script on the Logik Portal called Adjust Text FX that will let you select all the text fx on a timeline and change things like the font, font size, positioning etc. You can do them all at once instead of having to go into each text fx.

2 Likes

Wow that is amazing ill try that out! Ill see if the srt has an assigned font. Whe. it cam it it was just defaulting to discreet so maybe it didnt?

Thanks again these are a massive help

I’ve just done a job where these scripts have really saved my bacon. How can I buy you a beer? (or support you in some other meaningful way). Thanks for sharing your code @MikeV you’re a legend!

3 Likes

Has anybody used this in 2023.3.2?