Instant Subtitles! (Creating subtitles automatically as if by magic)

I am so frustrated right now. Not one of these scripts is working for me correctly. The script that Sauron wrote the very first time worked for me once, which was awesome. Now I am trying to create another video using different clips and now none of the clips are pasting right. Not Sauron’s scripts or Jonray’s scripts. I tried all of them. I don’t know what is going on. I have done everything. I started the project over at least a dozen times. From scratch. Scripts didn’t work correctly. I shut my computer all the way down, reloaded Shotcut, and started my project again from scratch. No go. I switched from using the latest version of Shotcut back down to an older version Shotcut. No go. I attempted to use the scripts as written, to see if maybe my tinkering with scripts is the reason for them not working. Nope. Still didn’t work right. I tried using other video clips. No go. I closed out of all other running programs and documents and made sure only Shotcut, Notepad and this here webpage were running. Still could not get any of these scripts to behave correctly. Running the scripts results in the clips being pasted in the wrong position or not at all. I am trying everything to get them to run correctly and they just wont. I dont understand why. Sauron’s very first script he wrote up worked for me the other day so I don’t know what gives. My laptop is old, but not that old. Its going on 4 years old I believe. Maybe it is my laptop. I dont know, but it could be Shotcut itself because one issue I have with it is it is laggy as all get out. Or it will completely crash. I do like the software, but it has not been easy for me to use. The lag is bad. I dont know if this is Shotcut or my computer. I don’t know if this lag is what is causing the scripts to not run right any more. I am so frustrated right now. It’s like I don’t want to go bed until I fix what ever this issue is because I really need this script to work right again. I am going to keep playing around with it. Man I am sad and frustrated :frowning:

Hi @treuben ! Poor you! I just ran @sauron’s modified script and it works fine. I can’t be here to help for a while now because I’m off to work but just wanted you to know it works Ok for me. Hope that may help a little. Good luck…

Okay. I understand. Thank you for trying it out yourself.

I am really at a loss. I pasted a pic of the script I ran. I only change the loop number to 5.

I also pasted a pic of result I get. The clips are overlapping each other!

And I made sure the playhead was ON the clip and not at the end of the clip before I ran the script, as Sauron instructed, and it still keeps pasting like this.

I started over from scratch several times to see if I can get different results and same.

Maybe the latest version of Shotcut doesn’t work with my computer?

Did you use the latest version of Shotcut on your computer when you ran this script?

Does the frame rate of the video in track V1 matter? The framerate of the video that I put on track V1 is 60 fps.

There has got to be a reason for this.

@sauron Any ideas?

It seems the frame rate does matter. I tried with a UHD 60 fps clip. Shotcut was choking. Had to use the KKnBB proxy tool to lower the resolution.
The PH was not seeking properly when running the script. Changed SetKeyDelay from 200 to 600. Now it works properly.
You might want to change the right 5 to right 12 if you want 4.2 seconds with 60 fps video.

image

1 Like

Awww Bless you man! Bless you. I have not tried this yet. But I am just so moved that you keep tinkering on this for me. I got the idea of the frame rate from one of your earlier posts when you said something about ‘if the video’s frame rate is 25 fps’. So that got me to thinking. What is the fps of the video I am trying to use now? Found out it was 60 fps. Didn’t know if it mattered. This is why I decided to pose the question to you and Jonray because I am really trying to leave no stone left unturned. And for you to try this out yourself and replicate my issue, man, I am so glad. I really thought something was wrong with either Shotcut or my computer. I have uninstalled an reinstalled several different versions of Shotcut trying to fix this issue. At any rate…

I am going to revise your script as indicated and hope this works for me as it has worked for you.

I do have one more question though @sauron

What is the KKnBB proxy tool and do I also need to do what you did and use it to lower the resolution of my video? Or will just changing the SetKeyDelay from 200 to 600 in the script suffice?

Thanks again for all your help. This experience has taught me so much. It has been so frustrating but also rewarding at the same time. :slightly_smiling_face:

There is a very long thread here.

It’s a very useful tool to have.

That depends on how well the video plays. If there’s no lag or stutter then you will probably be OK.
My video was UHD 3840x2160. The playback was very laggy so I made a proxy.

Yeah my video is laggy as all get. It is a headache to scrub through. So if using this proxy tool can help me out with this then I am willing to learn how to use it. I will go read through the thread you provided.

Thank you for all your help!

Wow, nice detective work, @sauron! :+1: Didn’t know that!

Sauron,

I used the KKnBB proxy tool to reduce the resolution of the two videos I want to use in my next Shotcut project.

Now I am ready to use the _fastproxy_xxxx files to do my video editing.

The instructions state not to use the Automatic video mode to start my project.

I have several questions regarding this.

1.) Is this screen where the video mode would be changed?

2.) If I am not supposed to use Automatic mode, then what mode do I use? Like how do I know which one to choose?

3.) Which ever mode I choose will this be the video mode for the FINAL project?

Thanks again for all your help!

Hey everyone, I am currently working on a little program to convert subtitle “.srt” to a Shotcut project .mlt

Once conversion finished, you can use the “Open mlt as Clip” to import the subtitle to the whole timeline.

4 Likes

@KKnBB

srt --> mlt . Very nice idea. :+1:

COOL IDEA! Thank you :+1:

I have an old project that merges 2 srt in different languages into 1 srt, so I have codes that programmly break down the srt format.

Two issues:
1, read and understand my own code :smiley:
2, timestamp in .mlt is a flowing down type, unlike “between 5:20 and 5:24” in most subtitle files. So I need to do some serious time re-calculation and time-comparison codes.

Give me a weak or so.

hey @Paul2 @jonray @sauron @treuben
I made it. It is easier than I thought. (2 hours coding)

It quickly converts a standard .srt subtitle or lyrics into a new project .mlt file, so you can use it anyways you like.

2 Likes

Thanks for this. I really appreciate the care and attention you took in creating this tutorial!

I was so excited to find this on YT today… after adjusting all mouse coordinates and trying all them with ctrl keys, I ended up doing it manually. All it does is to copy and paste the timeline text box, copying and deleting the first letter, not the sentence of the pad and positioning the cursor over the end box. Is this still good for the latest version?

Thank you so much thou.

I’m not sure if this helps, but I had a lot of trouble trying to get this app to work. In the end i created a web app that does something similar - creates an MLT subtitle file from a Subrip file. see here for more info:

Here is the tutorial:

thanks a million!!!

No problem, glad to be of help. I hope you enjoy working with Shotcut. It is a powerful video editor considering its price (free) and there are lots of people on the forum here more than happy to help with suggestions and solutions.

man, I suggest a copy and paste for the formatting of elements, like that brush we have on word. I suffered today to “normalize” all my subtitle-box replicas. Mega thanks to you and all this awesome community.