Script error: there is no function named "mpeg2source"
you have to add:
LoadPlugin("C:\AviSynth 2.5\DGIndex\DGDecode.dll") above mpeg2source and it will work.
Of course modify it so that the directory to DGDecode.dll is correct according to where it is located on your computer.