choose code version based on contents.  start encoding bitstream.