This guide assumes you already have and are using the following programs:
AviSynth (AviSynth plugins)
AvsPMod
FFMpegSource
DGIndex
BluRay/HDDVD/HDTV
Basic Script
1. Open AvsPMod and copy and paste in this script and save it. Open a new avs file and paste this in it:
Code
FFVideosource("C:\Path\to\Remux.mkv") #Replace with the path of the source
Crop(2, 2, -2, -2) #use the cropping values you used for the encode - crop(left, up, -right, -down)
Spline36Resize(1024,556) #final width and height of the encode
2. Save that script as source.avs , it will be used for the next script.
Code
a=import("C:\Path\To\source.avs").subtitle("Source", align=9) #path to the first avisynth script
b=ffvideosource("C:\Path\To\encode.mkv").subtitle("Encode", align=9)
ffinfo(true,true,false,false)
interleave(a,b)
Pastebin
3. Hit F5 and AvsP will appear to freeze. This is normal while FFVideoSource is indexing the video. After indexing, you will see duplicate frames in the preview pane. Even numbered frames are from the source and the following odd numbered frames are from the encode. Navigate to the frames you wish to take screenshots of and right click in the preview pane to save your images as PNGs.
Result
Source:
http://thumbnails115.imagebam.com/51912/b4fc67519118600.jpg Encode:
http://thumbnails115.imagebam.com/51912/284ef0519118602.jpg
DVD/VHS
Basic Script
1. Open AvsPMod and copy and paste in this script and save it. Open a new avs file and paste this in it:
Code
Mpeg2Source("C:\Path\to\dgindex.d2v", info=0) #info=0 or info=1 turns off or on the frame information overlay
Crop(2, 2, -2, -2) #use the cropping values you used for the encode - crop(left, up, -right, -down)
2. Save that script, it will be used for the next script. Save it as dvdsource.avs for example.
Code
a=import("C:\Path\To\dvdsource.avs").subtitle("Source", align=9)
b=ffvideosource("C:\Path\To\encode.mkv").subtitle("Encode", align=9)
a=a.ffinfo(framenum=true,frametype=false,cfrtime=false,vfrtime=false,version=false,cropping=false,colorrange=false,colorspace=false,sar=false)
b=b.ffinfo(framenum=true,frametype=true,cfrtime=false,vfrtime=false,version=false,cropping=false,colorrange=false,colorspace=false,sar=false)
interleave(a,b)
spline36resize(converttorgb,ffsar>1?round(width*ffsar):width,ffsar<1?round(height/ffsar):height)
Pastebin
Important note: ffinfo can not detect frame types of DVDs correctly, which is why they are not displayed in this script. The info=1 part shows the real frame type, but it shows too much text over the screenshot (example), that's why you might want to disable or enable it.
4. Hit F5 and AvsP will appear to freeze. This is normal while FFVideoSource is indexing the video. After indexing, you will see duplicate frames in the preview pane. Even numbered frames are from the source and the following odd numbered frames are from the encode. Navigate to the frames you wish to take screenshots of and right click in the preview pane to save your images as PNG.
Result
Source:
http://thumbnails115.imagebam.com/51912/31940b519118604.jpg Encode:
http://thumbnails115.imagebam.com/51912/5a7ba5519118606.jpg
Other
Common Errors
Plugins won't load
Add these lines to the top of your script, pointing towards FFMS2.avsi and ffms2.dll in your directory respectively:
Code
import("C:\Program Files\AviSynth\plugins64\FFMS2.avsi")
LoadPlugin("C:\Program Files\AviSynth\plugins64\ffms2.dll")
Source and Encode are off by one frame
Handbrake sometimes drops the first frame so the resulting encode may be one frame shorter. To realign it with the source again, append .trim(1,framecount) at the end of the source import line, e.g. Code
a=import("C:\Path\To\source.avs").subtitle("Source", align=9).trim(1,framecount)
Encode has a different frame rate than Source
put Code
ChangeFPS("ntsc_film")
in your source.avs or Code
a=a.ChangeFPS("ntsc_film")
in the main avs file.
Change the frame rate accordingly to whatever different frame rate you are facing. AvsPMod will present you options.
Test Encodes
The script can be altered to be a very powerful tool when comparing screenshots from several different test encodes to the source.
You can see we've input the source and three test encodes with varying CRF values, labeled them accordingly with Subtitle, and interleaved them in a way that allows a forward progressing comparison to the source...
Code
a=import("C:\Path\To\source.avs").subtitle("Source", align=9)
b=ffvideosource("C:\Path\To\test1.mkv").subtitle("Test Encode 1 CRF 18", align=9)
c=ffvideosource("C:\Path\To\test2.mkv").subtitle("Test Encode 2 CRF 17", align=9)
d=ffvideosource("C:\Path\To\test3.mkv").subtitle("Test Encode 3 CRF 16", align=9)
interleave(a,b,a,c,a,d)
spline36resize(converttorgb,ffsar>1?round(width*ffsar):width,ffsar<1?round(height/ffsar):height)
ffinfo(framenum=true,frametype=true,cfrtime=false,vfrtime=false)
Pastebin
Result
Source:
http://thumbnails116.imagebam.com/51912/f35c99519119166.jpg
Test Encode CRF 17:
http://thumbnails116.imagebam.com/51912/861aa4519119170.jpg
Source Again:
http://thumbnails116.imagebam.com/51912/f35c99519119166.jpg
Test Encode 2 CRF 16:
http://thumbnails115.imagebam.com/51912/875020519119171.jpg
Moving Text Position
You can move the position of your text you add ("Source", "Encode", "[Encoding Group]", etc.) by editing the align factor.
With align=1 until align=9 define the positioning at corners or at the middle.
With y= or x= you move the text on the y or x axis respectively.
Use align=7, y=35 for example to display the text right under the frame type.
Adding Colors
Open ffms2.avsi and replace it with
http://pastebin.com/zhm8RdwS.
Now you can edit your script to display your text with colors.
Example Script Wrote:
Code
a=import("path\to\source.avs").subtitle("Source", align=9)
b=FFVideoSource("path\to\encode.mkv").subtitle("Encode",text_color=$cccccc,halo_color=$0b5394,align=9)
a=a.ffinfo(framenum=true,frametype=true,cfrtime=false,vfrtime=false)
b=b.ffinfo(framenum=true,frametype=true,cfrtime=false,vfrtime=false,text_color=$0b5394,halo_color=$cccccc)
interleave(a,b)
--------------------------------------
Threads
Create a new comparison thread for each season of each show. Title should be:
[Comparisons] Series Name Season # eg: "[Comparisons] Archer (2009) Season 7"
or: [Comparisons] Series Name S## eg: "[Comparisons] Archer (2009) S01"
This should be the series name on BTN. Note that this may mean (US) or (2017) is part of the series name.
Comparison Guidelines
Tutorial for basic comparisons with AvsPmod: forums.php?action=viewthread&threadid=21986
When posting comparisons, include your opinion of relative quality (eg "WEBRip > WEB-DL > Scene HDTV"). This makes it easier to collect quick summaries for lists, or for casual readers who don't want to click-and-compare for themselves
Use .png only.
Comparisons should only be made between B-Frames*
Frame type must be indicated on every screenshot.
Source, Resolution and Release Group must be indicated--either as the title for a group of screens, or (preferably) as a subtitle burned into each screenshot. eg:
.subtitle("HDTV 720p (DIMENSION)", align=9) # (top right corner)
.subtitle("Amazon 1080p (DRACULA)", align=8) # (top center)
.subtitle("Hulu 720p (NTb)", y=130, align=7) # (top left + down 130px)
.subtitle("MTV 1080p (BTW)", x=8, y=130) # (8px from left, 130px from top)
.subtitle("iPlayer 720p (RTN)", 8, 130) # (8, 130)px from top left
If there's possible ambiguity between WEB-DL/WEBRip (or untouched & encoded WEBRips), then make that clear too. eg:
.subtitle("Amazon 1080p Untouched (CasStudio)", 8, 130) # (Untouched WEBRip, aka WEB-DL)
.subtitle("Amazon 1080p (ViSUM)", 8, 130) # (encoded WEBRip is assumed
^ This is where we'll get bitten by BTN's overlapping meanings for WEBRips, but "Untouched" is probably the best description we can use for now.
Lower-resolution screens must be resized to match the highest resolution, using Spline36Resize. If a set of images has a different crop or a different aspect ratio, add black borders to compensate. eg:
Spline36Resize(1918, 1078,-1, -1).AddBorders(0, 0, 2, 2).ConverttoRGB()
*NB: Exceptions to "only B-Frames" can be made when comparing many formats. If there's an existing set of comparisons and a new source is added later, some screens may align on non-B-Frames. Just use your judgment: if the new source also looks like the best, then it may be useful to create a new comparison. Choose a new set of frames and compare it with the next best.