Fix #46 : A/V synchronization works on flash player, not on html5 one
This commit is contained in:
parent
8bd6700377
commit
543d9aaeaf
3 changed files with 7 additions and 69 deletions
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue