src/Captioning/File.php
public function changeFPS($_old_fps, $_new_fps)
    {
        $cuesCount = $this->getCuesCount();
        for ($i = 0; $i < $cuesCount; $i++) {
            $cue = $this->getCue($i);

            $old_start = $cue->getStart();
            $old_stop  = $cue->getStop();

            $new_start = $old_start * ($_new_fps / $_old_fps);
            $new_stop  = $old_stop * ($_new_fps / $_old_fps);

            $cue->setStart($new_start);
            $cue->setStop($new_stop);
        }

        return $this;
    }
public function changeFPS($_old_fps, $_new_fps)
    {
        $cuesCount = $this->getCuesCount();
        for ($i = 0; $i < $cuesCount; $i++) {
            $cue = $this->getCue($i);

            $old_start = $cue->getStart();
            $old_stop  = $cue->getStop();

            $new_start = $old_start * ($_new_fps / $_old_fps);
            $new_stop  = $old_stop * ($_new_fps / $_old_fps);

            $cue->setStart($new_start);
            $cue->setStop($new_stop);
        }

        return $this;
    }
public function changeFPS ( $ _old_fps , $ _new_fps ) { $ cuesCount = $ this -> getCuesCount ( ) ; for ( $ i = 0 ; $ i < $ cuesCount ; $ i ++ ) { $ cue = $ this -> getCue ( $ i ) ; $ old_start = $ cue -> getStart ( ) ; $ old_stop = $ cue -> getStop ( ) ; $ new_start = $ old_start * ( $ _new_fps / $ _old_fps ) ; $ new_stop = $ old_stop * ( $ _new_fps / $ _old_fps ) ; $ cue -> setStart ( $ new_start ) ; $ cue -> setStop ( $ new_stop ) ; } return $ this ; }
Converts timecodes based on the specified FPS ratio

@param float $_old_fps
@param float $_new_fps
@return File
Converts timecodes based on the specified FPS ratio