1
0
mirror of https://github.com/Rudloff/alltube.git synced 2024-06-26 07:29:06 +02:00

fixup! fix: Don't use the $url property

This commit is contained in:
Pierre Rudloff 2019-04-21 22:40:54 +02:00
parent 97a7830196
commit 4db519c2ef

View File

@ -354,6 +354,8 @@ class Video
$afterArguments[] = $to; $afterArguments[] = $to;
} }
$urls = $this->getUrl();
$arguments = array_merge( $arguments = array_merge(
[ [
$this->config->avconv, $this->config->avconv,
@ -361,7 +363,7 @@ class Video
], ],
$this->getRtmpArguments(), $this->getRtmpArguments(),
[ [
'-i', $this->getUrl(), '-i', $urls[0],
'-f', $filetype, '-f', $filetype,
'-b:a', $audioBitrate.'k', '-b:a', $audioBitrate.'k',
], ],
@ -428,11 +430,13 @@ class Video
throw new Exception(_('Can\'t find avconv or ffmpeg at ').$this->config->avconv.'.'); throw new Exception(_('Can\'t find avconv or ffmpeg at ').$this->config->avconv.'.');
} }
$urls = $this->getUrl();
$process = new Process( $process = new Process(
[ [
$this->config->avconv, $this->config->avconv,
'-v', $this->config->avconvVerbosity, '-v', $this->config->avconvVerbosity,
'-i', $this->getUrl(), '-i', $urls[0],
'-f', $this->ext, '-f', $this->ext,
'-c', 'copy', '-c', 'copy',
'-bsf:a', 'aac_adtstoasc', '-bsf:a', 'aac_adtstoasc',
@ -495,6 +499,8 @@ class Video
*/ */
public function getRtmpStream() public function getRtmpStream()
{ {
$urls = $this->getUrl();
$process = new Process( $process = new Process(
array_merge( array_merge(
[ [
@ -503,7 +509,7 @@ class Video
], ],
$this->getRtmpArguments(), $this->getRtmpArguments(),
[ [
'-i', $this->getUrl(), '-i', $urls[0],
'-f', $this->ext, '-f', $this->ext,
'pipe:1', 'pipe:1',
] ]