Create same effect in pipes?

I want to have the same effect as in this video at 4:23 where stuff moves through the pipe.

What is the best way to do this?

You could animate the taper on a beveled curve. There’s a concise tutorial on the technique here: http://vimeo.com/16744767