private function timecode($timestamp) { return (int) ((int) $timestamp * 1000 / ($this->getPeriod() * 1000)); }