| 
									
										
										
										
											2013-06-25 10:03:20 +02:00
										 |  |  | <?php | 
					
						
							|  |  |  | /* | 
					
						
							|  |  |  |  * This file is part of PHP-FFmpeg. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * (c) Alchemy <info@alchemy.fr> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * For the full copyright and license information, please view the LICENSE | 
					
						
							|  |  |  |  * file that was distributed with this source code. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | namespace FFMpeg\Media; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | use FFMpeg\Coordinate\TimeCode; | 
					
						
							| 
									
										
										
										
											2017-01-24 15:03:51 -03:00
										 |  |  | use FFMpeg\Coordinate\Dimension; | 
					
						
							| 
									
										
										
										
											2013-06-25 10:03:20 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-06 18:51:09 +02:00
										 |  |  | class Video extends AbstractVideo | 
					
						
							| 
									
										
										
										
											2013-06-25 10:03:20 +02:00
										 |  |  | { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2013-06-25 10:40:20 +02:00
										 |  |  |      * Gets the frame at timecode. | 
					
						
							| 
									
										
										
										
											2013-06-25 10:03:20 +02:00
										 |  |  |      * | 
					
						
							| 
									
										
										
										
											2013-06-26 15:17:16 +02:00
										 |  |  |      * @param  TimeCode $at | 
					
						
							| 
									
										
										
										
											2013-06-25 10:03:20 +02:00
										 |  |  |      * @return Frame | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2013-06-26 15:17:16 +02:00
										 |  |  |     public function frame(TimeCode $at) | 
					
						
							| 
									
										
										
										
											2013-06-25 10:03:20 +02:00
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2013-09-04 19:50:38 +02:00
										 |  |  |         return new Frame($this, $this->driver, $this->ffprobe, $at); | 
					
						
							| 
									
										
										
										
											2013-06-25 10:03:20 +02:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-01-24 15:03:51 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Extracts a gif from a sequence of the video. | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param  TimeCode $at | 
					
						
							|  |  |  |      * @param  Dimension $dimension | 
					
						
							|  |  |  |      * @param  integer $duration | 
					
						
							|  |  |  |      * @return Gif | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function gif(TimeCode $at, Dimension $dimension, $duration = null) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         return new Gif($this, $this->driver, $this->ffprobe, $at, $dimension, $duration); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-02-14 13:55:07 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Concatenates a list of videos into one unique video. | 
					
						
							|  |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-06-28 00:18:05 +02:00
										 |  |  |      * @param  array $sources | 
					
						
							| 
									
										
										
										
											2017-02-14 13:55:07 -03:00
										 |  |  |      * @return Concat | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function concat($sources) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         return new Concat($sources, $this->driver, $this->ffprobe); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2018-07-06 18:51:09 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * Clips the video at the given time(s). | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param TimeCode $start Start time | 
					
						
							|  |  |  |      * @param TimeCode $duration Duration | 
					
						
							|  |  |  |      * @return \FFMpeg\Media\Clip | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function clip(TimeCode $start, TimeCode $duration = null) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         return new Clip($this, $this->driver, $this->ffprobe, $start, $duration); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2013-06-25 10:03:20 +02:00
										 |  |  | } |