Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Display Modes
Old 25th June 2025, 13:54   #1  |  Link
Microfiche
Registered User
 
Microfiche's Avatar
 
Join Date: Jun 2025
Posts: 10
Help with converted timed text subtitle...

Hey all! I have a timed text subtitle that I pulled out of an MP4 file that I would love to fix. Mediainfo shows the format as Timed Text, Muxing mode as sbtl, and Codec ID as tx3g if that helps.

A sample portion of the SRT file I have now looks like this:

Code:
2405
01:38:18,343 --> 01:38:23,680
Simple.
I am throwing away my shots.
I am throwing my shots.

2406
01:38:23,682 --> 01:38:25,181
I am throwing away my shots.
I am throwing my shots.
Anyone and I am throwing away my

2407
01:38:25,183 --> 01:38:25,481
I am throwing my shots.
Anyone and I am throwing away my
shots.

2408
01:38:25,483 --> 01:38:33,483
Anyone and I am throwing away my
shots.
Does anyone have any ideas on how to clean this up so it is watchable?
Microfiche is offline   Reply With Quote
Old 25th June 2025, 15:51   #2  |  Link
rjd0309
Wanted Dead or Dead
 
rjd0309's Avatar
 
Join Date: Apr 2008
Location: Phoenix, Arizona
Posts: 41
How did you extract the subtitles from the MP4 file?

For timed text, I've had no problems using ffmpeg.

ffmpeg -i infile.mp4 -vn -an outfile.srt
rjd0309 is offline   Reply With Quote
Old 25th June 2025, 16:08   #3  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
I aint no expert on subs but I think those are scrolling subs, like you might get in Youtube auto generated stuff.
If used/muxed as is, then will look ok, I think.

Do they look ok in original clip ?
What is the problem you are having ?
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 25th June 2025 at 16:11.
StainlessS is offline   Reply With Quote
Old 25th June 2025, 16:19   #4  |  Link
Microfiche
Registered User
 
Microfiche's Avatar
 
Join Date: Jun 2025
Posts: 10
Help with converted timed text subtitle...

Quote:
Originally Posted by rjd0309 View Post
How did you extract the subtitles from the MP4 file?

For timed text, I've had no problems using ffmpeg.

ffmpeg -i infile.mp4 -vn -an outfile.srt
Yes - that is how I got that SRT file
Microfiche is offline   Reply With Quote
Old 25th June 2025, 16:22   #5  |  Link
Microfiche
Registered User
 
Microfiche's Avatar
 
Join Date: Jun 2025
Posts: 10
Help with converted timed text subtitle...

Quote:
Originally Posted by StainlessS View Post
I aint no expert on subs but I think those are scrolling subs, like you might get in Youtube auto generated stuff.
If used/muxed as is, then will look ok, I think.

Do they look ok in original clip ?
What is the problem you are having ?
Yes - they are converted from closed captions I think and the subs look like crap, both in the original and the SRT. I hate closed captions.
Microfiche is offline   Reply With Quote
Old 25th June 2025, 16:22   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
Here is recent thread on even more weird auto generated subs.
https://forum.doom9.org/showthread.php?t=186129

EDIT:
And a YT clip which when you switch on subtitles, produces auto generated subs similar to those in above thread.
https://www.youtube.com/watch?v=EXL8mMUXs88
[Words appear one at a time, not just line at a time, and with line scrolling]

I think that you will have not much luck trying to mod to show non-scrolling subs,
I predict that hand editing to your perferences will be the only solution.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 25th June 2025 at 16:36.
StainlessS is offline   Reply With Quote
Old 25th June 2025, 16:56   #7  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
Hi Microfiche,
Can you post the complete srt file somewhere. [Maybe https://www.sendspace.com/ <30 days valid>]
Also, can you tell me if you are familiar with Avisynth ? [I know you are D9 newbie with only 3 posts]

I would like to play with your srt file for an hour or two, see if I can pluck out similarly timed subs and re-write without the scrolling type stuff.
I cannot guarantee anything, but I'de like to have a little try.

EDIT: I do already have script to scan srt files and add them to a database.
Would need additional script to try scan Dbase and produce separated lines as per your wish.
No idea if I can do it.

If successful, then can probably use same scripts for any future similar srt files.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 25th June 2025 at 18:10.
StainlessS is offline   Reply With Quote
Old 25th June 2025, 17:40   #8  |  Link
Microfiche
Registered User
 
Microfiche's Avatar
 
Join Date: Jun 2025
Posts: 10
Help with converted timed text subtitle...

Quote:
Originally Posted by StainlessS View Post
Hi Microfiche,
Can you post the complete srt file somewhere. [Maybe https://www.sendspace.com/ <30 days valid>]
Also, can you tell me if you are familiar with Avisynth ? [I know you are D9 newbie with only 3 posts]
Nope, not familiar with Avisynth - at least not in years.
I will try that app in the link you sent earlier first and get back to you!
I need an email for Sendspace if you want to DM that. (NVM - found in your profile)
Thanks!
Microfiche is offline   Reply With Quote
Old 25th June 2025, 17:50   #9  |  Link
Microfiche
Registered User
 
Microfiche's Avatar
 
Join Date: Jun 2025
Posts: 10
Quote:
Originally Posted by StainlessS View Post
Here is recent thread on even more weird auto generated subs.
https://forum.doom9.org/showthread.php?t=186129
Yup, that dumped out the same SRT info with scrolling dupe lines.
Microfiche is offline   Reply With Quote
Old 25th June 2025, 18:08   #10  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
Quote:
I need an email for Sendspace
You can post file on sendspace without an account, however cannot eg later delete file without an account. (Links only valid for 30 days anyway)
Just keep a copy of the link given via sendspace, and post it here.

The "app in link", produces stuff like this (timed separate words, dont think of use to you)
Code:
1
00:00:00,080 --> 00:00:02,510 

2
00:00:02,510 --> 00:00:02,520 
remote desktop one computer remotely

3
00:00:02,520 --> 00:00:04,870 
remote desktop one computer remotely
accessing<00:00:03.080><c> another</c><00:00:03.520><c> computer</c><00:00:04.200><c> we</c><00:00:04.359><c> use</c><00:00:04.520><c> it</c><00:00:04.720><c> all</c>

4
00:00:04,870 --> 00:00:04,880 
accessing another computer we use it all

5
00:00:04,880 --> 00:00:06,990 
accessing another computer we use it all
the<00:00:05.080><c> time</c><00:00:05.319><c> it's</c><00:00:05.520><c> required</c><00:00:06.000><c> in</c><00:00:06.200><c> it</c><00:00:06.759><c> and</c><00:00:06.879><c> you</c>

6
00:00:06,990 --> 00:00:07,000 
the time it's required in it and you

7
00:00:07,000 --> 00:00:09,470 
the time it's required in it and you
know<00:00:07.240><c> what</c><00:00:07.640><c> I</c><00:00:07.759><c> found</c><00:00:08.200><c> a</c><00:00:08.360><c> new</c><00:00:08.559><c> solution</c><00:00:09.160><c> that</c><00:00:09.280><c> I</c>

8
00:00:09,470 --> 00:00:09,480 
know what I found a new solution that I
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 25th June 2025, 18:12   #11  |  Link
Microfiche
Registered User
 
Microfiche's Avatar
 
Join Date: Jun 2025
Posts: 10
Help with converted timed text subtitle...

Quote:
Originally Posted by StainlessS View Post
You can post file on sendspace without an account, however cannot eg later delete file without an account. (Links only valid for 30 days anyway)
Just keep a copy of the link given via sendspace, and post it here.
I just sent it to the stainlesss AT sendspace email. Thanks!

Haven't found much info on trying to fix these - the only other person out there who seems to have an issue with those types of subtitles posted here in Reddit
Microfiche is offline   Reply With Quote
Old 25th June 2025, 18:24   #12  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
Quote:
I just sent it to the stainlesss AT sendspace email. Thanks!
Sorry, but that aint an email address, is just my shorthand for my account at SendSpace. [click on it will take you there, but, I aint used it now for quite some time and no current files on that account]

Just go here, https://www.sendspace.com/
and drag/paste your file, then dont fill in anything else, just hit UPLOAD.
Then copy the link for the "download page link", and post here in thread that link.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 25th June 2025 at 18:28.
StainlessS is offline   Reply With Quote
Old 25th June 2025, 18:29   #13  |  Link
Microfiche
Registered User
 
Microfiche's Avatar
 
Join Date: Jun 2025
Posts: 10
Quote:
Originally Posted by StainlessS View Post
post here in thread that link.
https://www.sendspace.com/file/j69hlm
Microfiche is offline   Reply With Quote
Old 25th June 2025, 18:30   #14  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
Got it.
Thanks, dont bother lurking around here all day, probably not post anything till tomorrow.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 25th June 2025, 18:46   #15  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
Outfile.srt, line 3413 [ the first line with RED text]

Code:
569
00:23:59,071 --> 00:23:59,670
>> NO, I'M ASKING.
WHAT IS "SATURDAY NIGHT LIVE"?
I DON'T KNOW THAT.

570
23:59,672 --> 24:03,774    # BAD Format, missing leading "00:"
WHAT IS "SATURDAY NIGHT LIVE"?
I DON'T KNOW THAT.
>> IT'S "SATURDAY NIGHT LIVE."


# ...


1404
59:57,944 --> 01:00:09,154    # BAD Format, missing leading "00:"
¶¶
>>> IT'S WEEKEND UPDATE, 50th
ANNIVERSARY EDITION.

1405
01:00:09,156 --> 01:00:19,564
>>> IT'S WEEKEND UPDATE, 50th
ANNIVERSARY EDITION.
WITH COLIN JOST AND MIKELE --


# OK from here till End
EDIT: Lots of paragraph marks from here till end
Code:
13
00:00:59,727 --> 00:01:03,062
[ LAUGHTER ]
>> I'M GLAD THEY'RE GETTING A
CHANCE TO HEAR IT TONIGHT.

14
00:01:04,697 --> 00:01:17,376
¶¶
SITTING IN THE RAILWAY
STATION, TICKET FOR MY

15
00:01:17,378 --> 00:01:21,480
¶ SITTING IN THE RAILWAY
STATION, TICKET FOR MY
DESTINATION ¶

16
00:01:21,482 --> 00:01:23,148
STATION, TICKET FOR MY
DESTINATION ¶
¶ ON A TOUR OF

17
00:01:23,150 --> 00:01:24,716
DESTINATION ¶
¶ ON A TOUR OF
ONE-NIGHT STANDS
EDIT:
Looks like ASCII file has been hand edited in maybe UTF8 text editor, maybe, I think, perhaps.

Have you done any hand editing after ffmpeg conversion ???
If so, can you post unedited file.

EDIT: OK, seems that the "paragraph marks" are actually supposed to be music symbols, seems to be a song [Simon & Garfunkle, Homeward Bound].
Not really sure what to do with them. [ignore, omit, something else ???]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 25th June 2025 at 19:28.
StainlessS is offline   Reply With Quote
Old 26th June 2025, 00:32   #16  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 2,044
Yes, from some karaoke and other use cases:
Pilcrow -> Eighth note
¶ -> ♪
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Old 26th June 2025, 02:43   #17  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
Thanx Emulgator, sage of the age. [I'm a poet, and don't even know it]

OK, script 1, creates DBase when WRITE_DBASE=True

1_Srt_ParseAndWriteDBase.avs # EDIT: DONT USE, See Scripts at post #28
Code:
# 1_Srt_ParseAndWriteDBase.avs     # https://forum.doom9.org/showthread.php?p=2020099#post2020099

/*
    Requires Avs+, RT_Stats v2.0 Beta 13 [ https://www.mediafire.com/file/xa3t1wx234gyzfq/RT_Stats_25%252626_x86_x64_dll_v2.00Beta13_20201229.zip/file ]

    Will Require non weird character encoding, if necessary try UNICODE UTF8 without BOM (65001) [I did my test convert via PsPad text editor]

    Allows times HOURS and MINUTES digits to be missing [With WARN to DebugView].
*/

##################
### CONFIG  ######
FN =".\Outfile.srt"          # Src srt file
##################
DEBUG       = False         # True, full debug to DebugView from M$ ( https://learn.microsoft.com/en-us/sysinternals/downloads/debugview )
                            # Try with False first to see WARNINGS in DebugView, then switch to True and Repeat.
WRITE_DBASE = False         # If False then does Not write DBase : [FALSE for testing script parsing only]
##################

FN=RT_GetFullPathName(FN)
DB=FN+".DB"
TypeStr="s512iiii"                                      # DBase, 5 fields, field String[512], 4 * int fields.
(WRITE_DBASE) ? RT_FileDelete(DB) : NOP                 # Delete any existing DBase if writing new one
(WRITE_DBASE) ? RT_DBaseAlloc(DB,0,TypeStr) : NOP       # Create Empty DBase (0 records)
##################
### DBase Fields
SUBS_FLD    = 0         # Subtitle text String field
SSECS_FLD   = 1         # Start Seconds field
SMSECS_FLD  = 2         # Start millisecs field
ESECS_FLD   = 3         # End Seconds field
EMSECS_FLD  = 4         # End millisecs field
###
DIGITALP="0123456789"   #
TIMEALP=DIGITALP+":,"   #
IN = False
SubN=1                  # Subtitle Number
TimeS=""                # Times String
LINES=RT_FileQueryLines(FN)
For(i=0,LINES-1) {
    Txt=RT_ReadTxtFromFile(FN,Lines=1,Start=i).RT_TxtGetLine.ChrEatWhite.RevStr.ChrEatWhite.RevStr   # Get Line of text, remove EOL and Eat leading & trailing White Space
    len=Txt.StrLen
    s=Txt
    if(!IN) {
        if(len>0) { # Ignore Blank lines till a line ID
            numlen=s.StrMatchChrLen(DIGITALP,sig=True)
            Assert(numlen>0,RT_String("Line %d Subtitle Number %d NOT FOUND\n'%s'",i+1,SubN,Txt))
            Number=s.RT_NumberValue
            Assert(Number==SubN,RT_String("Line %d Expecting subtitle Number %d Got %d\n'%s'",i+1,SubN,Number,Txt))
            s=s.MidStr(numlen+1)
            Assert(s=="",RT_String("Line %d Expecting nothing after subtitle number %d, Got '%s'\n'%s'",i+1,SubN,s,Txt))
            TimeS=""    StartSeconds=0  StartMillisecs=0    EndSeconds=0    EndMillisecs=0
            Subtitles=""    SubLines=0  SubStartLine = i+1
            IN = True   SubIx=1     # Expecting Times next
        }
    } else {
        if(len>0) {
            if(SubIx==1) { # Times
                (Len!=29 && !DEBUG) ? RT_DebugF("*** WARN : Line %d Times expecting 29 characters, got %d \n    '%s'",i+1,len,Txt) : NOP
                OpenTimeLen=s.StrMatchChrLen(TIMEALP,sig=True)
                OpenTime = s.LeftStr(OpenTimeLen)
                s=s.MidStr(OpenTimeLen+1)
                OpenTime = (OpenTimeLen==9 ? "00:" : OpenTimeLen==6 ? "00:00:" : "") + OpenTime
                OpenTimeLen=OpenTime.Strlen
                Assert(OpenTimeLen==12,RT_String("Line %d Open Times expecting 12 characters, got %d \n'%s'",i+1,OpenTimeLen,OpenTime))
                StartSeconds=(OpenTime.MidStr(1,2).RT_NumberValue*60+OpenTime.MidStr(4,2).RT_NumberValue)*60+OpenTime.MidStr(7,2).RT_NumberValue
                StartMillisecs=OpenTime.MidStr(10,3).RT_NumberValue
                Assert(s.LeftStr(5)==" --> ",RT_String("Line %d expecting ' --> '\n'%s'",i+1,s))
                s=s.MidStr(6)
                EndTimeLen=s.StrMatchChrLen(TIMEALP,sig=True)
                EndTime = s.LeftStr(EndTimeLen)
                s=s.MidStr(EndTimeLen+1)
                EndTime = (EndTimeLen==9 ? "00:" : EndTimeLen==6 ? "00:00:" : "") + EndTime
                EndTimeLen=EndTime.Strlen
                Assert(EndTimeLen==12,RT_String("Line %d End Times expecting 12 characters, got %d \n'%s'",i+1,EndTimeLen,EndTime))
                EndSeconds=(EndTime.MidStr(1,2).RT_NumberValue*60+EndTime.MidStr(4,2).RT_NumberValue)*60+EndTime.MidStr(7,2).RT_NumberValue
                EndMillisecs=EndTime.MidStr(10,3).RT_NumberValue
                Times = OpenTime + " --> " + EndTime
                SubIx=2
            } else if(SubIx==2) { # Text
                Subtitles=(SubLines==0)?Txt:Subtitles+Chr(10)+Txt
                SubLines=SubLines+1
            } Else {
                Assert(false,"Bad SubIx")
            }
        }
        if(len==0 || i+1>=LINES) {
            Assert(SubIx==2,RT_String("Line %d Expecting %s\n'%s'",i+1,SubIx==0?"Subtitle Number":"Times",Txt))
            If(WRITE_DBASE) {
                RT_DBaseAppend(DB,Subtitles,StartSeconds,StartMillisecs,EndSeconds,EndMillisecs)
            }
            (DEBUG) ? RT_DebugF("####### LINE %d #######\n%d\n%s\n%s\n",SubStartLine,SubN,Times,Subtitles) : NOP
            SubN=SubN+1
            IN = False
        }
    }
}

Return (!WRITE_DBASE)
    \ ? MessageClip(RT_String("Parse Only\n'%s'",FN))
    \ : MessageClip(RT_String("Parse And Write DBAse\n'%s'\n'%s'",FN,DB))

##############################

Function ChrEatWhite(String S)   {i=1 C=RT_Ord(S,i) While(C==32||C>=8&&C<=13)                        {i=i+1 C=RT_Ord(S,i)} return i>1?MidStr(S,i):S}

# Return extent of string S [ie length from the beginning] that matches any character in Chars set of characters [Default case insignificant]. # StrMatchChrLen("1234.567abcd","0123456789.") = 8
Function StrMatchChrLen(String s,String Chars,Bool "Sig") {
    Function __StrMatchChrLen_LOW(String s,String Chars,int n) { c=s.MidStr(n+1,1) Return(c==""||Chars.FindStr(c)==0) ? n : s.__StrMatchChrLen_LOW(Chars,n+1) }
    Sig=Default(Sig,False)  # Default Case Insignificant
    s=(Sig)?s:s.UCASE   Chars=(Sig)?Chars:Chars.UCASE
    __StrMatchChrLen_LOW(s,Chars,0)
}
Sample from Debugview when DEBUG=FALSE [ Allows times HOURS/MINUTES digits to be missing [With WARN to DebugView]. ]
Code:
00000100    02:27:14    [7736] RT_DebugF: *** WARN : Line 3413 Times expecting 29 characters, got 23
00000101    02:27:14    [7736] RT_DebugF:     '23:59,672 --> 24:03,774'                   # EDIT: Hours '00:' missing for both start/end times.
00000102    02:27:14    [7736] RT_DebugF: *** WARN : Line 3419 Times expecting 29 characters, got 23
00000103    02:27:14    [7736] RT_DebugF:     '24:03,776 --> 24:04,475'
00000104    02:27:14    [7736] RT_DebugF: *** WARN : Line 3425 Times expecting 29 characters, got 23
00000105    02:27:14    [7736] RT_DebugF:     '24:04,477 --> 24:07,278'
00000106    02:27:14    [7736] RT_DebugF: *** WARN : Line 3431 Times expecting 29 characters, got 23

# ...

00001762    02:27:18    [7736] RT_DebugF: *** WARN : Line 8382 Times expecting 29 characters, got 23
00001763    02:27:18    [7736] RT_DebugF:     '59:24,511 --> 59:31,350'
00001764    02:27:18    [7736] RT_DebugF: *** WARN : Line 8388 Times expecting 29 characters, got 23
00001765    02:27:18    [7736] RT_DebugF:     '59:31,352 --> 59:38,824'
00001766    02:27:18    [7736] RT_DebugF: *** WARN : Line 8394 Times expecting 29 characters, got 23
00001767    02:27:18    [7736] RT_DebugF:     '59:49,669 --> 59:52,871'
00001768    02:27:18    [7736] RT_DebugF: *** WARN : Line 8398 Times expecting 29 characters, got 26
00001769    02:27:18    [7736] RT_DebugF:     '59:57,944 --> 01:00:09,154'                # EDIT: Hours '00:' missing for start time only.
Sample from Debugview when DEBUG=TRUE [Missing HOURS/MINUTES digits silently fixed, Set WRITE_DBASE=true to also write DB]
Code:
00001869    02:27:50    [11988] RT_DebugF: ####### LINE 1 #######
00001870    02:27:50    [11988] RT_DebugF: 1
00001871    02:27:50    [11988] RT_DebugF: 00:00:05,472 --> 00:00:13,445
00001872    02:27:50    [11988] RT_DebugF: [ CHEERS AND APPLAUSE ]
00001873    02:27:50    [11988] RT_DebugF:
00001874    02:27:50    [11988] RT_DebugF: ####### LINE 5 #######
00001875    02:27:50    [11988] RT_DebugF: 2
00001876    02:27:50    [11988] RT_DebugF: 00:00:25,158 --> 00:00:30,863
00001877    02:27:50    [11988] RT_DebugF: >>> LADIES AND GENTLEMEN, THIS
00001878    02:27:50    [11988] RT_DebugF: IS SABRINA CARPENTER.
00001879    02:27:50    [11988] RT_DebugF: [ CHEERING ]
00001880    02:27:50    [11988] RT_DebugF:
00001881    02:27:50    [11988] RT_DebugF: ####### LINE 11 #######
00001882    02:27:50    [11988] RT_DebugF: 3
00001883    02:27:50    [11988] RT_DebugF: 00:00:30,865 --> 00:00:31,630
00001884    02:27:50    [11988] RT_DebugF: IS SABRINA CARPENTER.
00001885    02:27:50    [11988] RT_DebugF: [ CHEERING ]
00001886    02:27:50    [11988] RT_DebugF: >> THIS IS THE ONE AND ONLY PAUL
00001887    02:27:50    [11988] RT_DebugF:
00001888    02:27:50    [11988] RT_DebugF: ####### LINE 17 #######
00001889    02:27:50    [11988] RT_DebugF: 4
00001890    02:27:50    [11988] RT_DebugF: 00:00:31,632 --> 00:00:31,930
00001891    02:27:50    [11988] RT_DebugF: [ CHEERING ]
00001892    02:27:50    [11988] RT_DebugF: >> THIS IS THE ONE AND ONLY PAUL
00001893    02:27:50    [11988] RT_DebugF: SIMON.
00001894    02:27:50    [11988] RT_DebugF:
00001895    02:27:50    [11988] RT_DebugF: ####### LINE 23 #######
00001896    02:27:50    [11988] RT_DebugF: 5
00001897    02:27:50    [11988] RT_DebugF: 00:00:31,932 --> 00:00:37,236
00001898    02:27:50    [11988] RT_DebugF: >> THIS IS THE ONE AND ONLY PAUL
00001899    02:27:50    [11988] RT_DebugF: SIMON.
00001900    02:27:50    [11988] RT_DebugF: [ CHEERING ]
00001901    02:27:50    [11988] RT_DebugF:
00001902    02:27:50    [11988] RT_DebugF: ####### LINE 29 #######
00001903    02:27:50    [11988] RT_DebugF: 6
00001904    02:27:50    [11988] RT_DebugF: 00:00:37,238 --> 00:00:41,140
00001905    02:27:50    [11988] RT_DebugF: SIMON.
00001906    02:27:50    [11988] RT_DebugF: [ CHEERING ]
00001907    02:27:50    [11988] RT_DebugF: >> I SANG THIS SONG WITH GEORGE
00001908    02:27:50    [11988] RT_DebugF:
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 7th July 2025 at 07:19.
StainlessS is offline   Reply With Quote
Old 26th June 2025, 03:01   #18  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
Script 2, Show already written DBase # EDIT: DONT USE, See Scripts at post #28

2_SrtShowDB.avs # https://forum.doom9.org/showthread.p...00#post2020100
Code:
# 2_SrtShowDB.avs
# Show Subs DBase via DebugView, times are in seconds only

DB = "./Outfile.srt.DB"
DB = RT_GetFullPathName(DB)

### DBase Fields
# TypeStr="s512iiii"    # DBase 5 fields, field String[512], 4 * int fields.
SUBS_FLD    = 0         # Subtitle text String field
SSECS_FLD   = 1         # Start Seconds field
SMSECS_FLD  = 2         # Start millisecs field
ESECS_FLD   = 3         # End Seconds field
EMSECS_FLD  = 4         # End millisecs field

Records = RT_DBaseRecords(DB)
PadS="    "
for(i=0,Records-1) {
    SUBS  = RT_DBaseGetField(DB,i,SUBS_FLD)
    STime = RT_DBaseGetField(DB,i,SSECS_FLD).String() + "." + RT_DBaseGetField(DB,i,SMSECS_FLD).String()
    ETime = RT_DBaseGetField(DB,i,ESECS_FLD).String() + "." + RT_DBaseGetField(DB,i,EMSECS_FLD).String()
    S=RT_StrReplace(SUBS,Chr(10),Chr(10)+PadS)    # Format spacing for DebugView writing
    RT_DebugF("%d\n%s%s\n%s%s\n%s%s",i+1,PadS,STime,PadS,ETime,PadS,S)
}

return MessageClip("Done")
From Debugview
Code:
00000100    02:30:33    [13372] RT_DebugF: 1
00000101    02:30:33    [13372] RT_DebugF:     5.472          # EDIT: Start Time in seconds
00000102    02:30:33    [13372] RT_DebugF:     13.445         # EDIT: End Time in seconds
00000103    02:30:33    [13372] RT_DebugF:     [ CHEERS AND APPLAUSE ]
00000104    02:30:33    [13372] RT_DebugF: 2
00000105    02:30:33    [13372] RT_DebugF:     25.158
00000106    02:30:33    [13372] RT_DebugF:     30.863
00000107    02:30:33    [13372] RT_DebugF:     >>> LADIES AND GENTLEMEN, THIS
00000108    02:30:33    [13372] RT_DebugF:     IS SABRINA CARPENTER.
00000109    02:30:33    [13372] RT_DebugF:     [ CHEERING ]
00000110    02:30:33    [13372] RT_DebugF: 3
00000111    02:30:33    [13372] RT_DebugF:     30.865
00000112    02:30:33    [13372] RT_DebugF:     31.630
00000113    02:30:33    [13372] RT_DebugF:     IS SABRINA CARPENTER.
00000114    02:30:33    [13372] RT_DebugF:     [ CHEERING ]
00000115    02:30:33    [13372] RT_DebugF:     >> THIS IS THE ONE AND ONLY PAUL
00000116    02:30:33    [13372] RT_DebugF: 4
00000117    02:30:33    [13372] RT_DebugF:     31.632
00000118    02:30:33    [13372] RT_DebugF:     31.930
00000119    02:30:33    [13372] RT_DebugF:     [ CHEERING ]
00000120    02:30:33    [13372] RT_DebugF:     >> THIS IS THE ONE AND ONLY PAUL
00000121    02:30:33    [13372] RT_DebugF:     SIMON.
00000122    02:30:33    [13372] RT_DebugF: 5
00000123    02:30:33    [13372] RT_DebugF:     31.932
00000124    02:30:33    [13372] RT_DebugF:     37.236
00000125    02:30:33    [13372] RT_DebugF:     >> THIS IS THE ONE AND ONLY PAUL
00000126    02:30:33    [13372] RT_DebugF:     SIMON.
00000127    02:30:33    [13372] RT_DebugF:     [ CHEERING ]
00000128    02:30:33    [13372] RT_DebugF: 6
00000129    02:30:33    [13372] RT_DebugF:     37.238
00000130    02:30:33    [13372] RT_DebugF:     41.140
00000131    02:30:33    [13372] RT_DebugF:     SIMON.
00000132    02:30:33    [13372] RT_DebugF:     [ CHEERING ]
00000133    02:30:33    [13372] RT_DebugF:     >> I SANG THIS SONG WITH GEORGE
00000134    02:30:33    [13372] RT_DebugF: 7
00000135    02:30:33    [13372] RT_DebugF:     41.142
00000136    02:30:33    [13372] RT_DebugF:     42.941
00000137    02:30:33    [13372] RT_DebugF:     [ CHEERING ]
00000138    02:30:33    [13372] RT_DebugF:     >> I SANG THIS SONG WITH GEORGE
00000139    02:30:33    [13372] RT_DebugF:     HARRISON ON "SATURDAY NIGHT
00000140    02:30:33    [13372] RT_DebugF: 8
00000141    02:30:33    [13372] RT_DebugF:     42.943
00000142    02:30:33    [13372] RT_DebugF:     45.511
00000143    02:30:33    [13372] RT_DebugF:     >> I SANG THIS SONG WITH GEORGE
00000144    02:30:33    [13372] RT_DebugF:     HARRISON ON "SATURDAY NIGHT
00000145    02:30:33    [13372] RT_DebugF:     LIVE" IN 1976.
00000146    02:30:33    [13372] RT_DebugF: 9
00000147    02:30:33    [13372] RT_DebugF:     45.513
00000148    02:30:33    [13372] RT_DebugF:     47.980
00000149    02:30:33    [13372] RT_DebugF:     HARRISON ON "SATURDAY NIGHT
00000150    02:30:33    [13372] RT_DebugF:     LIVE" IN 1976.
00000151    02:30:33    [13372] RT_DebugF:     >> I WAS NOT BORN THEN, AND
00000152    02:30:33    [13372] RT_DebugF: 10
00000153    02:30:33    [13372] RT_DebugF:     47.982
00000154    02:30:33    [13372] RT_DebugF:     48.580
00000155    02:30:33    [13372] RT_DebugF:     LIVE" IN 1976.
00000156    02:30:33    [13372] RT_DebugF:     >> I WAS NOT BORN THEN, AND
00000157    02:30:33    [13372] RT_DebugF:     NEITHER WERE MY PARENTS.


# ...


00021944    03:25:31    [9220] RT_DebugF: 3653
00021945    03:25:31    [9220] RT_DebugF:     9003.612
00021946    03:25:31    [9220] RT_DebugF:     9006.279
00021947    03:25:31    [9220] RT_DebugF:     ALL HERE, THE MAN WHO MADE OUR
00021948    03:25:31    [9220] RT_DebugF:     DREAM COME TRUE, THE ONE AND
00021949    03:25:31    [9220] RT_DebugF:     ONLY, OH, AND PAUL.
00021950    03:25:31    [9220] RT_DebugF: 3654
00021951    03:25:31    [9220] RT_DebugF:     9006.281
00021952    03:25:31    [9220] RT_DebugF:     9007.80
00021953    03:25:31    [9220] RT_DebugF:     DREAM COME TRUE, THE ONE AND
00021954    03:25:31    [9220] RT_DebugF:     ONLY, OH, AND PAUL.
00021955    03:25:31    [9220] RT_DebugF:     LORNE MICHAELS!
00021956    03:25:31    [9220] RT_DebugF: 3655
00021957    03:25:31    [9220] RT_DebugF:     9007.82
00021958    03:25:31    [9220] RT_DebugF:     9020.560
00021959    03:25:31    [9220] RT_DebugF:     ONLY, OH, AND PAUL.
00021960    03:25:31    [9220] RT_DebugF:     LORNE MICHAELS!
00021961    03:25:31    [9220] RT_DebugF:     [ CHEERS AND APPLAUSE ]
00021962    03:25:31    [9220] RT_DebugF: 3656
00021963    03:25:31    [9220] RT_DebugF:     9020.562
00021964    03:25:31    [9220] RT_DebugF:     9024.130
00021965    03:25:31    [9220] RT_DebugF:     LORNE MICHAELS!
00021966    03:25:31    [9220] RT_DebugF:     [ CHEERS AND APPLAUSE ]
00021967    03:25:31    [9220] RT_DebugF:     50, BEST OF LUCK, WE CAN'T WAIT.
00021968    03:25:31    [9220] RT_DebugF: 3657
00021969    03:25:31    [9220] RT_DebugF:     9024.132
00021970    03:25:31    [9220] RT_DebugF:     9026.132
00021971    03:25:31    [9220] RT_DebugF:     [ CHEERS AND APPLAUSE ]
00021972    03:25:31    [9220] RT_DebugF:     50, BEST OF LUCK, WE CAN'T WAIT.
00021973    03:25:31    [9220] RT_DebugF:     GOD KNOWS WE LOVE YOU ALL.
00021974    03:25:31    [9220] RT_DebugF: 3658
00021975    03:25:31    [9220] RT_DebugF:     9026.134
00021976    03:25:31    [9220] RT_DebugF:     9026.866
00021977    03:25:31    [9220] RT_DebugF:     50, BEST OF LUCK, WE CAN'T WAIT.
00021978    03:25:31    [9220] RT_DebugF:     GOD KNOWS WE LOVE YOU ALL.
00021979    03:25:31    [9220] RT_DebugF:     GOOD NIGHT AND GOD BLESS!
00021980    03:25:31    [9220] RT_DebugF: 3659
00021981    03:25:31    [9220] RT_DebugF:     9026.868
00021982    03:25:31    [9220] RT_DebugF:     9030.436
00021983    03:25:31    [9220] RT_DebugF:     GOD KNOWS WE LOVE YOU ALL.
00021984    03:25:31    [9220] RT_DebugF:     GOOD NIGHT AND GOD BLESS!
00021985    03:25:31    [9220] RT_DebugF:     [ CHEERS AND APPLAUSE ]
00021986    03:25:31    [9220] RT_DebugF: 3660
00021987    03:25:31    [9220] RT_DebugF:     9031.972
00021988    03:25:31    [9220] RT_DebugF:     9040.847
00021989    03:25:31    [9220] RT_DebugF:     ¶¶
00021990    03:25:31    [9220] RT_DebugF:     [ APPLAUSE ]
00021991    03:25:31    [9220] RT_DebugF: 3661
00021992    03:25:31    [9220] RT_DebugF:     9042.449
00021993    03:25:31    [9220] RT_DebugF:     9051.858
00021994    03:25:31    [9220] RT_DebugF:     ¶¶
00021995    03:25:31    [9220] RT_DebugF: 3662
00021996    03:25:31    [9220] RT_DebugF:     9054.795
00021997    03:25:31    [9220] RT_DebugF:     9061.534
00021998    03:25:31    [9220] RT_DebugF:     ¶¶
00021999    03:25:31    [9220] RT_DebugF: 3663
00022000    03:25:31    [9220] RT_DebugF:     9069.543
00022001    03:25:31    [9220] RT_DebugF:     9076.749
00022002    03:25:31    [9220] RT_DebugF:     ¶¶
00022003    03:25:31    [9220] RT_DebugF: 3664
00022004    03:25:31    [9220] RT_DebugF:     9091.966
00022005    03:25:31    [9220] RT_DebugF:     9099.105
00022006    03:25:31    [9220] RT_DebugF:     ¶¶
00022007    03:25:31    [9220] RT_DebugF: 3665
00022008    03:25:31    [9220] RT_DebugF:     9101.41
00022009    03:25:31    [9220] RT_DebugF:     9106.913
00022010    03:25:31    [9220] RT_DebugF:     ¶¶
00022011    03:25:31    [9220] RT_DebugF: 3666
00022012    03:25:31    [9220] RT_DebugF:     9116.957
00022013    03:25:31    [9220] RT_DebugF:     9125.398
00022014    03:25:31    [9220] RT_DebugF:     ¶¶
00022015    03:25:31    [9220] RT_DebugF: 3667
00022016    03:25:31    [9220] RT_DebugF:     9127.234
00022017    03:25:31    [9220] RT_DebugF:     9134.374
00022018    03:25:31    [9220] RT_DebugF:     ¶¶
00022019    03:25:31    [9220] RT_DebugF: 3668
00022020    03:25:31    [9220] RT_DebugF:     9136.443
00022021    03:25:31    [9220] RT_DebugF:     9137.109
00022022    03:25:31    [9220] RT_DebugF:     ¶
Need remaining script will be to try separate the text somehow, not really sure how to do that yet.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 7th July 2025 at 07:19.
StainlessS is offline   Reply With Quote
Old 27th June 2025, 15:33   #19  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,417
Tool to aid me in writing fix script, + compare original with fixed srt.

SrtRenderCompareSubs.avs # EDIT: DONT USE, See Scripts at post #28
Code:
# SrtRenderCompareSubs.avs  # https://forum.doom9.org/showthread.php?p=2020155#post2020155
#
# Requires TextSub() from VsFilter.dll # https://github.com/pinterf/xy-VSFilter/releases
#

SRT1 = ".\Outfile.srt"      # Original srt
SRT2 = ""                   # Comparison srt (compare original with fixed), "" = Just show original.
#SRT2 = SRT1
FPS  = 25.0                 # Original FrameRate
#####################
DB   = Srt1 + ".DB"
SRT1 = RT_GetFullPathName(SRT1)
SRT2 = (SRT2!="") ? RT_GetFullPathName(SRT2) : SRT2
#####################
### DBase Fields
# TypeStr="s512iiii"    # DBase, 5 fields, field String[512], 4 * int fields.
SUBS_FLD    = 0         # Subtitle text String field
SSECS_FLD   = 1         # Start Seconds field
SMSECS_FLD  = 2         # Start millisecs field
ESECS_FLD   = 3         # End Seconds field
EMSECS_FLD  = 4         # End millisecs field
#####################

DB      = RT_GetFullPathName(DB)
Records = Exist(DB)   ? RT_DBaseRecords(DB) : 0
Seconds = (Records<=0  ? 03*3600 : RT_DBaseGetField(DB,Records-1,ESECS_FLD)) + 30
Frames  = (Seconds * FPS).Round
Last    = BlankClip(Width=1280,Height=720,Length=Frames,Pixel_Type="YV12",fps=FPS)
(SRT2=="") ? TextSub(SRT1) : StackHorizontal(TextSub(SRT1),TextSub(SRT2))
ShowTime()
Return Last
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 7th July 2025 at 07:19.
StainlessS is offline   Reply With Quote
Old 28th June 2025, 02:04   #20  |  Link
pc_speak
Old Batch Hacker
 
Join Date: Oct 2006
Location: At Home
Posts: 80
This is my default method. Works for 95% of my ttx subtitles.
Code:
@echo off
for %%a in (*.mp4) do call :process1 "%%a"
goto :end
:process1
"C:\CCExtractor 0.94\ccextractorwinfull.exe" -codec teletext %1 -o "%~dpn1.srt"
goto :eof
:end
pause
CCExtractor has several parameters you can try.
Code:
"C:\CCExtractor 0.94\ccextractorwinfull.exe" "my video.mp4" -o "my video.srt"
"C:\CCExtractor 0.94\ccextractorwinfull.exe" "my video.mp4" -dru -o "my video-direct_rollup.srt"
"C:\CCExtractor 0.94\ccextractorwinfull.exe" "my video.mp4" -noru -o "my video-norollup.srt"
"C:\CCExtractor 0.94\ccextractorwinfull.exe" "my video.mp4" -ru1 -o "my video-ru1.srt"
"C:\CCExtractor 0.94\ccextractorwinfull.exe" "my video.mp4" -ru2 -o "my video-ru2.srt"
"C:\CCExtractor 0.94\ccextractorwinfull.exe" "my video.mp4" -ru3 -o "my video-ru3.srt"
One of them may work.
I tend to load them all into the one batch file. Run it, and then take a peek at all the srt files.

Last edited by pc_speak; 28th June 2025 at 02:16. Reason: Additional info.
pc_speak is offline   Reply With Quote
Reply

Tags
timed text

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.