VideoHelp Forum




+ Reply to Thread
Results 1 to 16 of 16
  1. On a previous project one of the knowledgeable guys here provided a small script to compare 2 files side by side.

    This would be really useful for me for colour, sharpness, contrast improvements etc.
    Just thought I'd check if there was a better/simpler approach ..... as a test I put the same file into the script - just renamed different, assumed I'd see same on right & left side in VD .. and there is a very definite colour changes between the 2 videos ? ........
    Is there a way to show 2 clips side by side without introducing an colour changes?


    a=avisource("E:\test\sample.avi").Trim(2,106)+avis ource("E:\test\sample.avi").Trim(113,307)
    b=avisource("E:\test\sample2.avi")
    a=a.crop(16,16,-16,-16).assumetff().Bob().Subtitle("restored")
    b=b.crop(24,16,-8,-16).assumebff().Bob().Subtitle("original")
    stackhorizontal(b,a)
    c=last
    converttorgb(matrix="PC.601")
    Image Attached Files
    Quote Quote  
  2. Formerly 'vaporeon800' Brad's Avatar
    Join Date
    Apr 2001
    Location
    Vancouver, Canada
    Search PM
    Replace StackHorizontal with Interleave to see them one after the other instead of next to each other. Probably you're just viewing on an LCD monitor with bad viewing angles.
    Quote Quote  
  3. It's not just viewing angle ... every frame .. the right hand side is different colour balance to the left, ... look at this screen grab:
    Image Attached Thumbnails Click image for larger version

Name:	screen grab.jpg
Views:	235
Size:	181.7 KB
ID:	35599  

    Quote Quote  
  4. You're not looking at the same frame from each video. The color of the original video is varying from frame to frame. Remove the two Trims from the first line of the script.
    Quote Quote  
  5. I don't follow ...
    If I step through 1 at a time ..
    Every right hand side view has more colour than left as shown in example.
    Same if I run the video.
    I will try changing the trim lines tomorrow.
    Last edited by Tafflad; 10th Feb 2016 at 05:25.
    Quote Quote  
  6. Originally Posted by Tafflad View Post
    I don't follow ...
    You should. When doing side-by-side tests like that it's pretty important that you compare the same frames of the two versions. Just looking at the picture you can easily see the top of guy's head in the left pic is at the horizon line, while in the right pic it's noticeably below the horizon line. Different frames.

    This isn't to disagree with your conclusion (right has 'more color' than the left), but only to mention that you should be making true comparisons.
    Quote Quote  
  7. Sorry - I understand that, and you are right comparing same frame is important ........ what I meant was that for the 'issue' I'm seeing here it made no difference what frame I was looking at .. either frame by frame or when ;run' the right is always different colour to the left ... markedly so.
    Last edited by Tafflad; 10th Feb 2016 at 10:29.
    Quote Quote  
  8. I use stacking and interleaving all the time and have NEVER had such a problem. You've made a mistake somewhere along the line.

    The different frame issues has already been covered. If the colors are changing frame to frame you would expect to see different colors in the two videos.

    The cropping is different. More is being cropped off the left of b. Since the video has a green tinge on the left, smoothly changing to a pink tinge on the right, you expect b to have less green.

    Check again that sample.avi and sample2.avi are really the same file.

    Change the script so that it opens sample.avi twice rather than two different videos -- that way you can be absolutely sure you are viewing the same video.

    One video is ussing AssumeTFF(), the other AssumeBFF(). Then both are bobbed. If the two fields are different colors (very common with video tape and with PAL video) you will see different colors. Not to mention one of the videos will have jerky movement.

    And "c=last" does nothing.
    Quote Quote  
  9. Originally Posted by jagabo View Post
    You're not looking at the same frame from each video. The color of the original video is varying from frame to frame. Remove the two Trims from the first line of the script.
    Removed the trim commands ... scipt is now reduced to:
    a=avisource("E:\test\sample.avi")
    b=avisource("E:\test\sample2.avi")
    a=a.crop(16,16,-16,-16).assumebff().Bob().Subtitle("restored")
    b=b.crop(24,16,-8,-16).assumebff().Bob().Subtitle("original")
    stackhorizontal(b,a)
    c=last
    converttorgb(matrix="PC.601")
    There is still a significant colour change on the processed frames ... whether you look frame by frame or run the video.

    What is causing that, and importantly how can I get to an accurate side by side compare.
    Sort of assuming it must be that the 'converttorgb line' is doing this .............. if this is incorrect approach what should I be changing colour space to ? original is YUV
    Last edited by Tafflad; 10th Feb 2016 at 07:31.
    Quote Quote  
  10. See post #8. Especially the field order part.
    Quote Quote  
  11. I had noticed the field order and corrected in in post #9 ... but thanks for pointing it out anyway.

    Opening same file twice ... didn't know it would allow that hence creating a copy with different name.

    a=avisource("E:\test\samplex.avi")
    b=avisource("E:\test\samplex.avi")

    a=a.crop(16,16,-16,-16).assumebff().Bob().Subtitle("restored")
    b=b.crop(24,16,-8,-16).assumebff().Bob().Subtitle("original")
    stackhorizontal(b,a)
    c=last

    converttorgb(matrix="PC.601")
    When I look at it the right hand still seems to have a colour cast .. maybe it is just the way the image is ... or an optical confusion for me.

    Click image for larger version

Name:	grab again.jpg
Views:	127
Size:	131.8 KB
ID:	35631
    Quote Quote  
  12. If there is any better way of showing 'before & after' side by side please feel free to tell me.
    Quote Quote  
  13. The colors in your two images are the same. Here I've cropped they arms/hands and set them next to each other:

    Name:  comp.png
Views: 397
Size:  76.6 KB

    Otherwise... The frame has a green tinge on the left, changing to a blue tinge on the right. That alone gives the illusion that the colors are different. And as I indicated before, since you are cropping differently you literally get more of the green in one of the images. Make the cropping the same. Also try using Interleave(a,b) instead of StackHorizontal(). That shows the videos one after another (frame by frame) rather than side by side. That is the best way to see subtle differences. Another method you can use is Subtract(a,b) -- that gives a flat grey image where the frames are identical and deviations from grey where they are not. It often helps to follow Subtract() with something like Levels(120,1,136,0,255) to accentuate the differences.
    Last edited by jagabo; 10th Feb 2016 at 08:48.
    Quote Quote  
  14. Just unlucky - the swing from Green to Blue made images look as if there was marked colour change ........ certainly fooled me

    Thanks for your help
    Quote Quote  
  15. those optical illusions are always present while doing this side by side comparisons trying to match videos or images, if colors are not consistent, if you want to be sure you have to cancel out whatever our brain changes, so you just cover parts by piece of paper to revel only parts you want to see, or swap those videos, instead of stackhorizontal(b,a) try stackhorizontal(a,b) , if seeing the same, it is an illusion ...
    Quote Quote  
  16. Originally Posted by _Al_ View Post
    those optical illusions are always present while doing this side by side comparisons trying to match videos or images, if colors are not consistent, if you want to be sure you have to cancel out whatever our brain changes, so you just cover parts by piece of paper to revel only parts you want to see, or swap those videos, instead of stackhorizontal(b,a) try stackhorizontal(a,b) , if seeing the same, it is an illusion ...
    I leant by this .. not to trust what I see
    Quote Quote  



Similar Threads

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