VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 42
Thread
  1. The results of VoodooFX' script to capture (and later OCR) hardcoded subtitles are very impressive.

    But to be honest I need someone to tell me exactly which buttons to push - or which manual to read.

    Initial questions: Do I need Avisynth+ or Avisynth 2.6? Do I need AvsPmod?

    Using the latter, I get as far as this: (attached screenshot)


    I never worked with the whole thing before. Could someone spell out to me what exactly to do, to make this script run its hardsub finding functions please? (Or direct me to an existing manual that applies to this question.)
    Image Attached Thumbnails Click image for larger version

Name:	ipdl.png
Views:	121
Size:	103.4 KB
ID:	62568  

    This is nøt å signåture.™
    Quote Quote  
  2. AviSynth+ is stable enough now that it's the version of choice. If you don't need an old filter that's only available in a 32 bit version (you probably don't) you should use the 64 bit version of AviSynth+.

    Keep in mind that when using a 64 bit editor/encoder you need to use 64 bit AviSynth and 64 bit AviSynth filters. When using a 32 bit editor/encoder you need to use 32 bit AviSynth filters. Both work on 64 bit Windows, and they both can be installed at the same time. But the two environments are completely separate and unaware of each other.

    You don't have to use avspmod -- any plain text editor will work (I use Notepad and the AVS editor built into VirtualDub2). But avspmod is good for beginners as it provides hints and has a built in preview function. If you choose not to use avspmod you can use VirtualDub2 to preview your scripts and/or to encode them.
    Quote Quote  
  3. Thanks for asking. I really do want to get this working because I've got a number of hardsubbed files that would be good to rip to srt.
    I already had avisynth+, as per screenshot.

    But I get the feeling that I'm missing a clue here that both of you take for completely obvious.

    So avs and avsi files are the scripts. But if I open a video, it simply says "DirectShowSource("C:\(...,...)\Anima Nera (1962) ENG SUBS^.mp4")" (As an example. Watching the video is not supported by the way.)

    In another tab, the inpaintdelogo script is open and I do see the functions there to detect and extract burned-in subttiles.

    But between script, functions, avisynth, and a video... what does what to what?
    (Vdub2 does not seem to support opening avs(i) scripts?)
    This is nøt å signåture.™
    Quote Quote  
  4. DirectShowSource() requires that you have Windows installed directshow filters for opening and splitting mp4 files, and system decoders for the audio and video codecs. Basically, it should be used only as a last resort. It's best if you install an AviSynth source fliter like LSMASH and use that to open mp4 files:

    http://avisynth.nl/index.php/LSMASHSource

    Extract the 64 bit version of LSHASHSource.dll (in the x64 folder of the archive) and put it in AviSynth+ plugins64+ folder.

    Then a simple script to open your mp4 file will look like:

    Code:
    LSmashVideoSource("c:\path\to\filename.mp4)
    That is enough for you to preview the video (no audio) in avspmod by pressing F5.

    To use InpaintDelogo you will want to put InpaintDelogo.avsi in AviSynth+'s plugins64+ folder. (AVSI files in the plugins folder are automatically available to your AviSynth scripts, there's no need to explicitly import them in the script.) Note that InpaintDelogo requires several other AviSynth filters as described in the docs. You will have to download all of those and put the dll files in AviSynth's plugins64+ folder.

    Finally you're able to use the function:

    Code:
    LSmashVideoSource("filename.mp4)
    InpaintDelogo(settings go here)
    InpaintDelogo is not a good beginners project.
    Quote Quote  
  5. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Don't use DirectShowSource(), it's dated stuff.
    I recommend to use another source filter from LSMASH:
    Code:
    LWLibavVideoSource ("c:\path\to\filename.mp4)

    Originally Posted by jagabo View Post
    InpaintDelogo is not a good beginners project.
    But there is no similar Avisynth alternatives for "beginners".
    Quote Quote  
  6. Do I need playback to work, by the way? I'm trying to focus on just ripping a lot of hardsubs that I have.

    Taking it step by step: Are these the requirements that you (jagabo) meant for the AviSynth+ plugins64+ folder?
    This is nøt å signåture.™
    Quote Quote  
  7. Yes. Some of them may be optional -- depending on the settings used. The basic filter is working on my computer but I don't have the last four in that list.
    Quote Quote  
  8. Originally Posted by jagabo View Post
    Yes. Some of them may be optional -- depending on the settings used. The basic filter is working on my computer but I don't have the last four in that list.
    OK so the folder C:\Program Files (x86)\AviSynth+\plugins64+ now looks like the attached screenshot.

    It pains me to admit it, but I'm sorry to say that I have no clue what these specific components are for. But never mind, perhaps I'll pick up some idea along the way.


    If either of you could first lower your expectations, and then tell me what the next step is, please?


    Essentially I just want to rip hardsubs. VoodooFX ripped two for me but I couldn't keep asking other people, at some point I'd overstay my welcome so to speak.
    Image Attached Images  
    This is nøt å signåture.™
    Quote Quote  
  9. Don't put the entire folder in the plugins64+ file, just the dll or avsi. AviSynth look only in that folder, not sub-folders therein. So, for example, the x64 version of grunt.dll should be right right after GrainFactory3.avsi.
    Quote Quote  
  10. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by Spiny Norman View Post
    Do I need playback to work, by the way?
    If you can't open video then you can't do anything with that video, no?
    You still didn't installed LSMASH plugin.

    I see you are downloading "code" from GitHub, it's OK for script based plugins [as 'avsi'], but for 'dll' plugins you need to download the compiled releases.
    In GitHub at the right side you can find "Releases".

    Originally Posted by Spiny Norman View Post
    If either of you could first lower your expectations, and then tell me what the next step is, please?
    We are telling you step by step what to do. Just ask if something you don't get.
    We don't know what "next" you don't understand till you didn't asked for it.
    Quote Quote  
  11. Image
    [Attachment 62814 - Click to enlarge]

    OK so that's the AviSynth+\plugins64+ folder. Does this look better?

    Here's what I don't get. When you say "a simple script will look like" - do I open one of the avisynth versions and then make/open a script? Or do I save the script from textpad with some kind of file extension, and then open it?

    Starting for example with playback (you (VoodooFX) said, that if I can't play a video, then I won't be able to extract hardsusb either).
    This is nøt å signåture.™
    Quote Quote  
  12. Originally Posted by Spiny Norman View Post
    Image
    [Attachment 62814 - Click to enlarge]

    OK so that's the AviSynth+\plugins64+ folder. Does this look better?
    Yes.

    Originally Posted by Spiny Norman View Post
    Here's what I don't get. When you say "a simple script will look like" - do I open one of the avisynth versions and then make/open a script? Or do I save the script from textpad with some kind of file extension, and then open it?
    The latter. Start Notepad, type in the text, save it with the extension .AVS instead of .TXT. Then open that .AVS file with a video editor like VirtualDub2 (File -> Open Video file...). You will see the result of the script in VirtualDub2's input pane. Or you can start avspmod and create the script right within the program. Then press F5 to preview the result.

    Here's a very simple script:

    Code:
    Version()
    That doesn't require any third party filters. A fresh install of any version of AviSynth will be able to run it. When you view the script you will see something like:

    Image
    [Attachment 62826 - Click to enlarge]


    Image
    [Attachment 62827 - Click to enlarge]
    Last edited by jagabo; 8th Jan 2022 at 19:31.
    Quote Quote  
  13. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by Spiny Norman View Post
    Here's what I don't get. When you say "a simple script will look like" - do I open one of the avisynth versions and then make/open a script? Or do I save the script from textpad with some kind of file extension, and then open it?

    Starting for example with playback (you (VoodooFX) said, that if I can't play a video, then I won't be able to extract hardsusb either).
    Avisynth is just a frame server, it doesn't have GUI or some preview, you don't need to "open one of the avisynth versions", whatever that means.
    You need to use other programs like AvsPMod to preview or encode your avs scripts.

    You just open AvsPMod and write there your script, or you can write it in any text editor and then paste your script to AvsPMod, or save that text with .avs extension and open it with AvsPMod or another program which can work with Avisynth scripts.

    Those plugins you have installed contains various functions/filters, and those functions you can invoke in the avs scripts, for example - SomeFancyEffect(), between brackets you can write parameters to that function.

    LSMASH contains filters to open video/audio files [source filters], read readme/help file [if it comes with it] to know filter names and parameters, or you can check avisynth.nl website: http://avisynth.nl/index.php/LSMASHSource
    Avisynth has bunch of internal filters: http://avisynth.nl/index.php/Internal_filters

    Try to open your video and use some simple filter like Crop [ http://avisynth.nl/index.php/Crop ]
    Code:
    LWLibavVideoSource("D:\yourvideo.mkv")
    Crop(200,200,-200,-200)
    EDIT:
    Script based plugins [with avsi/avs file extension] contains help/readme at the top inside [usually], as those plugins are just text files then you open them to read with any text editor, good ones are PSPad or Notepad++.
    Quote Quote  
  14. Originally Posted by VoodooFX View Post
    Originally Posted by Spiny Norman View Post
    Here's what I don't get. When you say "a simple script will look like" - do I open one of the avisynth versions and then make/open a script? Or do I save the script from textpad with some kind of file extension, and then open it?
    Avisynth is just a frame server, it doesn't have GUI or some preview, you don't need to "open one of the avisynth versions", whatever that means.
    Ah, well, I took AVPSmod for a GUI version of it. But maybe I'm trying to stir the pan with the soup here, I don't know. Will see how far I get.


    I suppose the alternative is to keep asking one of you to help, whenever I spot exclusive hardcoded subtitles. (To be sure, I mostly want to do others a favour by rescuing those cases.)
    This is nøt å signåture.™
    Quote Quote  
  15. avspmod is a text editor with some features (function templates, video preview) that make creating and editing avisynth scripts easier.
    Quote Quote  
  16. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by Spiny Norman View Post
    Ah, well, I took AVPSmod for a GUI version of it. But maybe I'm trying to stir the pan with the soup here, I don't know. Will see how far I get.
    Did you managed to preview your video with Avisynth script? That's the few hours task for a avs beginner, and it's 3 weeks passed after your first post...
    Quote Quote  
  17. Originally Posted by VoodooFX View Post
    Originally Posted by Spiny Norman View Post
    Ah, well, I took AVPSmod for a GUI version of it. But maybe I'm trying to stir the pan with the soup here, I don't know. Will see how far I get.
    Did you managed to preview your video with Avisynth script? That's the few hours task for a avs beginner, and it's 3 weeks passed after your first post...
    If that's required I will do that first. But the holidays are over, I have less time than I want.

    I still have at least half, or maybe a dozen of movies with "unique" subtitles. But not dozens. Option 2 is I wetransfer them, and one of you sends me back the images. Then I turn them into srts for other people to use. Any chance I can convince either of you in that direction...? It worked well for that extremely long German play, someone made English fansubs for it now.
    This is nøt å signåture.™
    Quote Quote  
  18. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    You have hours [days] to spend on those subtitles, but you can't [don't want] to spend few minutes [hours] for AviSynth?
    It's not a rocket science, learn it and you'll be helping other newbies in no time.
    Quote Quote  
  19. Did you even try what I suggested in post #14?

    You can also just start avspod, type in the version() command and press F5 to preview. Do you get the version information?

    Image
    [Attachment 62954 - Click to enlarge]
    Quote Quote  
  20. Ah, but I don't have hours, that's the problem.

    So anyway: The version thing (#21) is working...
    And this script works (no sound): LSmashVideoSource("c:\ws.mp4")

    The cropping example does not, that leads to the attached error.


    So let me see if I've got this right? The order of things, for my particular question, would be:
    - I create/edit a text file with notepad++, saved with .avs extension.
    - Each time specifies one specific file with hardcoded subtitles (and perhaps specifying an area of the picture, I imagine).
    - Opening/running that file with vdub2 or avspmod would start creating images (later to be OCR'd).

    It looks like what I need now, is to know what to put in an average script. Does it contain these elements but with more values added?
    SubsMask2Img( ImgDir="", CorrTh=0.8, SubTune=235, SubMinDur=12, SubSuspect=0, ImgType="png", ImgInflate=0, ImgInvert=0, ImgSize=1 )
    Image Attached Images  
    This is nøt å signåture.™
    Quote Quote  
  21. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by Spiny Norman View Post
    The cropping example does not, that leads to the attached error.
    LWLibAvVideoSource filter creates an index file, so maybe you open file from non-writable location like CD, or there is some administrative restrictions, try to run AvsPmod as administrator.

    Originally Posted by Spiny Norman View Post
    So let me see if I've got this right? The order of things, for my particular question, would be:
    - I create/edit a text file with notepad++, saved with .avs extension.
    - Each time specifies one specific file with hardcoded subtitles (and perhaps specifying an area of the picture, I imagine).
    - Opening/running that file with vdub2 or avspmod would start creating images (later to be OCR'd).
    1) You can do that. I type directly in AvsPmod.
    2) Yes, usually one script for one job/video. But you can joint many videos in one script if you need.
    3) Depends what is in your script. SubsMask2Img() filter would do that.

    Originally Posted by Spiny Norman View Post
    It looks like what I need now, is to know what to put in an average script. Does it contain these elements but with more values added?
    SubsMask2Img( ImgDir="", CorrTh=0.8, SubTune=235, SubMinDur=12, SubSuspect=0, ImgType="png", ImgInflate=0, ImgInvert=0, ImgSize=1 )
    It's SubsMask2Img example with defaults, if you are not adjusting anything then just - SubsMask2Img(ImgDir="D:\MyImages") is enough.

    SubsMask2Img() extracts images from a black/white mask video. So you need to get mask video first.
    If you don't know how get masks from subs then InpaintDelogo has few methods for you (read about "DynMask" parameter).

    DynMask=2 example:
    InpaintDelogo(Loc="440,900,-440,-20", Show=4, DynMask=2, DynTune=210)

    DynMask=4 example:
    InpaintDelogo(Loc="440,900,-440,-20", Show=4, DynMask=4, DynTune=210, DynMask4H=80)

    PS
    You need to read about "DynMask" parameter and it's subparameters.
    Don't try to learn on SD videos. Currently, the script on SD doesn't work as expected, so you wouldn't understand what is going on if something goes wrong there.
    Quote Quote  
  22. Member
    Join Date
    Dec 2021
    Location
    France
    Search PM
    Hi,

    I would like to say thank you for this script, VoodooFX!

    However, I have some issues with it.
    As you can see, a lot of letters are missing:



    How can I improve it, please?
    Quote Quote  
  23. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by Guilbert View Post
    However, I have some issues with it.
    As you can see, a lot of letters are missing:



    How can I improve it, please?
    I need a sample clip (2-10mins) and your script to tell how to improve it.
    Quote Quote  
  24. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by Guilbert
    Hello,
    Here is the video:

    And here is the script I use:
    Code:
    LWLibavVideoSource("")
    InpaintDelogo(Loc="100,400,-100,-60", Show=4, DynMask=4, DynTune=160, DynMask4H=70)
    SubsMask2Img(ImgDir="")
    I have many characters missing with it. :/
    Thank you very much for your help!
    Currently SubsMask2Img() doesn't support jumping location subs, so I limited Loc to the bottom location.
    DynTune is way too low, you want to set it high till subs are readable.
    DynMask4H is too low, halo around subs is thin and damaged with this low quality encode, so it needs to be increased, but increasing it can increase artifacts.
    You can add DynMaskUp=2 to get higher quality mask/images [add it after you are done setting up other parameters].

    Try (this is just my quick look, not the definitive best settings):
    Code:
    InpaintDelogo(Loc="200,540,-200,-60", Show=4, DynMask=4, DynTune=210, DynMask4H=110, DynMaskUp=2)
    Then there is DynMask=3 method which doesn't rely on halos, but I need to rework it to make it less confusing to use for newbies (it wasn't meant for subs initially).

    Btw, if you run SubsMask2Img() in same go with InpaintDelogo() then image extraction is ~twice slower, because first it scans video for subs, then extracts images, so it runs all filters above it - ~twice.
    Quote Quote  
  25. Member
    Join Date
    Dec 2021
    Location
    France
    Search PM
    It's definitely better, indeed, thank you!
    I'll watch for new versions that will support SD videos and jumping location subs. ^^

    Great work!
    Quote Quote  
  26. Originally Posted by Spiny Norman View Post
    Ah, but I don't have hours, that's the problem.

    So anyway: The version thing (#21) is working...
    And this script works (no sound): LSmashVideoSource("c:\ws.mp4")

    The cropping example does not, that leads to the attached error.


    So let me see if I've got this right? The order of things, for my particular question, would be:
    - I create/edit a text file with notepad++, saved with .avs extension.
    - Each time specifies one specific file with hardcoded subtitles (and perhaps specifying an area of the picture, I imagine).
    - Opening/running that file with vdub2 or avspmod would start creating images (later to be OCR'd).

    It looks like what I need now, is to know what to put in an average script. Does it contain these elements but with more values added?
    SubsMask2Img( ImgDir="", CorrTh=0.8, SubTune=235, SubMinDur=12, SubSuspect=0, ImgType="png", ImgInflate=0, ImgInvert=0, ImgSize=1 )
    Yikes, did you ever get it working? Seems like a very complicated tool. Did you try Subrip or something less complicated?
    I haven't had any real issues with VideoSubFinder, it seems to be better than this. And less time comsuming. Do you have a good GPU? Maybe that's the reason VideoSubFinder didn't work? Or maybe you download the wrong software? I only started using VideoSubFinder for a few days so I'm not to knowledgeable but you can ask me if you want.

    Good luck.
    Quote Quote  
  27. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by notgood View Post
    Yikes, did you ever get it working? Seems like a very complicated tool. Did you try Subrip or something less complicated?
    I haven't had any real issues with VideoSubFinder, it seems to be better than this. And less time comsuming. Do you have a good GPU? Maybe that's the reason VideoSubFinder didn't work? Or maybe you download the wrong software? I only started using VideoSubFinder for a few days so I'm not to knowledgeable but you can ask me if you want.
    VideoSubFinder works, but it didn't produce good results.
    Subrip is not fit for this task at all.
    Quote Quote  
  28. Originally Posted by VoodooFX View Post
    Originally Posted by notgood View Post
    Yikes, did you ever get it working? Seems like a very complicated tool. Did you try Subrip or something less complicated?
    I haven't had any real issues with VideoSubFinder, it seems to be better than this. And less time comsuming. Do you have a good GPU? Maybe that's the reason VideoSubFinder didn't work? Or maybe you download the wrong software? I only started using VideoSubFinder for a few days so I'm not to knowledgeable but you can ask me if you want.
    VideoSubFinder works, but it didn't produce good results.
    Subrip is not fit for this task at all.
    I did actually used Subrip before and it did work but it was just a slower. VideoSubFinder is still the one to beat imo.
    Whoever authored it should really get it another go. They should create a user guide for it and work to improve the settings but it's quite good for a majority who don't know lines command and codes.

    Someone even made a script for it using python and again just more extra steps.

    But with VideoSubFinder(along with a OCR online that's free) and before Subrip I've been able to rip some hardcodes quicker as a part-time subber. It's just a smoother transition and faster without all the extra steps, no offense to yours, but it's more complicated. Still it's cool you made something as an option however for others who might have issues.

    Maybe one day, I'll try yours too see how easy going it might be for me lol
    Last edited by notgood; 7th Feb 2022 at 20:28.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!