PHP Class Alltube\VideoDownload

PHP Version 5.3.10
Author: Pierre Rudloff ([email protected])
ファイルを表示 Open project: rudloff/alltube Class Usage Examples

Public Methods

Method Description
__construct ( Config $config = null ) VideoDownload constructor.
getAudioFilename ( string $url, string $format = null ) : string Get filename of audio from URL of page.
getAudioStream ( string $url, string $format ) : resource Get audio stream of converted video.
getFilename ( string $url, string $format = null ) : string Get filename of video file from URL of page.
getJSON ( string $url, string $format = null ) : object Get all information about a video.
getURL ( string $url, string $format = null ) : string Get URL of video from URL of page.
listExtractors ( ) : string[] List all extractors.

Private Methods

Method Description
addOptionsToRtmpProcess ( Symfony\Component\Process\ProcessBuilder $builder, object $video ) : Symfony\Component\Process\ProcessBuilder Add options to a process builder running rtmp.
getCurlProcess ( object $video ) : Process Get a process that runs curl in order to download a video.
getProp ( string $url, string $format = null, string $prop = 'dump-json' ) : string Get a property from youtube-dl.
getRtmpProcess ( object $video ) : Process Get a process that runs rtmp in order to download a video.

Method Details

__construct() public method

VideoDownload constructor.
public __construct ( Config $config = null )
$config Config

getAudioFilename() public method

Get filename of audio from URL of page.
public getAudioFilename ( string $url, string $format = null ) : string
$url string URL of page
$format string Format to use for the video
return string Filename of converted audio file

getAudioStream() public method

Get audio stream of converted video.
public getAudioStream ( string $url, string $format ) : resource
$url string URL of page
$format string Format to use for the video
return resource popen stream

getFilename() public method

Get filename of video file from URL of page.
public getFilename ( string $url, string $format = null ) : string
$url string URL of page
$format string Format to use for the video
return string Filename of extracted video

getJSON() public method

Get all information about a video.
public getJSON ( string $url, string $format = null ) : object
$url string URL of page
$format string Format to use for the video
return object Decoded JSON

getURL() public method

Get URL of video from URL of page.
public getURL ( string $url, string $format = null ) : string
$url string URL of page
$format string Format to use for the video
return string URL of video

listExtractors() public method

List all extractors.
public listExtractors ( ) : string[]
return string[] Extractors