classes/Video.php
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;
    }
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;
    }
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 ; }
Get video stream from an RTMP video.

@throws Exception If the popen stream was not created correctly

@return resource popen stream
Get video stream from an RTMP video .