private function getFfmpegFormat(array $content_types)
    {
        $content_type = null;
        foreach ($content_types as $type) {
            if (in_array($type, $this->mimetypes)) {
                $content_type = $type;
                break;
            }
        }

        if ($content_type === null) {
            $this->log->info('No matching content-type, falling back to default.');
            return [$this->default_mimetype, $this->default_format];
        }

        foreach ($this->mime_to_format as $format) {
            $format_info = explode("_", $format);
            if ($format_info[0] == $content_type) {
                return [$content_type, $format_info[1]];
            }
        }
        $this->log->info('No matching content-type to format mapping, falling back to default.');
        return [$this->default_mimetype, $this->default_format];
    }