PHP Classes

File: src/PHPVideoToolkit/ImageFormat.php

Recommend this page to a friend!
  Classes of Oliver Lillie   PHP Video Toolkit   src/PHPVideoToolkit/ImageFormat.php   Download  
File: src/PHPVideoToolkit/ImageFormat.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Video Toolkit
Manipulate and convert videos with ffmpeg program
Author: By
Last change: added various input format fixes
added example about setting a custom file extension for a particular known format.
fixed small issue of whitespace
updated version in source
Date: 1 year ago
Size: 1,149 bytes
 

Contents

Class file image Download
<?php
   
   
/**
     * This file is part of the PHP Video Toolkit v2 package.
     *
     * @author Oliver Lillie (aka buggedcom) <publicmail@buggedcom.co.uk>
     * @license Dual licensed under MIT and GPLv2
     * @copyright Copyright (c) 2008-2014 Oliver Lillie <http://www.buggedcom.co.uk>
     * @package PHPVideoToolkit V2
     * @version 2.1.7-beta
     * @uses ffmpeg http://ffmpeg.sourceforge.net/
     */
    
   
namespace PHPVideoToolkit;

   
/**
     * @access public
     * @author Oliver Lillie
     * @package default
     */
   
class ImageFormat extends VideoFormat
   
{
        protected
$_max_frames_on_no_timecode = true;

        public function
updateFormatOptions(&$save_path, $overwrite)
        {
           
parent::updateFormatOptions($save_path, $overwrite);
           
            if(
$this->_type === Format::OUTPUT)
            {
                if(
$this->_max_frames_on_no_timecode === true && preg_match('/%timecode|%index|%[0-9]*d/', $save_path) === 0)
                {
                   
$this->setVideoMaxFrames(1);
                }
            }
           
            return
$this;
        }
    }