View Full Version : Compare videos frame-by-frame


cartman0208
20th July 2020, 09:42
Hi All,

I'm quite new to Avisynth scripting, but I wanted to compare my reencoded videos to the original ... frame by frame.

This works great for 1080p sources:
LoadPlugin("U:\Tools\dgdecnv2053\DGDecodeNV.dll")
a=DGSource("U:\Temp\00011o.dgi",Show=true).Subtitle("O", align=2, size=30, text_color=$ffffff)
b=DGSource("U:\Temp\00011n.dgi",Show=true).Subtitle("N", align=2, size=30, text_color=$ffffff)
return interleave(a, b)


But with UHD the output looks inverted and like the red channel only (https://jammernhilftnichts.de/download/test3.jpg) ... at least with mpc-hc x64 (didn't find an other capable player yet)
Any hints?

Boulder
20th July 2020, 09:44
You're better off using something like VirtualDub2 to open such a script. Easy to jump frame by frame between the original and re-encoded result.

cartman0208
20th July 2020, 10:15
You're better off using something like VirtualDub2 to open such a script. Easy to jump frame by frame between the original and re-encoded result.

Works great :thanks:

cartman0208
20th July 2020, 22:55
Ok, followup-task... is it possible to compare AVC with HEVC videos? With interleave or any other method that lets me switch between videos?
I tried above script and get "video formats don't match"

poisondeathray
21st July 2020, 01:52
Interleave requires the same pixel format; so if using that method you can convert to a common pixel format like RGB24 (it's being converted to RGB anyways in vdub, or whatever you're using to view)

Or you can use another method like avspmod with tabs . The number keys can switch between different versions and they will all be aligned on the same frame when you navigate on the timeline. I prefer this way, because you can compare multiple versions more easily , and keep the original frame number reference

Boulder
21st July 2020, 07:29
The difference is probably in bitdepth. Convertbits(bits=16) for the AVC clip should do the trick. DGSource will output 16bit video if the source is 10bit.

cartman0208
21st July 2020, 08:48
The difference is probably in bitdepth. Convertbits(bits=16) for the AVC clip should do the trick. DGSource will output 16bit video if the source is 10bit.

:thanks: again ... Convertbits did the trick :)