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. |
|
|
Thread Tools | Search this Thread | Display Modes |
13th August 2022, 03:36 | #422 | Link |
Banana User
Join Date: Sep 2008
Posts: 990
|
Sorry, I don't understand what you write.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 13th August 2022 at 03:38. |
15th August 2022, 20:56 | #424 | Link |
Registered User
Join Date: Mar 2014
Location: Hungary
Posts: 115
|
If anyone is interested I created a small script that can extract forced cues from a full subtitle based on the folder that SubsMask2Img created:
https://github.com/pcroland/substoforced Code:
❯ ./stf.py -h substoforced 1.0.0 USAGE: stf.py [-h] [-v] [-s SUB] [-f FOLDER] FLAGS: -h, --help show this help message. -v, --version show version. -s, --sub SUB specifies srt input -f, --folder FOLDER specifies a folder where SubsMask2Img generated timecodes (optional) you should remove the junk from there manually |
16th August 2022, 17:57 | #425 | Link | |
Banana User
Join Date: Sep 2008
Posts: 990
|
Quote:
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
|
16th August 2022, 18:04 | #426 | Link |
Registered User
Join Date: Mar 2014
Location: Hungary
Posts: 115
|
It keeps the cues from the full subtitle that overlaps with any of the timecodes generated by SubsMask2Img. Lets say you have an English movie with French parts that are hardsubbed and you have a dub in another language where French parts aren't translated and you only have a full subtitle for it. You can generate the forced automatically for it.
Another use case would be to have a video with hardsubs that are also present in the full subtitle. You could create a subtitle based on your full subtitle without OCRing image (so it has less errors). |
16th August 2022, 18:16 | #427 | Link |
Banana User
Join Date: Sep 2008
Posts: 990
|
Now it's clear. I was thinking what you are extracting there when you have srt already.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
19th August 2022, 23:26 | #428 | Link | ||
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,546
|
First off, many thanks to you, VoodooFX for building and maintaining that huge and useful script.
A suggestion: While having to handle plain white text logo with black borders (subtitle style) I came across the need to give expand=3. expand=2 would still leave inpainting artifacts, which postprocessing could mend only a bit. Going into script version 2.17 line 1178 it was well possible to change the assert line to acommodate expand up to 5 without breaking the underlying function balloonPX. Quote:
Quote:
__________________
"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..." |
||
20th August 2022, 03:00 | #429 | Link |
Banana User
Join Date: Sep 2008
Posts: 990
|
@Emulgator
Thing is that I never saw a practical case where I would need it more than 2... You would need to share your logo case so I can see it with my own dead eyes to change my mind on that option. Btw, you are not the first one asking this, and all of them were doing something wrong and wanted to "expand" stuff more to cover mistakes.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 20th August 2022 at 03:05. |
20th August 2022, 22:15 | #430 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,546
|
It was a subtitle style logo. White body, plus black borders, plus a bit halo.
Photosobbing -> Curves -> Isolating the white body left my mask without the black borders, let alone the faint halo, so too thin To get that inpainted properly it would either take photosobbing again to pad up the lost borders and halo, or take the borders into account first. Well, more work...or simply hand that padding job over to Inpaint Delogo, which did work nicely. I guess the old fat bordered Sony Handycam style time code rendering would benefit from that too, still got to capture a case to publish. Badly needed for stabilising such footage, because stabilising alone leaves you with shaky timecode, so timecode got to be removed first before stabilising.
__________________
"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..." Last edited by Emulgator; 20th August 2022 at 22:37. |
21st August 2022, 17:56 | #431 | Link | |
Banana User
Join Date: Sep 2008
Posts: 990
|
Quote:
Or just use Automask. Inflate is only for static logos, for a dynamic mask there is DynInflate, it's limited to "4".
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 21st August 2022 at 20:19. |
|
21st August 2022, 21:19 | #432 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,546
|
Good, I will try that.
Automask got it wrong, no pure logo on black to be had, so I would have liked to tune thresholds and such, but at the moment I am only a Delogo beginner...
__________________
"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..." Last edited by Emulgator; 21st August 2022 at 21:23. |
21st August 2022, 22:01 | #433 | Link |
Banana User
Join Date: Sep 2008
Posts: 990
|
Did you tried to use aMix option with Automask? Are you sure logo is not transparent?
Without video I can't tell you much, share it by PM if you want.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 9th September 2022 at 11:41. |
8th September 2022, 09:34 | #434 | Link |
Registered User
Join Date: Apr 2022
Posts: 11
|
Hi, @VoodooFX.
Can you please take a look to the video I send you? I can't get a good result with InpaintDelogo to OCR these hardcoded subtitles. I tried with these parameters, with no luck: Code:
InpaintDelogo(Loc="280,560,-280,-40", Show=4, DynMask=4, DynTune=210, DynMask4H=60, DynMaskUp=2) |
8th September 2022, 13:21 | #435 | Link | |
Banana User
Join Date: Sep 2008
Posts: 990
|
Quote:
DynTune aka text brightness - set high as possible [till text doesn't disappear]. DynMask4H aka halo brightness - set low as possible [till letters doesn't disappear]. KillBlobs - set low [ignore "-"] as possible [till letters doesn't disappear, good indicator are capital "M" and "W" letters]. Code:
v=LWLibAvVideoSource("D:\video.1080p.mkv") x=v.crop(360,820,-360,-80) o1=v.InpaintDelogo(Loc="360,820,-360,-80", Show=4, DynMask=4, DynTune=210, DynMask4H=60) o2=v.InpaintDelogo(Loc="360,820,-360,-80", Show=4, DynMask=6, DynTune=240) o3=v.InpaintDelogo(Loc="360,820,-360,-80", Show=4, DynMask=4, DynTune=240, DynMask4H=140) o4=v.InpaintDelogo(Loc="360,820,-360,-80", Show=4, DynMask=4, DynTune=240, DynMask4H=140, KillBlobs=-4, KillNoise=-5) Stackvertical( \ x, \ o1.ConvertToYV12().AddBorders(0,2,0,0,$F0F080).Subtitle("1: your settings"), \ o2.ConvertToYV12().AddBorders(0,2,0,0,$F0F080).Subtitle("2: only DynTune"), \ o3.ConvertToYV12().AddBorders(0,2,0,0,$F0F080).Subtitle("3: DynMask=4"), \ o4.ConvertToYV12().AddBorders(0,2,0,0,$F0F080).Subtitle("4: DynMask=4 + KillBlobs & KillNoise")) Here is the extracted result ["00_08_09_640__00_08_12_360.png"]: Code:
InpaintDelogo(Loc="360,820,-360,-80", Show=4, DynMask=4, DynTune=240, DynMask4H=140, KillBlobs=-4, KillNoise=-5, DynMaskUp=2, Extract=1, ImgDir="D:\Images", ImgInflate=1) ImgInflate=1 because DynTune=240 is a bit too high for some sub lines [there are some small "holes" in text], so ImgInflate=1 fills them in.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 8th September 2022 at 13:38. |
|
8th September 2022, 14:42 | #436 | Link |
Registered User
Join Date: Apr 2022
Posts: 11
|
No, I didn't read the manual yet, but I will, thank you for the advice.
Thank you as well for the explanations and those parameters, it looks amazing! Do you know if Google Cloud Vision is able to detect italics, by any chance, please? (The API was added recently in Subtitle Edit. ) |
8th September 2022, 14:57 | #437 | Link | |
Banana User
Join Date: Sep 2008
Posts: 990
|
Quote:
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
|
9th September 2022, 03:01 | #438 | Link |
Registered User
Join Date: Dec 2015
Posts: 309
|
I have tested the subtitle extraction function with your settings from post 435 like this:
Code:
LoadPlugin("C:\MeGUI-x64\tools\ffms\ffms2.dll") FFVideoSource("D:\Test\Test.mp4", threads=1) InpaintDelogo(Loc="164, 362, -150, -38", Show=4, DynMask=4, DynTune=240, DynMask4H=140, KillBlobs=-4, KillNoise=-5, DynMaskUp=2, Extract=1, ImgDir="D:\Test", ImgInflate=1) What can i have done wrong? |
9th September 2022, 12:03 | #439 | Link | |
Banana User
Join Date: Sep 2008
Posts: 990
|
Quote:
Cut [no re-encode] and post a short few mins sample of video if you want advice [or a whole video by PM].
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
|
9th September 2022, 17:33 | #440 | Link |
Registered User
Join Date: Dec 2015
Posts: 309
|
Here is small sample: https://www.file.io/9gdT/download/Xm0V7j2kmDMc
|
Tags |
delogo, hardsubs, ocr, remove, watermark |
|
|