I need to stretch (or actually squeeze) an SRT file.
In order to avoid jerky playback in PAL DVDI'm going to encode 23,976 fs at 25 fs, ie no frame duplicating. When doing so audio and subtitles will lag more and more.
Is there a program that does a time warp on an SRT file?
Preferable based on 23,976/25-info
+ Reply to Thread
Results 1 to 2 of 2
-
-
I've done a very simple VBS script to do this for .ssa files. It should be equally easy to alter the times in a .srt.
Code:dim a set a=WScript.Arguments If a.Count<2 then REM *** Error out - input and output file needed Quit End If factor=25/23.976 Set fso = CreateObject("Scripting.FileSystemObject") set i=fso.openTextFile(a(0),1) set o=fso.openTextFile(a(1),2, true) while not i.AtEndOfStream ln=i.ReadLine if left(ln,9)="Dialogue:" then REM *** OK; Assume this is a line with subs row=split(ln,",") s=row(1) e=row(2) row(1)=toTimeString(toHundreds(row(1),factor)) row(2)=toTimeString(toHundreds(row(2),factor)) ln=Join(row,",") end if o.WriteLine ln wend i.close o.close set fso=nothing function toHundreds(s,f) dim a a=split(s,":") h=a(0) m=a(1) s_temp=a(2) b=split(s_temp,".") s=b(0) hundreds=b(1) hndreds=(cInt(h)*360000)+(cInt(m)*60*100)+(cInt(s)*100)+hundreds toHundreds=cLng(hndreds/f) End Function function toTimeString(hundreds) h=Int(hundreds/360000) hundreds=hundreds-(h*360000) m=Int(hundreds/6000) hundreds=hundreds-(m*6000) s=Int(hundreds/100) hundreds=hundreds-(s*100) toTimeString=cStr(h) & ":" & right("0" & cStr(m),2) & ":" & right("0" & cStr(s),2) & "." & right("0" & cStr(hundreds),2) End Function
Similar Threads
-
Extend subtitle display time as long as possible
By JJon in forum SubtitleReplies: 1Last Post: 19th Jan 2012, 07:36 -
Adding subtitle(s) to a DVD for the first time
By 2298 in forum Authoring (DVD)Replies: 2Last Post: 30th Aug 2011, 04:15 -
Subtitle Workshop - not creating subtitle at current time location
By botjocrow in forum SubtitleReplies: 0Last Post: 14th May 2011, 03:09 -
Problem expanding subtitle time with Subtitle Workshop
By Kaze105 in forum SubtitleReplies: 1Last Post: 11th Nov 2008, 22:16 -
Adobe Time Warp
By miggeth in forum Newbie / General discussionsReplies: 0Last Post: 7th Oct 2008, 04:04