.SRT Generator - can't export

I’m not sure of this is the best place to ask about this, but I am trying to create some subtitles for a video, and I came across the SRT Generator written by @Elusien that is described in this post:
SubRip (.srt) Subtitle Generator - #19 by Elusien

It seems to be exactly what I need, but when I click the Export button, the expected overlay doesn’t popup, so I can’t copy the generated SRT text. The red “Dismiss .srt data” button does appear, so I know that the Export button is responding, but the text itself isn’t displayed.

I’m using Microsoft Edge, and everything else seems to work properly. When I tried Firefox instead, I get the “No video with supported format and MIME type found.” message when I select a .MP4 file, even if I rename it to video.mp4, so I can’t even test it there.

The Developers Console doesn’t show any errors, just a couple of warnings:
srt_generator.html:611

   The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page.
    
   [Deprecation] The ScriptProcessorNode is deprecated. Use AudioWorkletNode instead. (https://bit.ly/audio-worklet)

Any suggestions?

Thanks for letting me know about this. I last used the utility about 6 months ago and it was working then. I just tried it again (using Chrome) and I get the same failure as you. I’m a little busy this morning, but I will try to get it fixed before this evening. I’ll also see if I can fix the problem running it under Firefox too.

OK I have fixed the problem. So go to the website and re-download the utility.

I am going to change it so that when you press the “Export” button it will actually download the subrip file, rather than you having to copy-paste it into an editor.

Regarding Firefox - I’m pretty sure this is caused by a Firefox security feature. I will look into this further, but it works fine in Chromium-based browsers like Chrome, Edge and Vivaldi.

Wow! Thank you for generating the code in the first place, and for such a timely response!

One minor point - I thought that the problem was still there, because I couldn’t see any output when I pressed the export button. It was only when I noticed that a scrollbar had appeared that I realized that the output was down below the bottom of the screen, and I had to scroll down to see it. Everything works fine, it’s just a discoverability issue. If you can update the utility to create an actual file, that won’t matter.

Thanks again for all the tools that you’ve provided to make Shotcut an even better program.

Yes, the scroll-down is an issue, which is why I want to create the download file. In the meantime I’ll create a pop-up window when you click on “export” that says to scroll down

The generator now creates a popup window when you click on “Export”, to say that you need to scoll down for the subrip file contents - the new version can be downloaded from the website. I’ll change the code to download the .srt file either tonight or tomorrow.

I have modified the “Export” button function such that it displays the subrip data (as before - needing a scroll down) as well as downloading the file with the name “Result.srt”. Of course if a file of that name already exists it will be saved in your download folder/directory as “Result (<n>).srt

Wow - that’s great! It does exactly what I need!

Can I make one suggestion - rather than creating “result.srt”, if I have opened “clip1.mp4” could you name the .SRT file as “clip1.srt”? VLC will open a .srt file automatically if it matches the name of the video clip.

I like the idea of version numbers, but it’s still easier to just remove the version number than renaming the whole file.

I have uploaded a new version of the SRT Generator to the website, which downloads the SRT file with the same name as the mediafile. e.g. if the mediafile is called “My Video.mp4” the SRT file will be downloaded as “My Video.srt”.

Thank you!

This topic was automatically closed after 90 days. New replies are no longer allowed.