VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 33
Thread
  1. Hi

    I have two different sources of the same video and a logo on each of the same but at different places.. I would like to use them both to remove my logo.
    How can I adjust the colors/hue/brightness/contrast/levels so that the two video match as much as possible? Should I do that manually or are there some automatic methods to achieve this?

    Thank you in advance for any advice.
    Quote Quote  
  2. you can do it manually , or get close with some avisynth filters, maybe use both

    e.g. histogram adjust, colorlike

    http://forum.doom9.org/showthread.php?t=157304
    Quote Quote  
  3. Or you can use Merge/MergeChroma/MergeLuma so that one is identical to the other, or so their differences are smoothed out:

    http://avisynth.org/mediawiki/Merge

    This assumes that, except for the logos and colors, they're identical in every other respect. Then crop down one of the videos and overlay it on top of the other to get rid of its logo:

    http://avisynth.org/mediawiki/Overlay
    Quote Quote  
  4. Thank you for the advices. After several tries, I think this script works pretty well in my case:

    clip1=avisource("C:\clip_to _change _colors_of.avi")

    clip2=avisource("C:\clip_to _match _colors_to.avi")

    chroma=clip2
    luma=clip1
    clip1=MergeChroma(luma,chroma, 1.0) #to match the colors

    HistogramAdjust(clip1,type="match",mclip=clip2) #to match the contrast
    MergeChroma() give me quite colors, and HistogramAdjust() allows to fix the contrast. Of course it's not perfect but it's far better than what I could do manually.
    Quote Quote  
  5. I've however a question. How does the MergeChroma() function works? Pixel by pixel or it does it work on the channels curve of the whole frame?
    This question is important since I would like to match the colors of the no-logo version (clip1) to the colors of the logo version (clip 2). So, if the colors are merged px by px, the area of the logo in clip 1 will have the colors of the logo in clip 2, which is of course not what I want.
    Quote Quote  
  6. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by mathmax View Post
    How does the MergeChroma() function works? Pixel by pixel or it does it work on the channels curve of the whole frame?
    It works pixel by pixel.
    Quote Quote  
  7. Probably better results when doing it manually or use a combination (use some filter to get it close, then manual adjustment)
    Quote Quote  
  8. Indeed, it's px by px, so I get the colors of my logo on the top of the luma values of my clip...

    I thought I could use ColourLike() (instead of MergeChroma()) + HistogramAdjust()... but ColourLike() doesn't give such a good result. It works more or less on a single frame but it's another story on the whole clip... Sometimes my clip1 is darker than the clip 2 and sometimes the clip2 is darker than the clip 1... Probably there is something to fix before the colors (level, contrast, etc.) but I have the feeling that it's not gonna be easy. Also when some colors match, others don't (spatially and temporally)... a real headache!

    I think I'll use a delogo function (like InpaintFunc()) on the clip with logo and then Merge its chroma to the other clip. This way the logo area should have colors that match the rest of the clip but keeping the shapes of my clip without logo (luma seems to be more responsible of the shapes). Do you think that it's a good compromise?
    Quote Quote  
  9. can you post a sample ?
    Quote Quote  
  10. Sure, but the sample is 130 MB. Please tell me if it is too heavy. I wanted to include 3 different scenes cause it seems difficult to find the right settings for the three scenes at the same time. I compressed with MSU lossless codec, tell me if it's ok.

    Here you are: http://www.mediafire.com/?q0n22d827z7tkmb
    Quote Quote  
  11. I take that back... I think it's possible with the right programs

    You can feather the mask and try to match it up, but note some frames are completely different (you still have to fix the frame matches)

    I'll have a closer look tonight and report back
    Last edited by poisondeathray; 4th May 2011 at 16:23.
    Quote Quote  
  12. I also have the version without logo interlaced... I could deinterlace the same way it was done on the version with logo. Which method should I use?
    Quote Quote  
  13. ^I edited my message above

    I think it is possible, but since they've been processed differently (one has been blend deinterlaced), the matching is less close. If you processed both of them equally it will increase your chances
    Quote Quote  
  14. Thank you If you wanna have a closer look, here is the original video without logo. I demuxed with dgindex and the cut is not so accurate, so maybe it doesn't start at the exact same frame.

    http://www.mediafire.com/?2dtz44yo4u6jep1
    Quote Quote  
  15. yes, you have some problems

    1) Some frames aren't perfectly aligned temporally (time wise) - probably because of the VFR recording and frame drops or dupes

    2) Even on "same" frames, the processing differences shift the frame with respect to each other (1 is blend deinterlaced) so the lines don't match up. eg. His mouth is in a different place in 1 version compared to the other

    As a result, on non matched frames (time wise), it completely falls apart and you end up seeing the "box" or the outline of the mask. But on matched frames , you can get a decent match with a feathered mask.

    If you want to see the significance of the shift, open your 2 original AVI videos up in 2 tabs in avspmod, and hit the 1 & 2 keys to toggle back and forth as you scrub through the frames. You will see on some frames they are completely different (time wise), and some are closely matched, but shifted

    You might not have access to some of these tools, but there are color matching plugins in programs like after effects or nuke that might get you a 70-90% match, and you can manually tweak the rest.

    I don't know how you processed them, but it might be possible to get a closer match (since you have an "original video without logo"). "without_logo.avi" has definitely been blend deinterlaced, and that definitely contributes to the problems because the other one was processed differently.

    Here is a quick example of a few seconds , you can see it does fairly decent on matched frames, but quickly "falls apart" on the frames that aren't aligned up temporally. You can definitely improve the color a bit more (I didn't do very much manual tweaking). And it might be possible to motion track the mask , but this is getting complex. I would start to see if you can process the one video to get a closer match first
    Image Attached Files
    Quote Quote  
  16. 1) Some frames aren't perfectly aligned temporally (time wise) - probably because of the VFR recording and frame drops or dupes
    Yes I could notice that some frames don't match perfectly when switching with ALT+TAB two windows of vdub (btw thank you for AvsPmode advice, I didn't know the tool but it looks handy ).

    I'm working with 4 different sources for a single project.. but These two videos don't come from stream recording, so I don't think it was VFR originally. Probably the frames aren't perfectly aligned temporally because different methods were used to deinterlace the two footage. Did you see the interlaced footage I have uploaded above? If I knew what was used on the video with logo, I could apply the same filter and solve this issue.. what do you think?

    Also I noticed that the frame of the first scene change contains a field of the scene 1 and a field of the scene 2 on "without_logo.avi" which is not the case in "with_logo.avi". How is is possible?

    Thank you for having worked on the files. Your sample looks good enough for me... of course if that can be improved that would be even better. How did you fix the colors?
    Last edited by mathmax; 4th May 2011 at 19:16.
    Quote Quote  
  17. Originally Posted by mathmax View Post
    1) Some frames aren't perfectly aligned temporally (time wise) - probably because of the VFR recording and frame drops or dupes
    Yes I could notice that some frames don't match perfectly when switching with ALT+TAB two windows of vdub (btw thank you for AvsPmode advice, I didn't know the tool but it looks handy ).
    definitely use avspmod, it's way better for scripting and comparing


    I'm working with 4 different sources for a single project.. but These two videos don't come from stream recording, so I don't think it was VFR originally. Probably the frames aren't perfectly aligned temporally because different methods were used to deinterlace the two footage. Did you see the interlaced footage I have uploaded above? If I knew what was used on the video with logo, I could apply the same filter and solve this issue.. what do you think?
    Probably it would be better if you didn't use blend deinterlace, the blending definitely contributes to the lines not matching up, but the bigger problem is (almost) completely different frames in some spots. That will really screw up your mask repair (e.g his mouth is in a different location )


    Also I noticed that the frame of the first scene change contains a field of the scene 1 and a field of the scene 2 on "without_logo.avi" which is not the case in "with_logo.avi". How is is possible?
    probably from the blend deinterlace


    Your sample looks good enough for me... of course if that can be improved that would be even better. How did you fix the colors?
    I think the biggest problem is with the frame matching & alignment . They are offset too much on some of the frames

    I used nuke's match grade node to fix the colors. It can scan frame by frame a reference source and apply that grade to an input source . So even if you get a fairly close match (maybe 70-90%), you can do the rest manually, it still saves you lot of time
    Quote Quote  
  18. Originally Posted by poisondeathray View Post
    Probably it would be better if you didn't use blend deinterlace, the blending definitely contributes to the lines not matching up, but the bigger problem is (almost) completely different frames in some spots. That will really screw up your mask repair (e.g his mouth is in a different location )
    so which deinterlacing filter should I use on the version without logo? I don't have the interlaced version for the logo version.. I can only deinterlace the no-logo version like it has been done on the logo version.

    Originally Posted by poisondeathray View Post
    I used nuke's match grade node to fix the colors. It can scan frame by frame a reference source and apply that grade to an input source . So even if you get a fairly close match (maybe 70-90%), you can do the rest manually, it still saves you lot of time
    Is it free? Where can I find it?
    Quote Quote  
  19. Originally Posted by mathmax View Post
    Originally Posted by poisondeathray View Post
    Probably it would be better if you didn't use blend deinterlace, the blending definitely contributes to the lines not matching up, but the bigger problem is (almost) completely different frames in some spots. That will really screw up your mask repair (e.g his mouth is in a different location )
    so which deinterlacing filter should I use on the version without logo? I don't have the interlaced version for the logo version.. I can only deinterlace the no-logo version like it has been done on the logo version.
    I don't know , try some others like QTGMC . You won't get much worse than blend deinterlacing (ghosting)

    Compare them for better matches in tabs with avspmod

    Originally Posted by poisondeathray View Post
    I used nuke's match grade node to fix the colors. It can scan frame by frame a reference source and apply that grade to an input source . So even if you get a fairly close match (maybe 70-90%), you can do the rest manually, it still saves you lot of time
    Is it free? Where can I find it?
    No, very expensive

    As I said earlier, you probably won't have these tools unless you do compositing (which is why I said it might be possible "with the right tools") . You could probably motion track the mask as well to improve the match

    I can't think of any avisynth filters other than those mentioned above
    Quote Quote  
  20. What is strange is that the video with logo seems to have been blend deinterlaced (if you look at his finger)
    Click image for larger version

Name:	logo0001.jpg
Views:	594
Size:	192.7 KB
ID:	6706

    But if I apply a blend deinterlacing filter on the other video, the two fields will be blended on the scene change which is not the case in the video with logo.

    Click image for larger version

Name:	nologo0000.jpg
Views:	637
Size:	292.0 KB
ID:	6705

    How is it possible that the video with logo use a blend deinterlacing filter but doesn't blend the scenes?
    Last edited by mathmax; 4th May 2011 at 20:46.
    Quote Quote  
  21. No it hasn't; I think the logo clip used different deinterlacer or at least the blends weren't as bad. It may have been processed with other filters afterwards (like noise reduction), but I don't think blend deinterlacer was used on it

    The tell tale signs of blend deinterlacing are ghosting (double image) in your "without_logo.avi"

    If you use non blending deinterlacer on your mpeg2 sample , eg. yadif, or qtgmc - you don't get that transition problem

    Compare them in avspmod and you will see . Push f5 and use the number keys (e.g. 1, 2) to flip back & forth between tabs


    Look at the edges, how more crisp they are in the logo clip: eg.
    Image Attached Thumbnails Click image for larger version

Name:	74logo.png
Views:	307
Size:	311.9 KB
ID:	6707  

    Click image for larger version

Name:	74nologo.png
Views:	325
Size:	368.1 KB
ID:	6708  

    Click image for larger version

Name:	187logo.png
Views:	344
Size:	317.8 KB
ID:	6712  

    Click image for larger version

Name:	187nologo.png
Views:	340
Size:	348.2 KB
ID:	6713  

    Last edited by poisondeathray; 4th May 2011 at 21:04.
    Quote Quote  
  22. Originally Posted by poisondeathray View Post
    No it hasn't; the logo clip used different deinterlacer. It may have been processed with other filters afterwards (like noise reduction), but I don't think blend deinterlacer was used on it

    The tell tale signs of blend deinterlacing are ghosting (double image) in your "without_logo.avi"

    Compare them in avspmod and you will see
    yes but look at his finger.. there is a double image..
    Quote Quote  
  23. Originally Posted by mathmax View Post
    Originally Posted by poisondeathray View Post
    No it hasn't; the logo clip used different deinterlacer. It may have been processed with other filters afterwards (like noise reduction), but I don't think blend deinterlacer was used on it

    The tell tale signs of blend deinterlacing are ghosting (double image) in your "without_logo.avi"

    Compare them in avspmod and you will see
    yes but look at his finger.. there is a double image..
    But this can be from other reasons, like camera shutter, motion blur, motion compensated denoisers

    Look at the majority of the frames - they are unblended in the logo clip. But the majority of the frames with motion are blended in the withoutlogo clip

    Look at the shoulder badge in the screenshots above, and the edge of mj's shoulder

    This is a contributing reason why you have difficulty matching up the mask - they've been processed differently
    Quote Quote  
  24. Originally Posted by poisondeathray View Post
    Originally Posted by mathmax View Post
    Originally Posted by poisondeathray View Post
    No it hasn't; the logo clip used different deinterlacer. It may have been processed with other filters afterwards (like noise reduction), but I don't think blend deinterlacer was used on it

    The tell tale signs of blend deinterlacing are ghosting (double image) in your "without_logo.avi"

    Compare them in avspmod and you will see
    yes but look at his finger.. there is a double image..
    But this can be from other reasons, like camera shutter, motion blur, motion compensated denoisers

    Look at the majority of the frames - they are unblended in the logo clip. But the majority of the frames with motion are blended in the withoutlogo clip

    Look at the shoulder badge in the screenshots above, and the edge of mj's shoulder

    This is a contributing reason why you have difficulty matching up the mask - they've been processed differently
    mmm.. that is strange

    interlaced
    Click image for larger version

Name:	10000.jpeg
Views:	527
Size:	237.9 KB
ID:	6710

    yadif
    Click image for larger version

Name:	20000.jpeg
Views:	501
Size:	218.4 KB
ID:	6711

    blend
    Click image for larger version

Name:	30000.jpeg
Views:	587
Size:	192.0 KB
ID:	6709


    Click image for larger version

Name:	logo0001.jpg
Views:	494
Size:	192.7 KB
ID:	6714

    the blend picture looks very like the one one the logo version... do you think this double effect is caused by something else?
    Quote Quote  
  25. Originally Posted by mathmax View Post
    the blend picture looks very like the one one the logo version... do you think this double effect is caused by something else?
    I gave you other possible reasons for the doubling effect . It's possible some blend deinterlacer was used, but the blends are way way way better than the one you used. He might have used a smart blend algorithm, only partial blends according to a motion mask, but you used a "dumb" blend algorithm, where everything is blurry and blended.

    I'm 100% certain the blend deinterlacer you used is not the best choice. Again, compare the images in avspmod you will see this clearly.
    Last edited by poisondeathray; 4th May 2011 at 21:18.
    Quote Quote  
  26. Originally Posted by poisondeathray View Post
    Originally Posted by mathmax View Post
    the blend picture looks very like the one one the logo version... do you think this double effect is caused by something else?
    I gave you other possible reasons for the doubling effect . It's possible some blend deinterlacer was used, but the blends are way way way better than the one you used. He might have used a smart blend algorithm, only partial blends according to a motion mask, but you used a "dumb" blend algorithm, where everything is blurry and blended.

    I'm 100% certain the blend deinterlacer you used is not the best choice. Again, compare the images in avspmod you will see this clearly.
    yes I can see..

    but sometimes there are double scenes transition the logo clip and not on the interlaced clip (the contrary of the above transition)... like if the fields where shuffled or something..
    Quote Quote  
  27. I post again in this topic cause I have now a new source for the version without logo.

    Just to remind you, I wanted to get rid of a logo by stacking two different sources... the challenge was that the two videos were different in term of colors, luminosity, etc.

    Now the two sources I have are:

    - source 1 : with logo - NTSC interlaced
    - source 2 : without logo - PAL interlaced

    the source 1 is much better than the source 2. I want to use the source 2 only for the ara of the logo.

    My question is how to convert the source 2 (PAL) to make it match the source 1 (NTSC) ?
    Quote Quote  
  28. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by mathmax View Post
    My question is how to convert the source 2 (PAL) to make it match the source 1 (NTSC) ?
    Code:
    clip1=AviSource("source1.avi")
    clip2=AviSource("source2.avi").AssumeFPS(clip1)
    Last edited by AlanHK; 20th Sep 2011 at 19:34.
    Quote Quote  
  29. Originally Posted by AlanHK View Post
    Originally Posted by mathmax View Post
    My question is how to convert the source 2 (PAL) to make it match the source 1 (NTSC) ?
    Code:
    clip1=avisource("C:\clip_to _change _colors_of.avi")
    clip2=avisource("C:\clip_to _match _colors_to.avi").AssumeFPS("ntsc_film")
    is that enough? I was more thinking about something like this

    Code:
    AssumeTFF() 
    KernelBob(0) 
    Lanczos4Resize(720,480) 
    ConvertFPS(59.94) 
    SeparateFields()
    SelectEvery(4,0,3)
    Weave()
    Quote Quote  
  30. Your script might possibly work, but I doubt it because PAL is rarely converted to NTSC using the method of the script (or NTSC converted to PAL using something similar). More likely it's fieldblended. We'd need short samples of both to figure it out. Samples from the same scene, scenes with steady movement, 10 seconds or so of each.
    Last edited by manono; 20th Sep 2011 at 21:30.
    Quote Quote  



Similar Threads

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