Fix #46 : A/V synchronization works on flash player, not on html5 one

This commit is contained in:
Romain Neutron 2013-08-07 19:44:01 +02:00
commit 543d9aaeaf
3 changed files with 7 additions and 69 deletions

View file

@ -39,32 +39,6 @@ class SynchronizeFilter implements VideoFilterInterface
*/
public function apply(Video $video, VideoInterface $format)
{
$streams = $video->getStreams();
if (null === $videoStream = $streams->videos()->first()) {
return array();
}
if (!$videoStream->has('start_time')) {
return array();
}
$params = array(
'-itsoffset',
$videoStream->get('start_time'),
'-i',
$video->getPathfile(),
);
foreach ($streams as $stream) {
if ($videoStream === $stream) {
$params[] = '-map';
$params[] = '1:' . $stream->get('index');
} else {
$params[] = '-map';
$params[] = '0:' . $stream->get('index');
}
}
return $params;
return array('-async', '1');
}
}