I think the follow links can solve your problem.
http://en.flossmanuals.net/TheoraCookbook/FfmpegStreaming#
Lets start setting up the software you need. We will need to install the following applications:
- dvgrab
- ffmpeg2theora
- oggfwd
- cortado.jar
http://www.theora.org/cortado/
http://lists.xiph.org/pipermail/theora-dev/2010-May/004163.html