update stream parameters
This commit is contained in:
		
					parent
					
						
							
								6507d1d021
							
						
					
				
			
			
				commit
				
					
						b1778f0764
					
				
			
		
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
					@ -44,6 +44,13 @@ class CropFilter implements VideoFilterInterface
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public function apply(Video $video, VideoInterface $format)
 | 
					    public function apply(Video $video, VideoInterface $format)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        foreach ($video->getStreams()->videos() as $stream) {
 | 
				
			||||||
 | 
					            if ($stream->has('width') && $stream->has('height')) {
 | 
				
			||||||
 | 
					                $stream->set('width', $this->dimension->getWidth());
 | 
				
			||||||
 | 
					                $stream->set('height', $this->dimension->getHeight());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return array(
 | 
					        return array(
 | 
				
			||||||
            '-filter:v',
 | 
					            '-filter:v',
 | 
				
			||||||
            'crop=' .
 | 
					            'crop=' .
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue