I have never tried to do this so I am sure I am doing something wrong, but I have no idea what. It shows in the preview window but not in the final animation.
Images used as background in the 3D viewport are used for reference only and will not render unless you choose to combine them with the scene using the compositor.
Open a Node Editor window. Add a movie clip node and select your video clip. Set the movie clip to be used as the background input on an Alpha Over node and plug the render layers as foreground.
For Blender Render the setup is like this:
Make sure that the compostitng box is checked: