Hello,
How can I compare 2 videos, what I'm looking for is to be able to have the 2 videos open and synced, and to be able to easely swap from 1 video to another to see the differences. (mkv files) Also if possible, have to possibility of delaying one of the videos (sometimes the videos have a small intro that the other doesn't have, rest if the same)
Right now what I'm doing is opening them both in VLC, placing them on pause on the same time, then quickly unpause pause on of them to have them match the same image, when that's done I swap from one to another by placing my mouse on the miniature that shows at the bottom in the windows task bar (it shows both instances) and move the mouse right and left.
Is there a program that does that?
I saw a post in this forum that said AvsPmod could do that, sync and swap between tabs. I tried installing that (and AviSynth) but it doesn work, it says something about AviSunth plugin dir missing or wrong
Thanks in advance for any help
+ Reply to Thread
Results 1 to 17 of 17
-
Last edited by UserName351; 11th Dec 2021 at 10:50.
-
You can open both in avisynth script then use stackhorizontal() to put them side by side.
Open the script in Virtualdub2 or AvsPmod -
Try copying this, pasting it into notepad and saving it with an avs extension. Open it in MPC-HC or SMPlayer, or VirtualDub2 (not sure about VLC), and if you see colorbars you'll know Avisynth is working. If it works with one of those programs then you can look at the AvsPmod problem. You should use Avisynth+.
Code:ColorBars()
An example script. It might be easier to have both videos displaying in a single script. You'd adjust the Trim values as required to sync them up. LWLibavVideoSource is a source filter for opening videos. It requires this plugin. http://avisynth.nl/index.php/LSMASHSource
Code:A = LWLibavVideoSource("E:\Video 1.mkv").Trim(0, 0) B = LWLibavVideoSource("E:\Video 2.mkv").Trim(2, 0) StackHorizontal(A, B)
[Attachment 62313 - Click to enlarge]Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
Beaten by a couple of minutes.
Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
No it's a tie ! I had a problem with my image and had to redo it
-
My personal preference when I want to compare quality on one video to another that has been recoded with different parameters is stacked and subtracted as well as amplified. Not sure where i copied this from but I think someone here posted it.
v1=directshowsource("C:\Users\Bud\Desktop\20sec.mp 4").ConvertToYV12().lanczosresize(480,270)
v2=directshowsource("C:\Users\Bud\Desktop\news20se c.mp4").ConvertToYV12().lanczosresize(480,270)
sub = v1.subtract(v2)
substrong = sub.levels (122,1,132,0,255)
StackVertical (StackHorizontal (v1.subtitle ("original"),v2.subtitle("encoded")), StackHorizontal(sub.subtitle("Difference"),substro ng.subtitle("Difference amplified")))
[Attachment 62315 - Click to enlarge] -
Thx both, I installed AviSynt+ and it works now, tried the ColorBars() and the side by side code. However I'd like to have the videos on top of each other, and switching from one to another to see the differences easely. How can I do that ?
Also, it seems to read HEVC pretty badly, it's full of green noise (and the one is bigger than the other video)
[Attachment 62317 - Click to enlarge]
Thx I'll use that too -
StackVertical() to stack vertically. Interleave() interleave frames of each video then single step back and forth.
Note that videos must have the same height to use StackHorizontal(). They must have the same width to use StackVertical(). Both height and width must be the same to use Interleave(). You can resize, crop, or add borders to make the sizes match. Color (pixel) format must be the same for all of them. Use ConvertToYV12(), ConvertToYUY2(), ConvertBits(), etc. to convert color formats.
It looks like the program isn't handling high bit color. What program were you using to view the script? I highly recommend VirtualDub2 for viewing AVS scripts. Also, what source filter were you using? Post your script.Last edited by jagabo; 12th Dec 2021 at 09:31.
-
This is the code I used:
Code:A = LWLibavVideoSource("10bits x265 file.mkv").Trim(0, 0) B = LWLibavVideoSource("264 file.mkv").Trim(2, 0) StackHorizontal(A, B)
Both files have the save height and width (not same duration though), I tried Interleave but it returns an error (videos must be of the same size, so i guess the duration is a problem)
Also, I thing I didn't express what I wanted properly, I don't want them side by side (whether it'd be right and left or top and bottom), more and want to have the frames overlapping each other and be able to switch from one version to another, like if I had 2 instances of VLC open and switch from one and another. That way if I focus my eyes on a line and switch versions I can compare them more easely.
Edit: Just tried interleave using the same file on both A and B, didn't know I could easely switch frames, that's perfect. Now the only problem is the not reading the file correctly part. Also how could I use interleave if the files don't have the same duration?Last edited by UserName351; 12th Dec 2021 at 10:36. Reason: Just because no point posting a new answer
-
That's probably a bit depth problem. The first file name says it's 10 bit, and it's likely the second file is 8 bit. Try adding .ConvertBits(8) to the end of the first line:
Code:A = LWLibavVideoSource("10bits x265 file.mkv").Trim(0, 0).ConvertBits(8) B = LWLibavVideoSource("264 file.mkv").Trim(2, 0) StackHorizontal(A, B)
Duration isn't the problem. Are you sure the error was about size, not "image formats"?
To check the bit depth you can use Info():
Code:LWLibavVideoSource("10bits x265 file.mkv") Info()
Code:LWLibavVideoSource("264 file.mkv") Info()
Code:A = LWLibavVideoSource("10bits x265 file.mkv").Trim(0, 0) B = LWLibavVideoSource("264 file.mkv").Trim(2, 0) return(Info(A)) # or return(Info(B)) StackHorizontal(A, B)
-
Nothing changes
I checked both files, it says BitsPerComponent: 8 (I guess thats the bit depth) for both (color space YV12 for both too if that matters)
But when I use MediaInfo, I see 10bit for the 265 one and 8bit for the 264 one.
Either way, if it was 10 bit, the convert should have fixed it right?
Also the info says the 265 10bit video's info also says the width 3840 pixels. That's false, it's a 1920x1080p video.
The video is displayed twice as large than it should be too (if you look at one of my previous replies where I tested the horizontal stack I had this):
[Attachment 62317 - Click to enlarge]
Yeah, I just took the example code from an earlier answer. It's to sync the videos right? Right now the videos I'm testing don't need to be synced, I'll remove it for now
The error says this exatcly:
Interleave: videos must be of the same size.
(path.to.the.avs.file.avs, line 3)
That's the exact code that returns the error:
Code:A = LWLibavVideoSource("10bits x265.mkv") B = LWLibavVideoSource("x264.mkv") Interleave(A.Subtitle("A"),B.Subtitle("B"))
-
The error message when interleaving is because LWlibavVideoSource() is mid-identifying the width of the x265 video. How old is your LSMASHSource.dll? AviSynth version? Check with a simple script:
Code:Version()
Code:A = LWLibavVideoSource("10bits x265.mkv", format="YUV420P8") B = LWLibavVideoSource("x264.mkv", format="YUV420P8") Interleave(A.Subtitle("A"),B.Subtitle("B"))
-
I'm using an older LSmash (on XP) but from memory it's sometimes a bit odd with 10 bit video. If format="YUV420P8" doesn't fix it, give FFMS2 a spin. http://avisynth.nl/index.php/FFmpegSource
I added ConvertToYV12() too just in case.
A = FFVideoSource("E:\10bits x265 file.mkv").ConvertBits(8).ConvertToYV12().Trim(0, 0)
B = FFVideoSource("E:\264 file.mkv").ConvertToYV12().Trim(2, 0)
StackHorizontal(A, B)Avisynth functions Resize8 Mod - Audio Speed/Meter/Wave - FixBlend.zip - Position.zip
Avisynth/VapourSynth functions CropResize - FrostyBorders - CPreview (Cropping Preview) -
I downoadled the .dll today, the folder name was LSMASHSource-AviSynth-plugin-r929-msvc-64bit, the date was 24/02/2017 (maybe there's a more recent version) EDIT: Just in case I swapped with the version in the documentation (L-SMASH-Works-20210811)
Avisynth+ 3.7.0 (r3382, 3.7, x86_64)
That code worked (AvsPmod crashes, but MPC and VirtualDub work
I got another question, is it normal if the video doesn't look the same on VLC and on VirtualDub ? (minimal difference but it matters if I want to compare versions)
Look for yourself (Screens taken from VirtualDub and VLC's own screen capture feature, PrintScreen gave a bigger difference in color somehow): both are the 265 one
from VirtualDub
[Attachment 62326 - Click to enlarge]
From VLC
[Attachment 62327 - Click to enlarge]
Tried that too, with interleave, works too, but the other way works fine (well AvsPmod doesn't crash with you code though so technically it's a little better, but now I'll use VirtualDub to run the .avs scrips, the interface is better), thx anywaysLast edited by UserName351; 12th Dec 2021 at 14:34. Reason: Just cause
-
LSMASH, 2017 -- 10 bit HEVC wasn't common then so it's not surprising it wasn't handling the video properly.
I was using a ~1.5 year old version and had no problems with VirtualDub2 or Avspmod, with or without the format="YUV420P8". VLC doesn't open AVS scripts for me (it quietly ignores the open or drag/drop). Upgrading to the 20210811 version of LSMASH gave the same results; VD2 and Avspmod fine, VLC not working.
Yes, it's quite common to see small differences. In this case the video has to be converted from 10 bit to 8 bit for display (I'm assuming you're running an 8 bit display). Different programs may do that slightly differently (rounding, truncating, dithering). In addition the video is 4:2:0 chroma subsampled, meaning it has a 1920x1080 luma channel but the chroma channels are 960x540. Different programs may use different methods of scaling/positioning the chroma back up to 1920x1080 (nearest neighbor, bilinear, bicubic, etc.).
Then you have the difference between rec.601 and rec.709 colors. They will deliver slightly different colors, most noticeable in reds and greens.
https://forum.videohelp.com/threads/329866-incorrect-collor-display-in-video-playback#post2045830
Generally, SD uses rec.601, HD rec.709. But any resolution can be either spec. The video can be flagged with the color matrix (MediaInfo will usually show it if it's there). Some players/editors assume one, or the other for all videos. Some will use rec.601 for SD, rec.709 for HD. Some players will follow the flags, some not.
Then there's full range vs. limited range, rec.2020, HDR, etc.
And one of your sample images was a lossless PNG file, the other a lossy JPG file. The JPEG compression will cause some differences.
VirtualDub2 usually uses a rec.601 matrix for the color convesions. If you want to be sure you're seeing the correct colors use ConvertToRGB() at the end of your script, specifying matrix="rec601", or matrix="rec709". So for a rec.709 video:
Code:A = LWLibavVideoSource("10bits x265.mkv", format="YUV420P8") B = LWLibavVideoSource("x264.mkv", format="YUV420P8") Interleave(A.Subtitle("A"),B.Subtitle("B")) ConvertToRGB(matrix="rec709")
Code:A = LWLibavVideoSource("10bits x265.mkv", format="YUV420P8").ConvertToRGB(matrix="rec709") B = LWLibavVideoSource("x264.mkv", format="YUV420P8").ConvertToRGB(matrix="rec601") Interleave(A.Subtitle("A"),B.Subtitle("B"))
-
Alright, thx all of you for all the help.
The people in this forum are nice and helpful ;D
Yall great people
Similar Threads
-
Any tool out there to compare videos like Winmerge?
By supercain in forum Video ConversionReplies: 2Last Post: 28th Apr 2020, 20:20 -
how to take lossless screenshots from 2 x265 videos and compare them?
By batemanj in forum Newbie / General discussionsReplies: 6Last Post: 22nd May 2019, 09:43 -
looking for a tool to compare the quality of two videos
By Johannesbeere in forum Newbie / General discussionsReplies: 1Last Post: 30th Jan 2019, 05:03 -
Compare two videos
By ziggy1971 in forum Video ConversionReplies: 1Last Post: 23rd Sep 2018, 18:17 -
Best way to compare two videos (original and converted) for frame shift?
By Bencuri in forum Video ConversionReplies: 4Last Post: 27th Aug 2018, 21:06