Log in

View Full Version : Subtitle Edit


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 [25] 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

Atlantis
3rd October 2020, 22:57
Just wanted to say that I recently discovered nOCR and wanted to thank anyone responsible for it. It is like true magic compared to the other methods in Subtitle Edit. It requires less interaction. It's really like night and day.

jlw_4049
3rd October 2020, 23:26
Just wanted to say that I recently discovered nOCR and wanted to thank anyone responsible for it. It is like true magic compared to the other methods in Subtitle Edit. It requires less interaction. It's really like night and day.I agree, it's so much faster and generally more accurate.

It's definitely the best of both worlds.

Sent from my SM-G986U1 using Tapatalk

Atlantis
4th October 2020, 00:00
Before, I easily could spend 1-2 hours, more like 2 hours on a movie. With nOCR I do it in 10 minutes!

How does the self-learning work? Does it stay after each project or is it reset each time you finish a file?

Nikse555
6th October 2020, 18:12
I wouldn't know if this is already been addressed to, but now that I think about it:

Is it possible to load a SUP and/or XML/PNG file into SE, not OCR-ing it, only for adjusting the timecodes? And after that, export back to SUP or XML/PNG, so without changing the original subtitle images and their X/Y coördinates. Of course, preferably with realtime monitoring in the preview with a chosen video.

I would be very happy if that's possible.
Cheers

Sorry, SE cannot really do this... I guess SE has most of the code for this, so it would be relative easy to make. Perhaps a new program...


Just wanted to say that I recently discovered nOCR and wanted to thank anyone responsible for it. It is like true magic compared to the other methods in Subtitle Edit. It requires less interaction. It's really like night and day.
Nice to hear :)
Still, some subtitles (different/strange fonts) work better in Tesseract, but yes, nOCR works well for most subtitles.


Also, Subtitle Edit 3.5.17 is out: https://github.com/SubtitleEdit/subtitleedit/releases
Fixed a bug in BDSup reading with overlapping images (keeping images between PES packets and only clearing at Composition State=Epoch Start) and many minor improvements and fixes, and even Karaoke CD+G -> BDSup included.
Batch convert (and cmd line) can now handle transport streams with both teletext/images - and 300 different formats :)

jlw_4049
6th October 2020, 18:32
Sorry, SE cannot really do this... I guess SE has most of the code for this, so it would be relative easy to make. Perhaps a new program...







Nice to hear :)

Still, some subtitles (different/strange fonts) work better in Tesseract, but yes, nOCR works well for most subtitles.





Also, Subtitle Edit 3.5.17 is out: https://github.com/SubtitleEdit/subtitleedit/releases

Fixed a bug in BDSup reading with overlapping images (keeping images between PES packets and only clearing at Composition State=Epoch Start) and many minor improvements and fixes, and even Karaoke CD+G -> BDSup included.

Batch convert (and cmd line) can now handle transport streams with both teletext/images - and 300 different formats :)What a beast, thank you sir

Sent from my SM-G986U1 using Tapatalk

jpsdr
7th October 2020, 18:16
Hello, a little question.
I have two srt files A and B.
I want to insert the lines 100 to 200 of the file A after the line 50 of file B (and so before line 51 of file B which will become 152).

How do i do ?

I can't just do it in Notepad because line numbers will not be good anymore.

Janusz
7th October 2020, 22:32
@jpsdr
A. In the notebook
1. Insert lines in Notepad. Save the changed file with a new name.
2. Load the new file into the Subtitle Edit program.
3. Use Tools / Renumber to renumber (reorder) the line numbers.

B. In Subtitle Edit. (use the right mouse button)
1. Open file "A" in the program, mark lines 100 to 200, execute "Copy as text to clipboard"
2. Open file "B" in a new (second) session of the program, position the cursor on line 51,
execute Column / Paste from Clipboard with [Choose column] = All checked
and [Overwrite / Shift cells down] = Shift cells down.

jpsdr
8th October 2020, 17:13
Ok, thanks.

mugz8391
11th October 2020, 18:53
A few years ago I used Aegisub but it is no longer being supported it appears and links to the forum are dead right now.

I cannot remember how to apply the "typewriter effect" to lines of text and I'm not having much luck finding help to apply the different effects for Subtitle Edit either - I see in the change log this effect is supported but no tutorial on how to apply it. Can I get any help here?

Janusz
11th October 2020, 20:44
@mugz8391
Select the line or lines you want this effect to apply to
press the right mouse button on the marked area,
select [Typewriter effect ...]

von Suppé
13th October 2020, 11:49
Hi Nikse,

In the latest version, is there something wrong with the handling of *.ass subtitles, when exporting to SUP?

The preview in the SUP export-windows is definitely not showing what it used to.
Seems like the text is in front of a black cloud??

With srt to SUP evrything's okay.

Cheers

Edit: Sorry. I forgot that when creating or editing ASS styles in Aegisub first, things go well. Aegisub is doing more than when creating/changing ASS styles in SE.

So, all is well. Sorry for inconvenience.

Melan
15th October 2020, 08:56
Hello.
Could you please implement automatic deletion of spaces before characters like:
!
?
,
.
without informing about it in the "All fixes" window? I mean the Binary image compare method.
Currently, I have defined these patches using regex in OCRFixReplaceList file and the whole list of patches is "cluttered" by them, which makes it difficult to read.

https://i.imgur.com/F9sVhV5.png

Ghitulescu
16th October 2020, 20:35
Hello.
Could you please implement automatic deletion of spaces before characters like:
!
?
,
.
without informing about it in the "All fixes" window?

And as soon as this change is implemented, the Frenchmen will come and ask for inserting a space inbetween for this is what French spelling requires.

If you create your own subtitles, I am sure you have not this issue.
The rest might fall under Rule 6 :) :) :)

hello_hello
28th October 2020, 19:54
Hello.
Could you please implement automatic deletion of spaces before characters like:
!
?
,
.
without informing about it in the "All fixes" window? I mean the Binary image compare method.
Currently, I have defined these patches using regex in OCRFixReplaceList file and the whole list of patches is "cluttered" by them, which makes it difficult to read.

Would it be practical to remove them from the OCRFixReplaceList file and fix them later with "Tools/Fix Common Errors/Remove unneeded spaces"?

Atlantis
28th October 2020, 21:40
Is it possible to OCR the font colors also? In this or any other method. To have the colors OCRed from sub files and added to the srt files.

Atlantis
29th October 2020, 01:47
I didn't receive an answer, after you finish a file, is the learning erased or are they kept for the next job?

Atlantis
29th October 2020, 02:08
Please in nOCR spell check window add a button for
inspect nocr matches for current image

Binary image compare already has this with a button named "Edit image db"

Melan
29th October 2020, 16:09
Would it be practical to remove them from the OCRFixReplaceList file and fix them later with "Tools/Fix Common Errors/Remove unneeded spaces"?

Multiple records from the OCRFixReplaceList file can be defined in a different tool. Question - what for?
OCRFixReplaceList does its job great. And most importantly, it does it automatically, without user interaction.
The other tools are "manual" and you can always get an error.
Imagine you need to check every entry that contains only a space before "?", "!", ".", ",". Such a list contains about 100-300 entries. I don't even want to think how long it will take.

bl4ck
30th October 2020, 13:45
@Nikse555
Hi,
I last time I made many "sup" files for my blu-ray discs. Maybe possible is adding function to save font color for many colors? now program remember only last selected color.

Greetings.

Janusz
30th October 2020, 23:47
@hello_hello
Use "Multiple replace ..." instead of "OCRFixReplaceList"

@Atlantis
1. "Is it possible to OCR the font colors also? In this or any other method ..."
Yes, but only from the original stream, eg TS if the image uses a color font.

2. "I didn't receive an answer, after you finish a file, is the learning erased or are they kept for the next job?"
Yes, if you have [Remember "Use always" list] checked, you will be able to use your changes for other files in the future as well.

3. "Please in nOCR spell check window add a button for inspect nocr matches for current image"
For what? Click twice with the left mouse button on the selected line in the [Subtitle text] window and the required window will open.

4. Do not write several posts one after the other, use "Edit".


@ Nikse555
@ bl4ck wrote: "I last time I made many" sup "files for my blu-ray discs. Maybe possible is adding function to save font color for many colors?"

My comments to this:

1. If I export any text to the 'Blu-ray sup' file and in the 'Blu-ray sup' window I choose [Font color] = yellow (FFFF00) then the text cannot be recreated from the sup file using nOCR and Binary image compare because these methods cannot "see" the text unlike in Tesseract 3.02.

2. If I export to a Blu-ray sup file any text in which I have different color attributes selected for different lines, re-importing from this sup file does not allow to recreate the color attributes for lines with colored text. This also applies to color text images imported from a TS stream.
I wrote about it in one of my previous posts but got no reply.

Atlantis
31st October 2020, 02:11
3. "Please in nOCR spell check window add a button for inspect nocr matches for current image"
For what? Click twice with the left mouse button on the selected line in the [Subtitle text] window and the required window will open.
For that you have to abort to come back and do it. I want Start OCR to continue without quitting. It's for the same reason that Binary image compare already has this with a button named "Edit image db". Why does it have that?

Atlantis
31st October 2020, 02:14
Do not write several posts one after the other, use "Edit".

Thank you. I know how the forum works. I have been here for 18 years. How long have you been here? 6 months?! :D

Janusz
31st October 2020, 04:21
... I have been here for 18 years. How long have you been here? 6 months?! :D

Give it up.
Your argument is completely misguided.

loninapleton
5th November 2020, 01:40
Hello,

This is a new topic in this continuing thread. Is there any knowledge here on how to demux or in any way extract subtitles from a TS file? I have converted this TS once to MKV and tried to use MKV extract or Inviska but I see no way to extract.

Just a google search turned up a thread on Videoehelp here:

https://forum.videohelp.com/threads/375796-Demux-TS-files-and-change-subs

Can anyone give some insight on it?

My email notification is turned on.

Janusz
5th November 2020, 20:37
@loninapleton

Where is your ts file coming from? What format are the subtitles in the file in?
If they are bitmaps, for example: DVB-sub as in digital TV DVB-T - i.e. pictures - no conversion to mkv will help.
In that case you can use Subtitle Edit to import the subtitles directly from the ts file
and use the OCR methods available in the program to convert images into text.
You won't do it otherwise. If you don't want to do OCR, you can use one session of the program
to preview images with captions, and in the other to translate these captions.

Nikse555
7th November 2020, 08:30
@loninapleton: It may not be completely intuitive, but just use File -> Open subtitle... (or Ctrl+O) and choose your .ts file.

Opening a ts file should show this dialog, if the .ts file has more than one subtitle:
https://www.nikse.dk/se-ts-open.png


In the choose subtitle dialog, you can also right-click on the subtitle to export to some other format:
https://www.nikse.dk/se-ts.png

SE can (in latest) version also handle batch convert (Tools -> Batch convert...) of both teletext and images in transport streams.

von Suppé
15th November 2020, 11:48
Hi Nikse555,

I'm encountering an issue with exporting ASS --> SUP.
When the ASS style has its alignment set to "Bottom/right", the vertical offset is not honoured to the image of that line in the exported SUP.

"Bottom/left" and "Bottom/center" work fine. Can you confirm this needs a fix or am I doing something wrong here?

Cheers

Nikse555
15th November 2020, 20:58
Hi Nikse555,

I'm encountering an issue with exporting ASS --> SUP.
When the ASS style has its alignment set to "Bottom/right", the vertical offset is not honoured to the image of that line in the exported SUP.

"Bottom/left" and "Bottom/center" work fine. Can you confirm this needs a fix or am I doing something wrong here?

Cheers

I think this was fixed recently... does latest beta work for you?
https://github.com/SubtitleEdit/subtitleedit/releases/download/3.5.18/SubtitleEditBeta.zip

Nikse555
15th November 2020, 22:00
Also, SE 3.5.18 is out a few days ago: https://github.com/SubtitleEdit/subtitleedit/releases

A few entries from the change log:

Add "Center, left justify dialogs" to export images - thx Benjamin
Improve ASSA/SSA preview - thx Mounter81
Allow for .mpg/.mpeg transport stream file extension in "Batch convert"
Fix crash in export image with font tag - thx Jake
Fix batch convert of Blu-ray sup file to VobSub - thx John

von Suppé
16th November 2020, 13:22
I was using SE version 3.5.17.

A few tests show the issue persists in version 3.5.18 and the beta you linked.

I'll do more tests for Upper-left etc to be complete.

Edit: Okay, tested all Bottom and Top positions quickly with version 3.5.18.

I found that with "Top/right" positioned ASS, the right offset is not hounoured. Vertical offset is okay.

So, this one and the vertical offset issue for "Bottom/right" need a fix, IMHO.

I will go testing further for the "Centered" posotions.

Janusz
16th November 2020, 16:25
@Nikse555
It should be noted somewhere that the 3.5.18 version of the program is not compatible with the 3.5.18 NEXT beta version
because for the same settings in the program, different names for these settings are used in the system.ini configuration file.
3.5.18
<SubtitleFontSize>10</SubtitleFontSize>
<SubtitleFontBold>False</SubtitleFontBold>
3.5.18 NEXT beta
<SubtitleTextBoxFontSize>12</SubtitleTextBoxFontSize>
<SubtitleTextBoxFontBold>True</SubtitleTextBoxFontBold>
I don't know if this is intentional.
In any case, alternating between the stable and next beta versions will result in resetting these parameters to the default value each time.

Nikse555
16th November 2020, 17:49
@von Suppé: I just tested with all nine alignments (like {\an8}), and they all worked fine for me...

@Janusz: yes, it is intentional with the bigger bold font, the rename was made to ensure people got the new settings.

von Suppé
17th November 2020, 10:49
The alignments work, that's true. Bottom/right shows at bottom-right. But the vertical offset, or "Margin vertical", as it's called in the ASS style window, is not honoured when exporting to SUP.
Again, only with bottom/right the vertical offset issue exists.

17565

Nikse555
17th November 2020, 20:29
The alignments work, that's true. Bottom/right shows at bottom-right. But the vertical offset, or "Margin vertical", as it's called in the ASS style window, is not honoured when exporting to SUP.
Again, only with bottom/right the vertical offset issue exists.


Thx, should be fixed via this commit: https://github.com/SubtitleEdit/subtitleedit/commit/9bfa17dd554ccd427776850ff44cae7452e2d51c
(I had switched right margin and bottom margin for bottom-right... dough)

Beta updated: https://github.com/SubtitleEdit/subtitleedit/releases/download/3.5.18/SubtitleEditBeta.zip

von Suppé
18th November 2020, 07:57
Yep, looks good on the beta. I see you also took care of the right offset issue for Top/right. Great!

Thanks for the fix, Nikse :-)

arestarh
20th November 2020, 09:19
Hi,

Guys, could you please tell me whether we have possibility to adjust timecodes of blu-ray .sup without OCRing it ?
I've looked through "Batch converter", but didn't find the way how to do this.

darksen
26th November 2020, 08:27
Someone else is having problems selecting text? I'm using the latest beta and most of the times, like 8/10 when I try to select text from right to left (I mean from the end of the line to the left) only a part of the last word is selected and then it gets dragged to wherever I move the cursor, and sometimes, when this happens and then I click on an empty space of the text box I can't write anything, I have to click again to be able to edit.

See this video for what I'm talking about (the first part): https://gofile.io/d/cE4RTx

Also, is there a way to be able to select, just as before, parts of a word/sentence with precision instead of the whole word getting automatically selected? This is more annoying with italic tags, I want to only select the tag but SE automatically selects the whole tag plus one more char. See this video: https://gofile.io/d/AFIjx8

Thanks.

Janusz
26th November 2020, 19:24
@darksen
Disable the new [Use syntax coloring] option in Settings / Font / UI Font / Text box - that came out in beta.
By default, this option is enabled. When turned off, selecting works as before - no problems.
My version is 3.5.18 NEXT, beta 135.
If you don't want to disable this option, use SHIFT + left / right arrows for precise selection.

nekrovski
5th December 2020, 09:12
Can anyone help me with regular expression?
I would like to add an entry in multiple replace that will delete all contents from the line if the line has a specific word.
[edit] Sorry, stupid me asking the question when there's literally the same thing I asked answered in the help site...
https://www.nikse.dk/SubtitleEdit/Help

Nikse555
5th December 2020, 17:27
Can anyone help me with regular expression?
I would like to add an entry in multiple replace that will delete all contents from the line if the line has a specific word.
[edit] Sorry, stupid me asking the question when there's literally the same thing I asked answered in the help site...
https://www.nikse.dk/SubtitleEdit/Help

In latest beta "Tools - Batch convert" also has a "delete lines" element which hopefully is a little quicker to use:
https://www.nikse.dk/se-batch-convert-delete-lines.png

Nikse555
8th December 2020, 17:46
Hi Nikse555,

I wouldn't know if this is already been addressed to, but now that I think about it:

Is it possible to load a SUP and/or XML/PNG file into SE, not OCR-ing it, only for adjusting the timecodes? And after that, export back to SUP or XML/PNG, so without changing the original subtitle images and their X/Y coördinates. Of course, preferably with realtime monitoring in the preview with a chosen video.

I would be very happy if that's possible.
Cheers

I've added a little in latest beta: https://github.com/SubtitleEdit/subtitleedit/releases/download/3.5.18/SubtitleEditBeta.zip
Use File -> Import -> Blu-ray (.sup) subtitle file for edit...
(no video preview atm + fade or similar effects will be lost)

von Suppé
8th December 2020, 20:22
Cool, I'm gonna check it out it. Thanks Nikse :) :thanks:


Edit: Is there something wrong with the beta download? After unzipping I get error screen running SubtitleEdit.exe

Nikse555
8th December 2020, 23:07
Hm, yes. Hopefully this beta will actually start: https://github.com/SubtitleEdit/subtitleedit/releases/download/3.5.18/SubtitleEditBeta.zip

von Suppé
9th December 2020, 09:57
Yes, this one fires up. I go play with it. Thanks

[EDIT] A few "quick and dirty" tests make me already feel delighted. I find this great stuff.

With this new tool I can already achieve quite some things I ever wanted in a very easy way.
The possibility to import and be able to replace the image for a line is a fantastic thought. Skookum!

For now, I take my hat off for you and go further testing things out.

Thanks, Nikse

Nikse555
10th December 2020, 18:16
Improved the "File -> Import -> Blu-ray sup for edit" a bit more with video loading/playing, prompt for lose changes when closing window, a few shortcuts (incl. Ctrl+g for go-to-line), and "Set text..." for easy replacement of text.

The subtitle on the right can be moved with mouse, and right-click on sub image for "center" or "undo".

To append another bdsup file, go to last line in the list view, right click, and "insert subtitle after this line".

Beta link: https://github.com/SubtitleEdit/subtitleedit/releases/download/3.5.18/SubtitleEditBeta.zip

https://www.nikse.dk/se_bdedit.png

von Suppé
11th December 2020, 10:29
Oooooooohhhhhhh yeah! Keep the presents coming!! Christmas is early this year :D

Can't thank you enough, Nikse. Will go check things out :thanks:

[EDIT] First tests show promising.

Though, the preview of the SUPs are in the wrong position when opening video. They start at the bottom. I tested this quickly with both videoplayer set to mpv and directshow, btw.

Also, when dragging the whole edit-window to other dimensions, the SUPs do not move along accordingly in the video window. Also, the dimensions of the SUP images themselves are not scaled properly. See the attached pictures for more clarification.17597
17598

Will do more testing. Thanks again for your work on this, Nikse

Ah, I see my pictures are awaiting approval...

Janusz
11th December 2020, 13:00
@ Niksee555
The problem concerns the new functionality: Blu-ray (.sup) subtitle file for edit ...

If we use Export to Blu-ray sup to generate the sup file ...
available in the Blu-ray Import / OCR window with the Use color (spl ...) option selected
is importing such a sup file via File / Import / Blu-ray (.sup) subtitle file for edit ...
causes the subtitles (images) to be scaled and occupy the entire preview window.
The Position and Video size parameters display strange values.
Additionally - if the subtitles are colored, some subtitles are displayed, others are not.
I do not know what it depends on.

Without selecting this option when creating a sup file, the subtitles (images)
will be displayed correctly with the proportions as in the image from your post above.
Also colored inscriptions. (Beta 221)

A very nice tool. Thanks. :thanks:

LowDead
11th December 2020, 17:23
Wow, this was a nice surprise. SE keeps getting better and better :D Thanks for your fantastic work!!

//LD

Nikse555
11th December 2020, 22:11
"File -> Import -> Blu-ray sup for edit" updated again: https://github.com/SubtitleEdit/subtitleedit/releases/download/3.5.18/SubtitleEditBeta.zip

Improved the drawing of subtitles so they look nicer (will still be in a black box).
Improved the scaling when video player is active (will still use scaling of current video window)
Added context menu "Quick OCR" for list view for overview (and for fun... should be fast on CPUs with many cores - will run in background).

Janusz: Not really sure how to re-create the issue you found... could you explain a bit more?

Glad you like it :)

Janusz
12th December 2020, 00:50
@Niksee555

I have a .ts file with dvbsub subtitles recorded from tv.
I transfer this .ts file to the main program window. The Import / OCR VobSub window opens.
Above the subtitles preview window in the "Transport stream" section I have 2 options: [Greyscale] and [Use color].
I check [Use color]. I have to do it now because later I will not have access to the saved file for both of these options,
and [Use color] is necessary for me for some tv channels to correctly set the dialog lines without color.
When using Export / Blu-ray sup ... I save the sup file for later use.
The sup file generated in this way, loaded via File / Import / Blu-ray (.sup) subtitle file for edit ...
it causes what I wrote above, i.e. scaling of subtitles (images) and taking up the entire preview window.

https://drive.google.com/uc?export=view&id=1jGAlTIbmpBG7Mtc7HN9kafdVuvah8N9T

Files to download (https://drive.google.com/uc?export=view&id=1bEkYw7nwtKmexappJZpi1JPagsqdKJBc)

Note that some colored text is not displayed.
I also know that the lines 6 i 7 have split, but that's ok.

The quality of the displayed subtitles is much better, two new functions - great.

Edit 1 (12.12.2020)
I think I already know what is the cause of the described problem.
Well, turning on the [Use color] option in the Import / Ocr VobSub window causes when trying to export to "Blu-ray sup" it changes
the default value of the parameter [Video res] = 720x576 to [Video res] = 122x37 (this is the resolution of the first picture of subtitles).
If I restore the correct resolution before saving (I will not forget to do it) it will all be ok.
Earlier, I did not pay attention to it because it did not interfere with the OCR process from the sup file created in this way.
There was also a problem with the lack of display of some lines. Their images are just wider than [Video res] and they don't fit.
I think so.
Looking at the example above, a new option in Tools / Merge lines with same time codes ... would be nice - Merge lines as dialog.
I think it would not be difficult to do it because such functionality already exists in the program, but only for selected lines, not globally for the whole text based on "time codes".
Although after the OCR process when you close the window, this merging is performed without setting up any dialogs.