2013-08-05 14:36:27 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace FFMpeg\Functional;
|
|
|
|
|
|
|
|
|
|
use FFMpeg\FFProbe;
|
|
|
|
|
|
|
|
|
|
class FFProbeTest extends FunctionalTestCase
|
|
|
|
|
{
|
|
|
|
|
public function testProbeOnFile()
|
|
|
|
|
{
|
|
|
|
|
$ffprobe = FFProbe::create();
|
|
|
|
|
$this->assertGreaterThan(0, count($ffprobe->streams(__DIR__ . '/../../files/Audio.mp3')));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @expectedException FFMpeg\Exception\RuntimeException
|
|
|
|
|
*/
|
|
|
|
|
public function testProbeOnUnexistantFile()
|
|
|
|
|
{
|
|
|
|
|
$ffprobe = FFProbe::create();
|
|
|
|
|
$ffprobe->streams('/path/to/no/file');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function testProbeOnRemoteFile()
|
|
|
|
|
{
|
|
|
|
|
$ffprobe = FFProbe::create();
|
2016-03-05 18:03:41 +01:00
|
|
|
$this->assertGreaterThan(0, count($ffprobe->streams('http://vjs.zencdn.net/v/oceans.mp4')));
|
2013-08-05 14:36:27 +02:00
|
|
|
}
|
|
|
|
|
}
|