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.

 

Go Back   Doom9's Forum > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th March 2025, 23:11   #1961  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 396
When search finds a search-string and the mouse pointer is over the waveforms and I hit the Delete key, SE asks to delete the current subtitle. So, the list apparently has the focus even though it doesn't show it, even though a found-string is highlighted in the text box, and even though the mouse pointer is over the waveforms. That's not logical.

I expected to delete the found-string in the text box.

PART TWO, ADDED:

When a search for "BELL BEEPING" finds "[ DOORBELL BEEPING ]", "[ DOORBELL BEEPING ]" is put in the text box with "BELL BEEPING" highlighted. When I hit the Delete key, the entire text box is wiped out. That's illogical.

Last edited by markfilipak; 5th March 2025 at 17:24.
markfilipak is offline   Reply With Quote
Old 5th March 2025, 16:53   #1962  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 396
With the mouse over the waveforms, when I press either 'Z' or 'X' keys, the waveform scrolls by approximately -7.5 seconds. How can I disable that?

The above happens if the 'Center' thingy (between the play arrow and the 'Play rate' speedometer) is active. If the 'Center' thingy is not active, then the 'Z' key scrolls -100ms and the 'X' key scrolls +100ms.

Is there a way to kill keys that are not listed in 'Setup', 'Shortcuts'?

Last edited by markfilipak; 5th March 2025 at 17:16.
markfilipak is offline   Reply With Quote
Old 7th March 2025, 02:32   #1963  |  Link
castellanos
Member
 
castellanos's Avatar
 
Join Date: Jan 2004
Location: Argentina and Germany
Posts: 701
Hi. New version 4.0.11. I can't use the spacebar to toggle video play/pause anymore. (possible in previous version).
I've changed the shortcut in the settings: "Settings/Shortcuts/Video/Toggle play/pause [Space]" but no luck.
castellanos is offline   Reply With Quote
Old 7th March 2025, 14:32   #1964  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,755
Hi,
is it possible to add this option ;
Replace comma by point when next line begins by uppercase letter or dash, thus a new sentence ?

It could be problematic if the next line begins with a name which has an uppercase letter and which is not a new sentence, but it could help anyway to have this option.
And it's still possible to deactivate the option when unneeded for some lines.

Thanks a lot.

Last edited by Music Fan; 7th March 2025 at 14:58.
Music Fan is offline   Reply With Quote
Old 7th March 2025, 22:19   #1965  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 396
@Music Fan

find:
Code:
,(\n[A-Z\-])
replace:
Code:
.$1

Last edited by markfilipak; 7th March 2025 at 22:56.
markfilipak is offline   Reply With Quote
Old 7th March 2025, 23:02   #1966  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,755
Thanks but it does not work, no line is detected.
It may need the line break character, I believe it's `n (that's what I use with PowerShell)
But I tried whit this, it's not better.

edit : I tried with PowerShell but of course it can't work because of the space and the next timecode following each (double) line.

Last edited by Music Fan; 7th March 2025 at 23:21.
Music Fan is offline   Reply With Quote
Old 8th March 2025, 01:30   #1967  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 396
Quote:
Originally Posted by Music Fan View Post
Thanks but it does not work ...
I just tested it. It works for me. You have to use 'Edit', 'Multiple replace...' and define it as a regular expression.

Try it and report back, eh?

PS: You're right about it not working in 'Edit', 'Replace'. Well, what do you want for free? -- just kidding. It's a bug.

Last edited by markfilipak; 8th March 2025 at 01:35.
markfilipak is offline   Reply With Quote
Old 8th March 2025, 11:58   #1968  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,755
Actually I see that your trick works for commas inside lines but not at the end of lines.
Example ;
Code:
1
00:00:48,000 --> 00:00:50,200
I went there,
That's a beautiful place,

2
00:01:02,700 --> 00:01:04,084
Yes, indeed.
becomes ;
Code:
1
00:00:48,000 --> 00:00:50,200
I went there.
That's a beautiful place,

2
00:01:02,700 --> 00:01:04,084
Yes, indeed.
instead of ;
Code:
1
00:00:48,000 --> 00:00:50,200
I went there.
That's a beautiful place.

2
00:01:02,700 --> 00:01:04,084
Yes, indeed.
Music Fan is offline   Reply With Quote
Old 8th March 2025, 17:55   #1969  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 396
Quote:
Originally Posted by Music Fan View Post
Actually I see that your trick works for commas inside lines but not at the end of lines.
It's not a trick.

You asked for this: "Replace comma by point when next line begins by uppercase letter or dash, thus a new sentence", and that's exactly what I gave you. Now you also want to cover if the text ends on a comma with _nothing_ following it. That's
Code:
,($|(\n[A-Z\-]))
Also try
Code:
,((\n\n)|(\n[A-Z\-]))
That might cover better -- untested.

PS:
I just tested ,((\n\n)|(\n[A-Z\-]))
That's what you want.

Last edited by markfilipak; 8th March 2025 at 18:32.
markfilipak is offline   Reply With Quote
Old 9th March 2025, 11:31   #1970  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,755
Thanks but here the result is the same as in my example above, the comma stays at then end.

Quote:
Originally Posted by markfilipak View Post
You asked for this: "Replace comma by point when next line begins by uppercase letter or dash, thus a new sentence", and that's exactly what I gave you.
Actually, for SE, a line can be split in two with a line break, but it's still considered as one line.
That's how does the option "Add period after lines ..." work in the "Fix common errors" menu.

I don't know how this one works but it seems different from the replace menu (about the managing of lines).

Thus both solution would be helpful, yours when the problem appears inside a line (broken in two or not), and a new option in the "Fix common errors" menu when it's at the very end of the line (admitting a line has one timecode, whatever it's split in two or not).

Last edited by Music Fan; 9th March 2025 at 12:03.
Music Fan is offline   Reply With Quote
Old 9th March 2025, 16:22   #1971  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 396
Quote:
Originally Posted by Music Fan View Post
Actually, for SE, a line can be split in two with a line break, but it's still considered as one line.
No, a line that's split in two becomes 2 lines. This:
Code:
I went there,\nThat's a beautiful place,\n\n
is 3 lines. This regular expression:
Code:
,((\n\n)|(\n[A-Z\-]))
finds the textual strings that follow both commas, and this replacement:
Code:
.$1
replaces the commas with periods to produce this:
Code:
I went there.\nThat's a beautiful place.\n\n
ASIDE TO SE'S DEVELOPERS: I once wrote a Snobol script to beautify a friend's code. He was a professional programmer in Silicon Valley. He could not devise a regular expression in 'C' that would do it. It took me less than 5 minutes. That was 40 years ago. I recommend Ralph Griswold's book. Griswold invented Snobol. Snobol is much more powerful than REs.

Last edited by markfilipak; 9th March 2025 at 16:48.
markfilipak is offline   Reply With Quote
Old 9th March 2025, 16:41   #1972  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,755
I mean a line in the vocabulary of SE (one number and one timecode per line).
Music Fan is offline   Reply With Quote
Old 9th March 2025, 16:55   #1973  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 396
Quote:
Originally Posted by Music Fan View Post
I mean a line in the vocabulary of SE (one number and one timecode per line).
No. An index number line followed by a time code line followed by lines of text terminated by \n\n is a subtitle.
markfilipak is offline   Reply With Quote
Old 9th March 2025, 18:12   #1974  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,755
Look at the menus, that's also a line for SE.
But that doesn't matter, the fact is that your last code does not give a different result from the previous one in the replace menu.
Music Fan is offline   Reply With Quote
Old 9th March 2025, 18:26   #1975  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 396
Quote:
Originally Posted by Music Fan View Post
Look at the menus, that's also a line for SE.
But that doesn't matter, the fact is that your last code does not give a different result from the previous one in the replace menu.
I will not comment about fuzzy thinking and fuzzy nomenclature. You are not being specific. You are not citing specific regular expressions. You are being vague. I can advise you no further if you continue to be vague.
markfilipak is offline   Reply With Quote
Old 9th March 2025, 19:38   #1976  |  Link
Music Fan
Registered User
 
Join Date: May 2009
Location: Belgium
Posts: 1,755
Nothing vague, I was very precise but you don't understand while it's quite simple, not my fault.
Nikse555 will surely understand.
Music Fan is offline   Reply With Quote
Old 9th March 2025, 20:16   #1977  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 396
test.srt, before:
Code:
1
00:00:48,000 --> 00:00:50,200
I went there,
That's a beautiful place,

2
00:01:02,700 --> 00:01:04,084
Yes, indeed.
find and replace:
Code:
,($|\n[A-Z\-])
.$1
test.srt, after:
Code:
1
00:00:48,000 --> 00:00:50,200
I went there.
That's a beautiful place.

2
00:01:02,700 --> 00:01:04,084
Yes, indeed.
markfilipak is offline   Reply With Quote
Old 9th March 2025, 22:03   #1978  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 396
SPITBOL for SE

Regular expressions (RE) have recognized limitations. For example, you cannot build a string processor with RE alone. What is required is a language that supports logic threading -- by "logic threading" I don't mean concurrent processing, I mean the ability to move a character pointer back and forth, dynamically gathering and discarding characters according to some controlling logic. That controlling logic can be implemented in 'C', but that's very difficult (and time consuming and painful).

SNOBOL was a language specifically developed for string processing. It is incredibly powerful. SNOBOL can be used to make string processes that drive 'C' codesmiths insane.

SPITBOL is an Intel-based PC implementation of SNOBOL. SPITBOL is compiled for speed. Each 'script' becomes a tool that's exactly suited to the species of task required. Generating SPITBOL for a particular task, compiling it, and running it is faster than RE in 'C', and it can be done on-the-fly.

I strongly recommend SPITBOL for the string processing and time code beautification done in SE. A month of learning SPITBOL will save you a year of writing 'C'.

UPDATE:

I searched and found this:

https://github.com/spitbol/windows-nt

It appears that is SPITBOL-386 by Mark Emmer, Catspaw Inc., renamed. SPITBOL-386 is what I have experienced.

I will be done with a subtitling project in a week. I'll explore SPITBOL-NT at that time.

UPDATE 2: I wanted to gather as much documentation of SNOBOL/SPITBOL as possible. Not much has survived. I gotta admit, this looks kinda crackpot. I promise it's not.

Last edited by markfilipak; 11th March 2025 at 01:57.
markfilipak is offline   Reply With Quote
Old 13th March 2025, 06:08   #1979  |  Link
nekrovski
Registered User
 
nekrovski's Avatar
 
Join Date: Oct 2011
Posts: 58
Hello!
What format should be the filename of the pictures for OCR when import with file -> import -> images so that SE can read starting/end/duration of the lines?
nekrovski is offline   Reply With Quote
Old 20th March 2025, 23:36   #1980  |  Link
markfilipak
Registered User
 
markfilipak's Avatar
 
Join Date: Jul 2016
Location: Mansfield, Ohio (formerly, Silicon Valley in California)
Posts: 396
Proposal for editing cues in waveform

This procedure adds 'creature comforts' to the current method of setting in- and out-cues that speed up the process. It also automates as much as possible. If implemented, the 'creature comforts' combined with the automation would make processing subtitles very speedy and very accurate.

=== Begin manual part ===
Click the waveform inside a subtitle. (Call where you clicked THE WAVEPOINT.) Then press and hold THE KEY. While holding THE KEY down, mouse to either the in-cue or the out-cue, click THE CUE, and drag it.

- If THE CUE is an out-cue, SE plays an AUDIO LOOP from the _THE_WAVEPOINT_to_THE_CUE_, _THE_WAVEPOINT_to_THE_CUE_, over and over for as long as THE KEY is held down.

- If THE CUE is an in-cue, SE plays an AUDIO LOOP from the _THE_CUE_to_THE_WAVEPOINT_, _THE_CUE_to_THE_WAVEPOINT_, over and over for as long as THE KEY is held down.

While holding THE KEY, and while holding THE CLICK, THE CUE can be dragged. As THE CUE is dragged back and forth, the AUDIO LOOP will be heard to shorten and lengthen. Hearing that AUDIO LOOP's back and forth makes it easy to find the point where an utterance ends (or begins) and to drop THE CUE there, at that exact spot. When THE KEY is released or THE CLICK is released, either one, THE CUE is dropped.

- If THE KEY is released first, THE CUE is dropped and the AUDIO LOOP stops playing. If it's sub1's out-cue that was dropped, then SE waits until you do sub2's in-cue. If it's sub2's in-cue that was dropped, then SE runs the AUTOMATED PART on the sub1-to-sub2 interval.

- If THE CLICK is released first, THE CUE is dropped but the AUDIO LOOP continues playing and the AUTOMATED PART is not run because THE KEY is still pressed. THE CUE can be picked back up and moved again and again as long as THE KEY is held down.

SE now knows the spots when utterance1 ends and when utterance2 begins. That's the key to the AUTOMATED PART. In the AUTOMATED PART, out-cue1 and in-cue2 are both moved to their final spots.

If you make a mistake, the whole manual part, or any piece of it, can be repeated. SE always knows what you intend to do. For example, if you click either out-cue1 or in-cue2, you're working on the sub1-to-sub2 interval. if you click either out-cue2 or in-cue3, you're working on the sub2-to-sub3 interval. You can skip around if you like, and work on any interval anywhere at any time.

Notes to the developers:
1, The AUDIO LOOP plays just _THE_WAVEPOINT_to_THE_CUE_ or just _THE_CUE_to_THE_WAVEPOINT_ but not entire subtitles. Playing entire subtitles is a different key.
2, Releasing THE KEY always runs the AUTOMATED PART.
=== End manual part ===
=== Begin AUTOMATED PART ===
CASE1: (X-gap)>1300ms
Code:
                    out-cue1                      in-cue2
Before:                v                             v
             utterance1|<-------------X------------->|utterance2

After:                              v           v
             utterance1<----------->|           |<--->utterance2
                            1s                   300ms
                         out-pad1               in-pad2
CASE2: !CASE1 & (X-gap)>=600ms
Code:
Before:                        v             v
                     utterance1|<-----X----->|utterance2

After:                              v   v
                     utterance1     |gap|<--->utterance2
                                         300ms
CASE3: !CASE1 & !CASE2
Code:
Before:                          v         v
                       utterance1|<---X--->|utterance2

After:                            v   v
Note that the gap      utterance1 |gap|<--->utterance2
may often overlap                       X/2
utterance1.
After THE CASES are run, run THE FIXUPS.

THE FIXUPS.

Shot change within utterance1:
- If utterance1 ends 100ms or more past the shot change, do nothing, leave out-cue1 where it is.
- Otherwise, move out-cue1 to the shot change and, mark this interval FOR REWORK.

Shot change within out-pad1: Move out-cue1 to the shot change. Then either move in-cue2 to in-cue2 minus 300ms or to out-cue1 plus gap, whichever is greater.

Shot change within the gap: Do nothing, leave as is.

Shot change within in-pad2: Move in-cue2 to the shot change. Then either move out-cue1 to in-cue2 minus gap or to out-cue1 plus 1s, whichever is lesser.

Shot change within utterance2:
- If utterance2 begins 100ms or more before the shot change, do nothing, leave in-cue2 where it is.
- Otherwise, move in-cue2 to the shot change and, mark this interval FOR REWORK.
=== End AUTOMATED PART ===

Show the user the intervals that are marked FOR REWORK. Show them one at a time.

FOR REWORK: if utterance1 and utterance2 have the same speaker, consider merging and re-splitting at a better point.

Last edited by markfilipak; Yesterday at 18:55. Reason: Revised 'Shot change within out-pad1'
markfilipak is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 21:43.


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