rework maxvid generic encoder logic to use a NSMutableData buffer instead of writing to a file, this is required in order to invoke the emitter logic in the iOS client