public function encode($source, $preset)
    {
        // Tell the Zencoder SDK to create a job
        try {
            $outputs = $this->outputsConfig($preset);
            $job = $this->sdk()->jobs->create([
                'input' => $source,
                'output' => $outputs,
            ]);

            // Store the response from the SDK
            $this->model->storeJob($job->id, $this->outputsToHash($job->outputs));

        // Report an error with the encode
        } catch (Services_Zencoder_Exception $e) {
            $this->model->status('error', implode(' ', $this->zencoderArray($e->getErrors())));
        } catch (Exception $e) {
            $this->model->status('error', $e->getMessage());
        }
    }