otsaloma / gaupol

Editor for text-based subtitle files
https://otsaloma.io/gaupol/
GNU General Public License v3.0
251 stars 34 forks source link

Remove empty subtitles with correct text ? #230

Open Eeel-12 opened 2 months ago

Eeel-12 commented 2 months ago

Hello,

Not shure to quite understand, in the last step (confirm) of Correct text, there is a tick box "Remove all empty subtitles". Is it intended to delete empty subtitles? Like:


00:00:27,050 --> 00:00:28,250
This is a time of chaos

2
00:00:28,250 --> 00:00:30,640

3
00:00:30,850 --> 00:00:32,450
economy Crysis
otsaloma commented 2 months ago

Only ones that are empty after corrections. It's primarily intended to be useful with hearing impaired notation removals, which will often result in a huge amount empty subtitles that could then be cleaned up.

Otherwise, if the file has empty subtitles, they could have some significance, such a particular spoken language that the subtitle author couldn't transcribe or translate. As empty subtitles don't affect playback, I'd usually leave them in in these cases.

Eeel-12 commented 2 months ago

Otsaloma thank you for the feedback, agree that it's not really a probleme, the idea behind was just to avoir any warning reported by mkvmerge or latter by dashjs. Would be nice if you can consider have an option for it in correct text, actually i'm getting ride of it using a regex replace with KDE Kate.

The regex i use in case anyone is interested.

([\r\n|\n|\r]\d+[\r\n|\n|\r]\d{2}:\d{2}:\d{2},\d{3}\s-->\s\d{2}:\d{2}:\d{2},\d{3}[\r\n|\n|\r]{2})

edit note: just to mention, i get a lot of empty subtitles after OCR SDH subtitles french that are colored and splited left right on the screen, in french they often put some subtitles that only have ellipsis, and thoses generate empty subtitles after recognition.