Added default codec options and multiple output support. Lots of other fixes