Cleaner way to add a pipe

This commit is contained in:
Pierre Rudloff 2017-12-05 21:12:59 +01:00
parent 019fc269fe
commit 0bc5120751

View file

@ -309,7 +309,7 @@ class VideoDownload
if (parse_url($video->url, PHP_URL_SCHEME) == 'rtmp') { if (parse_url($video->url, PHP_URL_SCHEME) == 'rtmp') {
$process = $this->getRtmpProcess($video); $process = $this->getRtmpProcess($video);
$chain = new Chain($process); $chain = new Chain($process);
$chain->add('|', $this->getAvconvMp3Process('-')); $chain->pipe($this->getAvconvMp3Process('-'));
$stream = popen($chain->getProcess()->getCommandLine(), 'r'); $stream = popen($chain->getProcess()->getCommandLine(), 'r');
} else { } else {