I see Subtitle Workshop doesn't have this option. I want to save the subtitles I have to *.txt (UTF-8) without the time codes, just plain text without the numbers and commas in order to make screenplays based on the text. I know I can do it manually, but I need a script to do it automated.
like this:
6
00:00:22,490 --> 00:00:23,959
Hello, how are
7
00:00:23,959 --> 00:00:27,490
you man?
to
Hello, how are you man?
+ Reply to Thread
Results 1 to 4 of 4
-
-
I have written an AHK_L script that should output a .txt file for every .srt file you drop on it. It has to be compiled with AutoHotKey_L free scripting language compiler for the drop on the program shortcut to work. Also you should not have any spaces in the path of the .srt files.
I usually work in ASCII. That's why I'm giving you the source. If you need help fixing it up you can ask on AutoHotKey forums.
How it works. You select .srt files in Explorer and drag and drop them on the program icon. For each file it creates filename.srt.txt as output. It sets output file type to UTF-8 and writes all lines that are not the subtitle number or timing lines.
An alternative might be a programmable editor. But this could be easy to use once you get the bugs out.
Here's the source
Code:#NoEnv #NoTrayIcon SendMode Input Count := 0 FE := A_FileEncoding If 0 < 1 { MsgBox, 64, Srt2Text Usage, Srt2Text Copyright (c) %A_Year% www.FavesSoft.com`n`nUsage: Drag and Drop .srt files on shortcut`n`nOutput is filename.srt.txt`n`nOnly dialog paragraphs are written using UTF-8 encoding ExitApp } Loop %0% ; For each parameter (or file dropped onto a script): { Param := %A_Index% ; Fetch the contents of the variable whose name is contained in A_Index. Loop %Param% { Count := Count + 1 InPath = %A_LoopFileLongPath% OutPath := InPath ".txt" IfExist,%OutPath% FileDelete,%OutPath% Loop, read, %InPath%,%OutPath% { if A_LoopReadLine is Integer continue if InStr(A_LoopReadLine," --> ") continue FileEncoding,UTF-8 FileAppend,%A_LoopReadLine%`n FileEncoding,%FE% } } } MsgBox, 8256, Srt2Text, %Count% Files Processed
http://milesaheadsoftware.org/
Fully enabled freeware for Windows PCs.
Similar Threads
-
How do I convert DVD or sub/idx to text srt subtitles?
By Baldrick in forum SubtitleReplies: 70Last Post: 28th Mar 2016, 20:37 -
How do I convert DVD to sub/idx or text srt COLOR subtitles?
By kkm in forum SubtitleReplies: 1Last Post: 19th Mar 2010, 13:08 -
How to convert VOB subtitles to permanent without going to text first?
By madmartian in forum SubtitleReplies: 3Last Post: 13th Mar 2010, 22:57 -
Read text create audio and convert text to synced subtitles in mp4
By Philip Lean in forum SubtitleReplies: 1Last Post: 25th Feb 2010, 08:54 -
converting subtitle file to plain text?
By shenacat in forum SubtitleReplies: 1Last Post: 2nd Jun 2007, 16:16