######################################################


Project status: Abandoned
Last update: 2017/08/01

I don’t support that guide anymore and it might be outdated
Read the official documentations instead
No support for any failures and questions


What exactly does it mean?

After filtering an video, you have to actual encoding it. You need a tool like x264 or x265 for it. Here in that part we have x264 and how to use it combined with a Vapoursynth script. It’s not difficult, because most of the stuff is handled by x264 and not us. We just have to feed it with the correct parameters. Burning hardsubs into a video is technically encoding as well, but not the “encoding” fansubbers talk about. What some people also think (which is completetly wrong) is muxing the subs into an video and calling it “encoding”.


What do I need?

My Encode-Pack and removing the following checkmarks in your CMD
(Open “CMD” -> Right Click -> Options):
2016-12-13-22_17_42-windows-10-x64-vmware-workstation.png


VSPipe (Normal):
#Encode.bat
@echo off
REM -Change the values-
set vs="C:\Program Files (x86)\VapourSynth\core64\vspipe.exe"
set binary="Skripte\x264_r2762_64_CtMod-10bit-all.exe"
set script="Skripte\vsScript_anime.vpy"
set name=anime
set output="C:\Users\Misaki\Desktop\%name%.mkv"
REM set zones=--zones "2759,4912,b=0.85,deblock=3:-2/30690,32842,b=0.90,deblock=1:1"
REM set hipp=--output-csp i444 --chroma-qp-offset -4 
REM
echo Vapoursynth binary: %vs%
echo x264 Binary: %binary%
echo Vapoursynth script: %script%
echo Output directory: %output%
echo.
echo Starting...
%vs% %script% --y4m - | %binary% --demuxer y4m -o %output% - --colormatrix bt709 %hipp% --ref 16 --deblock -1:-1 --me umh --subme 10 --fade-compensate 0.00 --psy-rd 0.80:0.00 --merange 32 --trellis 2 --no-dct-decimate --bframes 16 --b-adapt 2 --direct auto --slow-firstpass --no-fast-pskip --keyint 240 --min-keyint 24 --rc-lookahead 48 --crf 14 --qcomp 0.70 --aq-mode 3 --aq-strength 0.85 %zones%
Optional part, if you want keyframes:
echo FFvideosource(%output%) > "%name%_keyframes.avs"
echo SCXvid("%name%_keyframes.log") >> "%name%_keyframes.avs"
AVSMeter "%name%_keyframes.avs"
del "%name%_keyframes.avs"
del "%output%.ffindex"

Yuuno:
%encode your_last_variable --y4m x264.2851kMod.10bit.x86_64.exe --demuxer y4m --frames {len(your_last_variable)} --colormatrix bt709 --ref 16 --deblock -1:-1 --me umh --subme 10 --fade-compensate 0.00 --psy-rd 0.70:0.10 --merange 32 --trellis 2 --no-dct-decimate --bframes 16 --b-adapt 2 --direct auto --slow-firstpass --no-fast-pskip --keyint 240 --min-keyint 24 --rc-lookahead 48 --crf 14 --qcomp 0.70 --aq-mode 3 --aq-strength 0.80 --partitions all --output encode.mkv -

Add a Queue (only works with VSPipe):
#Queue.bat
CD "C:\Users\Misaki\Desktop\Encode-Pack"
call "C:\Users\Misaki\Desktop\Encode-Pack\Encode1.bat"

CD "C:\Users\Misaki\Desktop\Encode-Pack"
call "C:\Users\Misaki\Desktop\Encode-Pack\Encode2.bat"

CD "C:\Users\Misaki\Desktop\Encode-Pack"
call "C:\Users\Misaki\Desktop\Encode-Pack\Encode3.bat"

timeout /t 60

Notes:

You maybe want to change the x264 parameters.
Remove “REM” for optional stuff like “zones” or “hipp”.
“hipp” activates Hi444PP encoding.


Recommended values for anime:
--colormatrix bt709 = Only force it with modern BDs or TVs
--ref 16 = Value range: 12 - 16
--deblock -1:-1 = First value range: 0 - -2; Second value range: -1 - -2
--me umh = umh or tesa
--subme 10 = Value range: 10 - 11
--fade-compensate 0.0 = *
--psy-rd 0.70:0.10 = First value range: 0.60-0.90; Second value range: 0.00-0.20
--merange 32 = Value range: 24 - 96
--trellis 2 = *
--no-dct-decimate = *
--bframes 16 = Value range: 10 - 16
--b-adapt 2 = *
--direct auto = *
--slow-firstpass = *
--no-fast-pskip = *
--keyint 240 = *
--min-keyint 24 = *
--rc-lookahead 48 = Value range: 40 - 80
--crf 14 = Value range: 12 - 19
--qcomp 0.7 = Value range: 0.6 - 0.9
--aq-mode 3 = *
--aq-strength 0.8 = Value range: 0.6 - 1.2
--partitions all  = *

* = Leave it like that
Bold = Depending on the source
Some other recommendations:

deblock: -2:-2 (BD) -1:-1 (WEB) 0:-1 (MPEG2)
crf: 15 (BD) 17 (WEB) 19 (MPEG2)
psy-rd: 0.8:X (BD) 0.7:X (WEB) 0.6:X (MPEG2)
psy-rd: X:0.0 (Clean) X:0.1 (Grain)
aq-strength: 0.6 (Grain) 0.75 (Normal) 0.9 (Static grain)

You can find more information HERE and HERE.

Advertisements