Here's the motion-compensated dirt removal function I was using for the now-defunct SWOLT project.
Warning: It cleans excellently while preserving detail, but don't use it for any shots containing stars.
Note 1: You may want to set clmodeY to 18. See the RemoveGrain manual for explanations of what the different modes do and what the ups/downs of each one are.
Note 2: It only works on clips in planar color-spaces; e.g., YV12. Furthermore, it won't clean frames at scene-changes.