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,
|
'-i', $url,
|
||||||
//Vimeo needs a correct user-agent
|
'-f', 'mp3',
|
||||||
'-user_agent', $this->getProp(null, null, 'dump-user-agent'),
|
'-b:a', $this->config->audioBitrate.'k',
|
||||||
'-i', $url,
|
'-vn',
|
||||||
'-f', 'mp3',
|
'pipe:1',
|
||||||
'-b:a', $this->config->audioBitrate.'k',
|
];
|
||||||
'-vn',
|
if ($url != '-') {
|
||||||
'pipe:1',
|
//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