Don't set ffmpeg user agent when it is reading from a pipe
This commit is contained in:
parent
959b141282
commit
8c0ed9d9f4
1 changed files with 16 additions and 13 deletions
|
@ -273,19 +273,22 @@ class VideoDownload
|
||||||
throw(new \Exception('Can\'t find avconv or ffmpeg'));
|
throw(new \Exception('Can\'t find avconv or ffmpeg'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$builder = ProcessBuilder::create(
|
$arguments = [
|
||||||
[
|
|
||||||
$this->config->avconv,
|
$this->config->avconv,
|
||||||
'-v', $this->config->avconvVerbosity,
|
'-v', $this->config->avconvVerbosity,
|
||||||
//Vimeo needs a correct user-agent
|
|
||||||
'-user_agent', $this->getProp(null, null, 'dump-user-agent'),
|
|
||||||
'-i', $url,
|
'-i', $url,
|
||||||
'-f', 'mp3',
|
'-f', 'mp3',
|
||||||
'-b:a', $this->config->audioBitrate.'k',
|
'-b:a', $this->config->audioBitrate.'k',
|
||||||
'-vn',
|
'-vn',
|
||||||
'pipe:1',
|
'pipe:1',
|
||||||
]
|
];
|
||||||
);
|
if ($url != '-') {
|
||||||
|
//Vimeo needs a correct user-agent
|
||||||
|
$arguments[] = '-user_agent';
|
||||||
|
$arguments[] = $this->getProp(null, null, 'dump-user-agent');
|
||||||
|
}
|
||||||
|
|
||||||
|
$builder = ProcessBuilder::create($arguments);
|
||||||
|
|
||||||
return $builder->getProcess();
|
return $builder->getProcess();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue