private function getCurlProcess($video)
{
if (!shell_exec('which ' . $this->config->curl)) {
throw new \Exception('Can\'t find curl');
}
$builder = ProcessBuilder::create(array_merge([$this->config->curl, '--silent', '--location', '--user-agent', $video->http_headers->{'User-Agent'}, $video->url], $this->config->curl_params));
return $builder->getProcess();
}