1. A method of encoding a media stream, comprising: receiving a media stream into an encoder that includes a pipeline of multiple hardware stages for encoding; outputting an intermediate result from at least one of the hardware stages; reading the intermediate result into an encoding control module and processing the intermediate result to determine configuration instructions for a next hardware stage in the pipeline; and providing the determined configuration instructions to the next hardware stage in the pipeline.