Here is a simple way to do it: it is very fast and you can have both audio and video together.
The best is RANDOM seeking is possible.
Please d/l m2v_vfp from
http://www.marumo.ne.jp/mpeg2/m2v_vfp-0.6.38.lzh
then use Winrar to unpack it to e.g c:\m2v.
Make sure m2v.vfp and m2vconf.exe are there.
Run m2vconf.exe for your configuration.
Then use the following avs scripts to get the mpg1/mpg2 video into avisynth.
LoadVFAPIPlugin("C:\m2v\m2v.vfp", "M2VVFP")
M2VVFP("D:\mpegfiles\Mympg.mpg")
FlipVertical()
#continue after this
However, TmpgEnc at times gives error messages half way.
So the best way is to load the avs file into VirtualDub
and then frameserve to TmpgEnc.