public function getRtmpStream()
    {
        $urls = $this->getUrl();

        $process = new Process(
            array_merge(
                [
                    $this->config->avconv,
                    '-v', $this->config->avconvVerbosity,
                ],
                $this->getRtmpArguments(),
                [
                    '-i', $urls[0],
                    '-f', $this->ext,
                    'pipe:1',
                ]
            )
        );
        $stream = popen($process->getCommandLine(), 'r');
        if (!is_resource($stream)) {
            throw new Exception(_('Could not open popen stream.'));
        }

        return $stream;
    }