VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. I have two videos that are identical apart from one has a logo top left corner and one has a logo bottom right corner.

    I tried to key off a rectangle covering one of the logos to replace that logo with the other video which doesn't have a logo in that position. I'm totally new to VSDC but not editing and basically I just can't figure how to do it with VSDC. Anyone know how?


    I don't have to use VSDC although would prefer to but whatever I do use must take matroska files and x264 and x265 codecs and be free.
    Quote Quote  
  2. I've no idea how to do it with VSDC, if you can, but if you're willing to give yourself a crash course in Avisynth, it should be easy enough to do, once you have some understanding of Avisynth. You can open just about anything with it.

    This is the "mask" I used. You'd create a mask to match the logo you want to remove. It's just a bitmap image.

    Click image for larger version

Name:	mask.jpg
Views:	261
Size:	6.7 KB
ID:	40349

    The script would be something like this:

    A=AviSource("D:\video 1.avi").ConvertToRGB() #video with logo to be replaced bottom right
    B=AviSource("D:\video 2.avi").ConvertToRGB() #video without logo bottom right
    C=ImageSource("D:\mask.bmp")
    Overlay(A,B,Mask=C).ConvertToYV12()

    This is the result when the video with the logo and the video without the logo are completely different, so you can see what it does. The logo area is replaced with the second video. You can cut out a corner and replace it completely, but unless the two videos do match exactly you might be left with an obvious border around the section that was cut out. Whatever works, I guess.

    Click image for larger version

Name:	screenshot.jpg
Views:	242
Size:	53.9 KB
ID:	40350

    If you've never used Avisynth before there'll be a fair initial learning curve, but once you've got it working and know how to open video with it, creating the script you need is reasonably easy. It'll won't be much different to the one above, just the source videos will be different. Avisynth has no GUI as it's all done with text files (with an avs extension), but a GUI such as AvsPmod can help by making it easier to preview the result.

    Or I use MeGUI. It's script creator has a preview and it can encode the script for you, rather than having to use the command line yourself.
    Last edited by hello_hello; 20th Jan 2017 at 03:45.
    Quote Quote  
  3. Thank you hello_hello, that's exactly what I'm trying to do (with a separate mask as in your example script).

    I must admit I don't relish learning AVIsynth to do it, although the example script you provided seems self explanatory. But if no one else can help me to do it with VSDC I'll certainly give it a go.

    So,
    What's the rendering quality like...is it fully adjustable and is it possible to render only the keyed over logo part and not reencode the original main video?
    Of the GUIs you mention which would you suggest I start with (basically which is easiest to learn for this specific task)?
    Would it also be able to pass through dolby AC3 sound?
    Are there any recommended tutorials for avisynth?

    Thanks for your help.
    Last edited by backwardforward; 19th Jan 2017 at 11:57.
    Quote Quote  
  4. For that to work the two videos have to perfectly align both spacially and temporally. And you want the brightness/colors to match as perfectly as possible. Those are usually the hardest parts of the process.

    AviSynth doesn't compress video at all. It feeds uncompressed video to another program that does the rendering.
    Quote Quote  
  5. Originally Posted by backwardforward View Post
    So,
    What's the rendering quality like...is it fully adjustable and is it possible to render only the keyed over logo part and not reencode the original main video?
    Of the GUIs you mention which would you suggest I start with (basically which is easiest to learn for this specific task)?
    Would it also be able to pass through dolby AC3 sound?
    Are there any recommended tutorials for avisynth?

    Thanks for your help.
    MeGUI would probably be the most suitable Avisynth based GUI, mainly because it lets you easily modify and preview the scripts it creates.
    Normally you'd use the File/Open menu to open the source file. MeGUI should open it with it's File Indexer. You'd add the indexing job to the queue and run it. When it's done, the Script Creator opens with a preview.
    Normally you'd add all the usual filtering via the GUI as required, just as you would using any other GUI. I'm referring to cropping or resizing or de-interlacing etc. MeGUI automatically adds the filtering to the script for you, so in that respect there's no Avisynth knowledge required.

    MeGUI's script creator has a tab where the script being created is displayed. You're free to modify it however you like, and there's a preview button to update the preveiw. If all you do is open an MKV and don't add any filtering, the script MeGUI creates should look something like this:

    LoadPlugin("C:\Program Files\MeGUI\tools\lsmash\LSMASHSource.dll")
    LWLibavVideoSource("D:\Video 1.mkv.lwi")
    <deinterlace>
    <crop>
    <denoise>
    <resize>

    The second line is the one that opens the video, so you'd need to add an identical line, except to open the second video, then add the logo removing stuff. Like this (modifications in blue). The de-interlace, crop, denoise and resize lines are just placeholders. They can be deleted.

    LoadPlugin("C:\Program Files\MeGUI\tools\lsmash\LSMASHSource.dll")
    A=LWLibavVideoSource("D:\Video 1.mkv.lwi").ConvertToRGB()
    B=LWLibavVideoSource("D:\Video 2.mkv.lwi").ConvertToRGB()
    C=ImageSource("D:\mask.bmp")
    Overlay(A,B,Mask=C).ConvertToYV12()


    Hopefully from there you can just click the preview button to refresh the preview and it'll be working fine. There'll probably be a fair pause the first time, as though everything's frozen. That's because the second video will be automatically indexed, as only the first one was indexed initially. Save the script when you're happy and it'll be loaded into the video section, and from there you can configure the encoder you want to use as required (Xvid or x264 or x265) and add the encoding job to the queue.

    There's several ways to output video, and for a couple of those MeGUI will do all the work and give you a completed output file containing video and audio etc. What I generally do is re-encode the video on it's own (use the Queue button in the video section and ignore any audio loaded into MeGUI's audio section) and when it's done I open the output video with MKVToolNixGUI. I then add the source MKV. You'll see a list of streams. The re-encoded video, the original video, the original audio and any subtitles or chapters etc. Select the new video stream, de-select the old video stream, then click the "start multiplexing" button. That'll output a new MKV which should be the same as the original one, except the old video stream is replaced with the new.

    There's no way I know of to re-encode just part of a frame. It's all or nothing.
    There's Avisynth instructions on the Avisynth website. If you use MeGUI you don't have to install Avisynth unless you want to. MeGUI supplies it's own portable version.
    Last edited by hello_hello; 20th Jan 2017 at 04:56.
    Quote Quote  
  6. Thanks hello_hello. Much appreciated.
    Quote Quote  
  7. Now VSDC doesn't have a special feature for removing a logo, but there are 2 ways of blurring or fading it. Here is one way how to blur it.

    At first, apply 'Gaussian blur' filter to the video. ('Video effects'>'Filters'>'Gaussian blur'). Then set the blur level.
    After that, add an ellipse and apply an inverted mask to it. In the properties window select 'Gradient' in 'Fill background' option.
    Go to 'Gradient settings' and set 'Opacity' as 0.00 and 'Type' as 'Radial'. In the end, drag the arrow in the required gradient direction.


    Here is the video tutorial how to do it:
    https://www.youtube.com/watch?v=43c2Gzp-VJw

    There you can also find a lot of videos how to work with VSDC.
    Quote Quote  
  8. Thanks Aliennn. That's the way to do it if you only have the one video with a logo on it but I have 2 videos exactly the same but with logos in different positions. I eventually found out how to do it with VSDC but it's not at all intuitive. Basically follow the way this utube video shows but use videos where they use pictures: https://www.youtube.com/watch?v=CBqMVqrAIC8

    Using AVIsynth to do it is ok but it's much easier to use VSDC, once you know how, because everything is in the one package and you don't have to work with scripts.
    Quote Quote  



Similar Threads

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