public function getM3uStream()
    {
        if (!$this->checkCommand([$this->config->avconv, '-version'])) {
            throw new Exception(_('Can\'t find avconv or ffmpeg at ').$this->config->avconv.'.');
        }

        $urls = $this->getUrl();

        $process = new Process(
            [
                $this->config->avconv,
                '-v', $this->config->avconvVerbosity,
                '-i', $urls[0],
                '-f', $this->ext,
                '-c', 'copy',
                '-bsf:a', 'aac_adtstoasc',
                '-movflags', 'frag_keyframe+empty_moov',
                'pipe:1',
            ]
        );

        $stream = popen($process->getCommandLine(), 'r');
        if (!is_resource($stream)) {
            throw new Exception(_('Could not open popen stream.'));
        }

        return $stream;
    }