Do I need to encode video in both ogg and webm?
Probably better suited for Stackoverflow but I think its still a valid question for this SE.

Producing theora(ogg) versions of your videos is actually redundant. Any browser version supporting ogg is also supporting webm.

For questions like these I recommend using caniuse.com.
If you compare webm with ogg you quickly see that you cover the same browser versions and more with webm.
Unless you need to cover Firefox 3.5+.