VideoHelp Forum


Try StreamFab All-in-One and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 21 of 21
Thread
  1. I read this guy's thread https://forum.videohelp.com/threads/337854-How-to-remove-huge-but-transparent-watermark


    Original screenshot: [IMG]i.imgur.com/KSHlwQn.jpg[/IMG]

    First I replaced transparent(low opacity) logo part to red [IMG]i.imgur.com/OdRYNR7.png[/IMG]

    Outcome : [IMG]i.imgur.com/WrWfiZR.jpg[/IMG]


    But still, it doesn't look like it's supposed to look, it should have barely see-able edges of the logo, but this method just blurred the logo.
    Recently I discovered another way to remove the logo, I changed 'Sony levels' in Sony Vegas, but after that video looks too dark, so that's not an option..

    Can someone recommend any working methods that would work on this kind of watermark ?

    I forgot to mention that I used VirtualDub DeLogo plugin
    Last edited by aquax; 21st Apr 2019 at 13:12.
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    You need to work on only the luma, and you need to use a more advanced blend mode - one that is the inverse of whatever was used to originally create it (screen/multiply/etc). And try with varying amounts of opacity on the matte (which should be grayscale, no red).

    Scott
    Quote Quote  
  3. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Pull a Difference mask then use that to neutralize the watermark. Divide Pie into thurds, then round it off.
    Quote Quote  
  4. Originally Posted by Cornucopia View Post
    You need to work on only the luma, and you need to use a more advanced blend mode - one that is the inverse of whatever was used to originally create it (screen/multiply/etc). And try with varying amounts of opacity on the matte (which should be grayscale, no red).

    Scott
    Are you talking about Sony Vegas or After Effects ?
    I tried this on VirtualDub DeLogo plugin.
    Quote Quote  
  5. Does anybody have any more ideas to remove this watermark ?
    Quote Quote  
  6. Originally Posted by aquax View Post
    Does anybody have any more ideas to remove this watermark ?
    Maybe. Can you provide a sample where the watermark is over a black background?

    But not very well, I'd guess. Did you try any of the tips given in that thread, especially AlanHK's?

    Do you have to use VirtualDub? Did you read any of the VDub logo removal guides?

    https://forum.videohelp.com/threads/221665-Removing-Logos-using-DeLogo-vdub-filter?p=12...86#post1284286
    Last edited by manono; 22nd Jun 2015 at 19:09.
    Quote Quote  
  7. Here is the logo on a black background

    Click image for larger version

Name:	July 19 2011.mp4_snapshot_00.20.05_[2015.06.23_13.55.14].png
Views:	359
Size:	62.6 KB
ID:	32287

    I read some DeLogo removal guides. I painted the logo (opacity 50%) parts red and removed everything else that didn't had any parts of the logo over it, saved as transparent PNG, but it didn't work.. Also tried to paint logo white with opacity 60% this kinda worked on Sony Vegas with some blending modes and 'Sony Levels' effect on main video, but still wasn't as good as in the tutorials..
    Last edited by aquax; 23rd Jun 2015 at 07:43.
    Quote Quote  
  8. Script using only built in AviSynth functions:

    Code:
    logo = ImageSource("logo.png").ConvertToYV12()
    src=ImageSource("pic.jpg").ConvertToYV12()
    
    logo=logo.ColorYUV(gain_y=-50, off_y=-20) # adjust logo levels
    
    Overlay(src, logo, mode="subtract") # subtract logo from image, leaves bright areas too dark
    bmask=src.ColorYUV(gain_y=2000, off_y=-450).GreyScale() # mask based on brightness
    Overlay(last, src, mask=bmask) # blend original with delogo'd video
    Click image for larger version

Name:	reduced.jpg
Views:	740
Size:	107.3 KB
ID:	32288

    The script needs to be adjusted for a wider range of the source video.
    Last edited by jagabo; 23rd Jun 2015 at 11:19.
    Quote Quote  
  9. Originally Posted by jagabo View Post
    Script using only built in AviSynth functions:

    Code:
    logo = ImageSource("logo.png").ConvertToYV12()
    src=ImageSource("pic.jpg").ConvertToYV12()
    
    logo=logo.ColorYUV(gain_y=-50, off_y=-20) # adjust logo levels
    
    Overlay(src, logo, mode="subtract") # subtract logo from image, leaves bright areas too dark
    bmask=src.ColorYUV(gain_y=2000, off_y=-450).GreyScale() # mask based on brightness
    Overlay(last, src, mask=bmask) # blend original with delogo'd video

    The script needs to be adjusted for a wider range of the source video.
    wow that is perfect.. I have never used AviSynth, I'm gonna try it now..

    I replaced src=ImageSource() with AVISource() and the video is green with logo over it..
    Last edited by aquax; 23rd Jun 2015 at 16:58.
    Quote Quote  
  10. Originally Posted by aquax View Post
    I replaced src=ImageSource() with AVISource() and the video is green with logo over it..
    Just the first few frames? Or the entire video? What's your source container and codecs? Note that AviSource() requires a VFW decoder for the video. ffdshow includes VFW decoders for most common codecs. If you use a 32 bit editor/encoder you need to use 32 bit AviSynth and a 32 bit decoder. If you use a 64 bit editor/encoder you need to use 64 bit AviSynth and a 64 bit decoder.
    Last edited by jagabo; 23rd Jun 2015 at 17:53.
    Quote Quote  
  11. Originally Posted by jagabo View Post
    Originally Posted by aquax View Post
    I replaced src=ImageSource() with AVISource() and the video is green with logo over it..
    Just the first few frames? Or the entire video? What's your source container and codecs? Note that AviSource() requires a VFW decoder for the video. ffdshow includes VFW decoders for most common codecs. If you use a 32 bit editor/encoder you need to use 32 bit AviSynth and a 32 bit decoder. If you use a 64 bit editor/encoder you need to use 64 bit AviSynth and a 64 bit decoder.
    I have K-Lite Media Codec Pack which includes ffdshow

    Original source file has QuickTime container/codec (original video info) which can't be used anywhere, so I'm converting it using AviDemux to Mpeg4 AVC (x264) / MP4v2 Muxer (Actually it's working only on AVI muxer, but the duration is very incorrect)

    converted video info:
    Code:
    Format                      : AVI
    Format/Info                 : Audio Video Interleave
    File size                   : 68.5 MiB
    Duration                    : 23h 3mn
    Overall bit rate            : 6 920 bps
    
    Video
    ID                          : 0
    Format                      : AVC
    Format/Info                 : Advanced Video Codec
    Format profile              : High@L3.1
    Format settings, CABAC      : Yes
    Format settings, ReFrames   : 4 frames
    Codec ID                    : H264
    Duration                    : 2mn 42s
    Bit rate                    : 3 320 Kbps
    Width                       : 1 280 pixels
    Height                      : 720 pixels
    Display aspect ratio        : 16:9
    Frame rate                  : 29.970 fps
    Color space                 : YUV
    Chroma subsampling          : 4:2:0
    Bit depth                   : 8 bits
    Scan type                   : Progressive
    Bits/(Pixel*Frame)          : 0.120
    Stream size                 : 64.2 MiB (94%)
    Writing library             : x264 core 146 r2538 121396c
    Encoding settings           : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x133 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    I also had to convert audio from quicktime's AAC to MP3 otherwise AviSynth shows:
    No compatible ACM codec to decode 0x00FF audio stream to PCM.
    Finally it's kinda working after converting everything, but on darker backgrounds there are visible parts of the logo, maybe because of the heavy conversion that was done.. Is there any more parameters that I can use for removing the logo completely ?

    Click image for larger version

Name:	somethingnotok.png
Views:	433
Size:	856.2 KB
ID:	32292
    Last edited by aquax; 23rd Jun 2015 at 18:55.
    Quote Quote  
  12. Originally Posted by aquax View Post

    Original source file has QuickTime container/codec (original video info) which can't be used anywhere,



    You can open the mov directly in avisynth with ffms2.dll or qtsource.dll, with aac audio . I wouldn't load audio, you can just remux it from the original that way you don't lose any quality

    e.g

    ffvideosource("video.mov")

    or

    qtinput("video.mov")
    Quote Quote  
  13. Originally Posted by poisondeathray View Post
    Originally Posted by aquax View Post

    Original source file has QuickTime container/codec (original video info) which can't be used anywhere,
    You can open the mov directly in avisynth with ffms2.dll or qtsource.dll, with aac audio . I wouldn't load audio, you can just remux it from the original that way you don't lose any quality
    e.g
    ffvideosource("video.mov")
    or
    qtinput("video.mov")
    Thanks, this worked, and other videos are not green anymore..
    Quote Quote  
  14. Originally Posted by aquax View Post
    Is there any more parameters that I can use for removing the logo completely ?
    You can play around with gamma_y in ColorYUV() for the bmask. I don't think that will help much because the problem appears to be more around the logo letters, not within them.

    You could try blurring those areas but I think the blurring will be too obvious. Add this to the end of my previous script:

    Code:
    blurry = Blur(1.0).Blur(1.0).Blur(1.0).Blur(1.0)  # a blurry version of the delogo video
    edges = logo.mt_edge().mt_expand().Blur(1.0).Blur(1.0) # map of edges in the logo, feathered
    Overlay(last, blurry, mask=edges) # overlay the blurry video at the edges in the logo
    You'll need masktools2 for AviSynth.
    Quote Quote  
  15. Originally Posted by jagabo View Post
    Originally Posted by aquax View Post
    Is there any more parameters that I can use for removing the logo completely ?
    You can play around with gamma_y in ColorYUV() for the bmask. I don't think that will help much because the problem appears to be more around the logo letters, not within them.

    You could try blurring those areas but I think the blurring will be too obvious. Add this to the end of my previous script:

    Code:
    blurry = Blur(1.0).Blur(1.0).Blur(1.0).Blur(1.0)  # a blurry version of the delogo video
    edges = logo.mt_edge().mt_expand().Blur(1.0).Blur(1.0) # map of edges in the logo, feathered
    Overlay(last, blurry, mask=edges) # overlay the blurry video at the edges in the logo
    You'll need masktools2 for AviSynth.

    Thanks for this too, a little improvement is noticeable..

    Click image for larger version

Name:	without.png
Views:	584
Size:	944.5 KB
ID:	32294Click image for larger version

Name:	with.png
Views:	516
Size:	777.5 KB
ID:	32295
    Quote Quote  
  16. @aquax

    please what are the first line (1,2,3 ..) of your script
    Quote Quote  
  17. Originally Posted by sekininsha View Post
    @aquax

    please what are the first line (1,2,3 ..) of your script

    Code:
    logo = ImageSource("url to logo.png").ConvertToYV12()
    src=FFVideoSource("url to my source video.mp4").ConvertToYV12()
    
    logo=logo.ColorYUV(gain_y=-50, off_y=-20) # adjust logo levels
    Quote Quote  
  18. You probably don't need the ConvertToYV12() on the output of ffVideoSource. It's most likely putting out YV12 already.
    Quote Quote  
  19. [QUOTE=poisondeathray;2396501]
    Originally Posted by aquax View Post
    you can just remux it from the original that way you don't lose any quality

    What do you mean by 'remux' ? I can save/render this final video without re-encoding (I previously used MeGUI to re-encode it with avisynth settings)
    Quote Quote  
  20. Originally Posted by aquax View Post

    What do you mean by 'remux' ? I can save/render this final video without re-encoding (I previously used MeGUI to re-encode it with avisynth settings)
    That was referring to audio, not video. ie. Don't load audio into the script. It doesn't make sense to re-encode the audio.

    "remux" means stream copying the original audio into the new container

    Originally Posted by poisondeathray View Post
    I wouldn't load audio, you can just remux it from the original that way you don't lose any quality
    Quote Quote  



Similar Threads