Hi everybody;

I am dealing with VFR stuff and have some problems...

What I did;

-Created d2v (honor pulldown flags,demux audio), and played this avs with VirtualDub till to the end.
Code:
LoadPlugin("C:\Program Files (x86)\Media\Tools\AviSynth 2.5\plugins\DGDecode.dll")
DGDecode_mpeg2source("one_piece-544.d2v")
Trim(3649,8442) ++ Trim(10242,31250) ++ Trim(37844,54839) #Trimming out commercials
tfm(output="matches.txt")
tdecimate(mode=4, output="metrics.txt")
-After obtaining "matches.txt" and "metrics.txt" , played this avs code in my player for a second to get "mkv-timecodes.txt"
Code:
LoadPlugin("C:\Program Files (x86)\Media\Tools\AviSynth 2.5\plugins\DGDecode.dll")
DGDecode_mpeg2source("one_piece-544.d2v")
Trim(3649,8442) ++ Trim(10242,31250) ++ Trim(37844,54839)
tfm(input="matches.txt")
tdecimate(mode=5, hybrid=2, vfrDec=1, input="metrics.txt", tfmIn="matches.txt", mkvOut="mkv-timecodes.txt")
-With newly obtained obtained "mkv-timecodes.txt" I used this avs and x264 commandline command.
Code:
last.avs
LoadPlugin("C:\Program Files (x86)\Media\Tools\AviSynth 2.5\plugins\DGDecode.dll")
DGDecode_mpeg2source("one_piece-544.d2v")
Trim(3649,8442) ++ Trim(10242,31250) ++ Trim(37844,54839) 
tdeint()
Tweak(sat=1.08,cont=0.98)
Spline36Resize(1280, 720,2,0,-2,0)
---------------------------------------------------
avs4x264mod.exe --preset veryslow --crf 18 --deblock 1:0 --bframes 7 --b-adapt 2 --ref 9 --rc-lookahead 130 --merange 24 --me umh --direct auto --subme 10 --trellis 2 --tcfile-in "mkv-timecodes.txt" --output "last-encoded.mkv" "last.avs"
-Btw, I also trimmed audio file which were in sync with audio before encode.

-> When encoding finished I got 26min(2min12sec longer) and messed up video (. I wonder Which part of my doings caused this problem.