Allow to set bframe support in a format
This commit is contained in:
		
					parent
					
						
							
								72d7a8c236
							
						
					
				
			
			
				commit
				
					
						634e67d7ec
					
				
			
		
					 1 changed files with 16 additions and 1 deletions
				
			
		|  | @ -16,11 +16,15 @@ namespace FFMpeg\Format\Video; | |||
|  */ | ||||
| class X264 extends DefaultVideo | ||||
| { | ||||
|     /** @var boolean */ | ||||
|     private $bframesSupport; | ||||
| 
 | ||||
|     public function __construct($audioCodec = 'libfaac', $videoCodec = 'libx264') | ||||
|     { | ||||
|         $this | ||||
|             ->setAudioCodec($audioCodec) | ||||
|             ->setVideoCodec($videoCodec); | ||||
|         $this->bframesSupport = true; | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  | @ -28,7 +32,18 @@ class X264 extends DefaultVideo | |||
|      */ | ||||
|     public function supportBFrames() | ||||
|     { | ||||
|         return true; | ||||
|         return $this->bframesSupport; | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * @param $support | ||||
|      * @return X264 | ||||
|      */ | ||||
|     public function setBFramesSupport($support) | ||||
|     { | ||||
|         $this->bframesSupport = $support; | ||||
| 
 | ||||
|         return $this; | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue