VideoHelp Forum
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Member
    Join Date
    Feb 2015
    Location
    Brazil
    Search PM
    Some weeks ago I asked for some help to remove a logo from a video, and some nice fellows provided great solutions. Until then, I had never used Avisynth. Now I'm using it quite often and I'm very excited to learn new things.

    So, I have choosen a video to test myself and pratice. But I have some questions.

    I have two sources for the same video. The first one (source1.mpg) is the best one, but it has a logo. The second one (source2.mpg) does not have a logo, but it is from a VHS source.

    What I'm trying to do is to keep most of the screen area from source1, and use the logo area from source2. I'm using a script in Avisynth (running in hcenc) suggested by jagabo some weeks ago, with some modifications.

    I know it's impossible to match the two sources exactly, but I want to get as close as possible. The two sources aren't perfectly aligned and there are some level and color differences. I don't know exactly what's the code to align the sources. Also it's very difficult to find the correct parameters to match levels and colors.

    Find below the samples of the videos (source1.mpg, source2.mpg), the .d2v files (ziped), the script file (ziped), the mask file (ziped) and the resulting video (test.m2v). How can I improve this?
    Image Attached Files
    Last edited by virguloso; 11th Jun 2015 at 16:23.
    Quote Quote  
  2. Try using the ColourLike() filter.
    Quote Quote  
  3. Member
    Join Date
    Feb 2015
    Location
    Brazil
    Search PM
    Thank you very much jagabo! Using the ColourLike, I managed to get a smoother result. It's not perfect, but I expected that, since source 2 has a lower quality. I don't think I can get a better result, thanks! The resulting video is attached.
    Image Attached Files
    Quote Quote  
  4. Did you crop away the edges of the frame and the logo for the first pass of ColourLike()?
    Quote Quote  
  5. Member
    Join Date
    Feb 2015
    Location
    Brazil
    Search PM
    Yes I did. Otherwise the edges and the logo could mess the histogram.

    Do you think it's possible to get a better result?
    Quote Quote  
  6. Originally Posted by virguloso View Post
    Do you think it's possible to get a better result?
    You could feather your mask (have the logo replacement part blend better into the source video so it's not so obviously a sharp rectangle). I don't know whether or not a mask in the shape of the logo , as opposed to your rectangle, would look any better to you or not, but I might be inclined to try it.
    Quote Quote  
  7. I agree a more form fitting and more feathered mask would be less obvious.

    The registration of the two videos isn't great either. It doesn't matter much in this sample clip since there's not much detail in that corner. But it may be more obvious with other shots. Using v1.AddBorders(16,0,0,0) rather than v2.Resize() gives better alignment. You'll need new mask to match the new frame size.

    If you have a month to spare you could go through the videos and adjust the brightness/colors shot-by-shot.
    Quote Quote  
  8. Member
    Join Date
    Feb 2015
    Location
    Brazil
    Search PM
    manono and jagabo, thanks for the suggestions. Actually making the adjustments shot-by-shot is out of question, but I managed to use the ColourLike twice, for the brighter and for the darker bits, and the result is better than before.
    Image Attached Files
    Quote Quote  
  9. That is a distinct improvement. If the rest of it is like your teste2.mpg, then good work!
    Quote Quote  
  10. Member
    Join Date
    Feb 2015
    Location
    Brazil
    Search PM
    I've just uploaded the entire video on YouTube for your appreciation. Here's the link: https://youtu.be/Y6J_9VjUKWM

    I'm quite happy with the result!
    Quote Quote  
  11. Originally Posted by virguloso View Post
    I've just uploaded the entire video on YouTube for your appreciation.
    Hehe, not everyone appreciated it:

    This video contains content from Pink Floyd, who has blocked it on copyright grounds.
    Sorry about that.
    Quote Quote  
  12. Member
    Join Date
    Feb 2015
    Location
    Brazil
    Search PM
    Oh what a shame. Find the video attached. It's 300mb.
    Image Attached Files
    Quote Quote  
  13. Nice work. I don't think anyone, unless they were told there had been a logo and where to look for it, would ever have guessed. It's obvious only in a couple of places.

    For future reference, you should have IVTC'd it and returned it to progressive 23.976fps. On YouTube the interlacing would have been noticeable also. It looks like a simple IVTC procedure using one of AviSynth's IVTC filters.

    Oh, I also think the volume is too low.
    Quote Quote  



Similar Threads

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