![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/rentpix.corals.io/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/ |
<?php namespace FFMpeg\Media; use FFMpeg\Coordinate\TimeCode; use FFMpeg\Driver\FFMpegDriver; use FFMpeg\FFProbe; use FFMpeg\Format\FormatInterface; /** * Video clip. * * Use input seeking, see http://trac.ffmpeg.org/wiki/Seeking */ class Clip extends Video { /** @var TimeCode Start time */ private $start; /** @var TimeCode Duration */ private $duration; /** @var Video Parrent video */ private $video; public function __construct(Video $video, FFMpegDriver $driver, FFProbe $ffprobe, TimeCode $start, TimeCode $duration = null) { $this->start = $start; $this->duration = $duration; $this->video = $video; parent::__construct($video->getPathfile(), $driver, $ffprobe); } /** * Returns the video related to the frame. * * @return Video */ public function getVideo() { return $this->video; } /** * Return base part of command. * * @return array */ protected function basePartOfCommand(FormatInterface $format) { $arr = ['-y', '-ss', (string) $this->start, '-i', $this->pathfile]; if (false === is_null($this->duration)) { $arr[] = '-t'; $arr[] = (string) $this->duration; } return $arr; } }