VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Hi, I'd like to remove this logo.

    https://www.dropbox.com/s/1kypjoib4khn8yn/delogo.png?dl=0

    This is the sample: https://www.dropbox.com/s/6voklfwqi942s1u/I%20viaggiatori%20della%20sera_20220422_0405...sample.ts?dl=0

    I've some written notes on about to use a certain procedure,, this one:

    InpaintDelogo

    - first it is needed to draw a mask to match the logo borders, using this command:
    InpaintLoc(Loc="622,472,-62,-36")

    - Include 10(no less) - 16 pixel borders around the logo.
    InpaintLoc(Loc="606,456,-46,-20")

    - then create the mask with this command:
    InpaintDelogo(mask="D:\mask.bmp", Automask=1, aMix=0, Loc="606,456,-46,-20", Mode="Deblend", Analyze=2)

    - add final command to the script
    InpaintDelogo(mask="D:\mask.bmp", Automask=0, aMix=0, Loc="606,456,-46,-20", Mode="Deblend")


    Script:
    Code:
    LoadPlugin("C:\Users\antip\Desktop\util\MeGUI-2913-64\tools\ffms\ffms2.dll")
    FFVideoSource("C:\Users\\TS\ cutted.ts", fpsnum=25, fpsden=1, threads=1)
    
    #PAL  16:9  720 x 576 16:11 ITU ON
    
    crop(0,2,-0,-0)
    bbmod(2,0,2,2,128,8)
    Trim(80313,84058)
    
    #InpaintLoc(Loc="606,456,-46,-20")
    #InpaintDelogo(mask="C:\Users\\mask\mask.bmp", Automask=1, aMix=0, Loc="606,456,-46,-20", Mode="Deblend", Analyze=2)
    InpaintDelogo(mask="C:\Users\\mask\mask.bmp", Automask=0, aMix=0, Loc="606,456,-46,-20", Mode="Deblend")
    
    Prefetch(7)



    I've tried this procedure one time only and I remember although it was effective on still frames, some logo shadows, remnants were still visible,
    especially on dark scenes when I played the file, so the final result wasn't so good.

    masks: https://www.dropbox.com/sh/ot6tqqaej66kkp5/AAAHZyofePJuVVKay1_Frdx1a?dl=0


    What I would like to ask is:
    is this procedure correct? Can it be improved?
    How many pixels around the logo I should keep, 16 is fine? more, less?
    Do you know some other better commands/procedures?

    Any help is appreciated.


    edit: first try, the logo is still visible sometimes and I don't know why the video is stuttering:
    https://www.dropbox.com/s/n9wqvnyi41qykl8/1%20try%20-%20606%2C456%2C-46%2C-20%20.mkv?dl=0


    new script
    Code:
    LoadPlugin("C:\Users\antip\Desktop\util\MeGUI-2913-64\tools\ffms\ffms2.dll")
    FFVideoSource("C:\Users\\cutted.ts", fpsnum=25, fpsden=1, threads=1)
    
    #PAL  16:9  720 x 576 16:11 ITU ON
    
    
    crop(0,2,-0,-0)
    bbmod(2,0,2,2,128,8)
    Trim(60000,100000).SelectRangeEvery(400,50)
    
    #InpaintLoc(Loc="602,452,-42,-16")
    #InpaintDelogo(mask="C:\Users\mask\mask.bmp", Automask=1, aMix=0, Loc="602,452,-42,-16", Mode="Deblend", Analyze=2)
    #InpaintDelogo(mask="C:\Users\\mask\mask.bmp", Automask=0, aMix=0, Loc="602,452,-42,-16", Mode="Deblend")
    
    Prefetch(7)
    trying to make a slightly bigger mask, 20+px... InpaintLoc(Loc="602,452,-42,-16"), and adding more scenes..
    this one seems much better, I don't see any big artifacts but somtimes the logo borders are visible and,
    anyway the video is stuttering again, can't understand what's the problem..
    https://www.dropbox.com/s/uc2otzhqx7403ei/test%202%20-%20602%2C452%2C-42%2C-16.mkv?dl=0


    test3: https://www.dropbox.com/s/mjgo10kk03upy0v/test%203.mkv?dl=0
    same settings as the test2 on other scenes, the logo artifacts are barely visible, quite acceptable, but can be done better?

    help please.
    Last edited by maudit; 24th Apr 2022 at 09:58.
    Quote Quote  
  2. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    I can't check stuff without the full video [sound not needed].

    Some notes:
    Analyze=2 is default, so you adding it or removing it at some lines have same effect.
    "Masks" you shared are not the masks.
    Why you are doing some weird trims before InpaintDelogo?
    Prefetch should be used only for encoding, not for masks creation.
    Stuttering: could be FFVideoSource, try LWLibAvVideoSource, it should be frame accurate.

    Originally Posted by maudit View Post
    How many pixels around the logo I should keep, 16 is fine? more, less?
    It's fine.
    Quote Quote  
  3. Originally Posted by VoodooFX View Post
    Some notes:
    Analyze=2 is default, so you adding it or removing it at some lines have same effect.
    "Masks" you shared are not the masks.
    Why you are doing some weird trims before InpaintDelogo?
    Prefetch should be used only for encoding, not for masks creation.
    Stuttering: could be FFVideoSource, try LWLibAvVideoSource, it should be frame accurate.
    ok, I'm gonna remove the Analyze parameter. thx
    I was trimming cause create the full length mask was taking ages, it was just a try. I now know it is needed the full mask process.
    anyway I did it on the full movie and the masks now are these:
    https://www.dropbox.com/sh/ot6tqqaej66kkp5/AAAHZyofePJuVVKay1_Frdx1a?dl=0
    plus a very long txt file.

    Should I redo the masks without the Prefetch line then?
    If I'll get stuttering again, I'll try with that LWLibAvVideoSource(), never tried before, doesn't even never heard of it.

    thx voodoo very appreciated
    Last edited by maudit; 24th Apr 2022 at 16:42.
    Quote Quote  
  4. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by maudit View Post
    Should I redo the masks without the Prefetch line then, now?
    Of course. Delete all "mask" files created with Prefetch, before doing it.

    Originally Posted by maudit View Post
    mask was taking ages
    Probably because of Prefetch.

    Originally Posted by maudit View Post
    If I'll get stuttering again, I'll try with that LWLibAvVideoSource(), never tried before, doesn't even never heard of it.
    https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases/
    Use it to do masks too: LWLibAvVideoSource("C:\Users\cutted.ts")
    Copy plugins to your Avisynth's plugins folder so you don't need to add "LoadPlugin" to scripts.
    Quote Quote  
  5. ok, I'll redo masks.

    I've not fully understood that LWLibAvVideoSource part, anyway I think I already have an L-smash.dll 15MB sized into the avisynth plugin folder.
    anyway about the stuttering, I've noticed that it happens when I handle TS files, with the TS file I also have some issues with the frame navigation and with some missing frames at start. (maybe libav can handle it better.... i'll try)
    So I used the avidemux mkv muxer, instead of the TS muxer, on the first cuttings and now, handling the mkv on avspmod makes all smooth with no stuttering at all, no missing frames, good frame nav.

    I'm gonna recreate masks with no prefetch line...
    edit: I haven't timed, but it's taking ages, just like before with prefetch.
    Last edited by maudit; 24th Apr 2022 at 16:40.
    Quote Quote  
  6. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by maudit View Post
    edit: I haven't timed, but it's taking ages, just like before with prefetch.
    Maybe your PC is slow, it's all down how fast your CPU can decode video.
    I measured your sample with AVSMeter, my ooold CPU decodes it at 425 FPS, 1H 30Mins movie - ~5 mins, +Analyze would be less than 10mins.
    Quote Quote  
  7. Originally Posted by VoodooFX View Post
    Originally Posted by maudit View Post
    edit: I haven't timed, but it's taking ages, just like before with prefetch.
    Maybe you PC is slow, it's all down how fast your CPU can decode video.
    I measured your sample with AVSMeter, my ooold CPU decodes it at 425 FPS, 1H 30Mins movie - ~5 mins, +Analyze would be less than 10mins.

    not maybe, it is!
    it just finish right now, 1h 30min. the cpu is an amd apu mobile 5300u 4x2cores..
    I know it's slow, anyway it runned at 30% for the whole process.
    I'll let know you about further progress.
    Quote Quote  
  8. well, using the mkv instead of the TS, the video no longer stutter, but
    the logo artifacts, remnants are still visible on dark, high contrast, moving scenes..
    and it was semi transparent, perhaps it is the maximum obtainable, I'll settle for it.
    Quote Quote  
  9. Video Damager VoodooFX's Avatar
    Join Date
    Oct 2021
    Location
    At Doom9
    Search PM
    Originally Posted by maudit View Post
    remnants are still visible on dark, high contrast, moving scenes..
    and it was semi transparent, perhaps it is the maximum obtainable
    Probably not, there are dozens of parameters, and you changed default of only one.

    Originally Posted by maudit View Post
    the cpu is an amd apu mobile 5300u 4x2cores..
    Then why do you use Prefetch(7)? Probably you are making script slower than without Prefetch.
    Quote Quote  
  10. Originally Posted by VoodooFX View Post
    Originally Posted by maudit View Post
    remnants are still visible on dark, high contrast, moving scenes..
    and it was semi transparent, perhaps it is the maximum obtainable
    Probably not, there is dozens of parameters, and you changed default of only one.

    Originally Posted by maudit View Post
    the cpu is an amd apu mobile 5300u 4x2cores..
    Then why do you use Prefetch(7)? Probably you are making script slower than without Prefetch.
    No doubt.
    I've re-read the manual and the parameters are not so many, anyway I have difficulties to understand how to use them exactly.
    I should do several tests, and each one takes a lot of time.
    I think I'm going to give up and keep the logo.


    I use prefetch(7) cause someone else suggested in another thread,
    he said something like to insert a number equal to the number of logic cores minus one.
    But if you say it's wrong and it's making encodings slower, then I'd like to know your opinion, what number do you think I should use? 3?
    Quote Quote  



Similar Threads

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