Move container encoding method to EncodeProfile