feat: Add a new convertAdvanced option
It allows user to convert videos to several other audio/video formats Fixes #148
This commit is contained in:
parent
c5e3c618f2
commit
4972c8ab8e
11 changed files with 221 additions and 14 deletions
|
@ -485,7 +485,7 @@ class VideoDownloadTest extends TestCase
|
|||
}
|
||||
|
||||
/**
|
||||
* Test getPlaylistArchiveStream function without avconv.
|
||||
* Test getPlaylistArchiveStream function.
|
||||
*
|
||||
* @return void
|
||||
* @requires OS Linux
|
||||
|
@ -498,4 +498,33 @@ class VideoDownloadTest extends TestCase
|
|||
);
|
||||
$this->assertStream($this->download->getPlaylistArchiveStream($video, 'best'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test getConvertedStream function without avconv.
|
||||
*
|
||||
* @param string $url URL
|
||||
* @param string $format Format
|
||||
*
|
||||
* @return void
|
||||
* @dataProvider urlProvider
|
||||
*/
|
||||
public function testGetConvertedStream($url, $format)
|
||||
{
|
||||
$this->assertStream($this->download->getConvertedStream($url, $format, 32, 'flv'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test getConvertedStream function with a M3U8 file.
|
||||
*
|
||||
* @param string $url URL
|
||||
* @param string $format Format
|
||||
*
|
||||
* @return void
|
||||
* @expectedException Exception
|
||||
* @dataProvider m3uUrlProvider
|
||||
*/
|
||||
public function testGetConvertedStreamM3uError($url, $format)
|
||||
{
|
||||
$this->download->getConvertedStream($url, $format, 32, 'flv');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue