VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. Member
    Join Date
    Dec 2018
    Location
    Belgium
    Search PM
    Hello,

    I know how to hide a watermark logo with VLC player, it's ok;
    but my favorite player is MPC-HC, and I don't know how to do the same thing.

    I searched with avisynth+, I found a solution, but half satisfed, I would like to included filter in mpc-hc like VLC does,
    without avisynth, which is rather designed to re-encode the video.

    Do you know a way to remove a logo in real time with MPC-HC ?
    Last edited by redscreen; 20th Jun 2020 at 08:43.
    Quote Quote  
  2. You can play an AviSynth script with MPCHC.
    Quote Quote  
  3. Member
    Join Date
    Dec 2018
    Location
    Belgium
    Search PM
    It's true, but the sound is no more "direct stream" -> no more bitstream AC3 5.1, and all my files have to write their index, so a little bit long...
    With VLC it's flawless, and I would like the same, if possible with MPC-HC, with a plugin or a filter I still don't know...

    And I ask about that if this filter exist.
    Quote Quote  
  4. Another way is to install ffdshow, enable the "Raw video" decoder, and configure the Logoaway filter. Or it's AviSynth filter option.
    Quote Quote  
  5. You can mask the logo with a pixel shader in mpc-hc and recenter image (or mask with corner box):
    https://forum.videohelp.com/threads/397797-Pixel-shaders-for-video-playback-%28-hlsl%29

    This is not equivalent to Avisynth DeLogo or the built-in features in ffdshow and VLC that requires providing and precise positioning a mask file. Mpc-hc doesn't have this feature built-in.
    Quote Quote  
  6. Member
    Join Date
    Dec 2018
    Location
    Belgium
    Search PM
    Thanks for your solutions.

    It's true, I forgot about ffdshow as it is no more developped since 6 years ago and no more installed on my computer...

    I'll look your bAR_Mask.hlsl too, thank you.

    Before that , I searched for a "Avisynth+ solution", but as I can't have my bitstream audio, I little gave up... :

    DeLogo is 32bit only...
    DeLogoHD is too complicated to create the mask in .lgd format:
    I was trying to understand how "InpaintDelogo" works...
    Quote Quote  
  7. bar_Mask.hlsl v1.1

    has MaskCrop: similar to vlc crop (the simplest solution is often to crop the logo)
    and MaskBox + first pixel horiz dynamic fill (set Mode to 21): similar to VLC remove logo without providing an actual Mask file.

    In the general case removing logos from a compressed video is not a simple problem, because logos are rarely a single color, and not always at the same place.
    Last edited by butterw; 21st Jun 2020 at 06:03.
    Quote Quote  
  8. Originally Posted by redscreen View Post
    I was trying to understand how "InpaintDelogo" works...
    <edit>
    Oops, I just noticed you were talking about InpaintDelogo, not InpaintLogo. The instructions below are for the latter.
    </edit>

    The basics are pretty simple. You need to supply a mask that marks where the logo is, then call InpaintLogo() with that mask.

    You can always export a frame and edit it in a paint program to create a mask. But an easier is to find a completely black frame (aside from the logo), then use that as your mask.

    Code:
    LWlibavVideoSource("video.mkv")
    logo = Trim(43666,43666).mt_binarize(30).mt_expand().mt_expand(chroma="-128")
    InpaintLogo(mask=logo, radius=10.0)
    I used the defaults for everything here except radius.

    A black frame with logo:
    Image
    [Attachment 53884 - Click to enlarge]


    Converted to a mask with Trim(43666,43666).mt_binarize(30).mt_expand().mt_e xpand(chroma="-128"):
    Image
    [Attachment 53885 - Click to enlarge]


    A frame before Inpaint:
    Image
    [Attachment 53886 - Click to enlarge]


    After Inpaint:
    Image
    [Attachment 53887 - Click to enlarge]


    In some parts of the video it works well, in others not so well.

    Of course, this particular logo is semi-transparent and would be better removed with an unblending.
    Last edited by jagabo; 21st Jun 2020 at 12:32.
    Quote Quote  



Similar Threads

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