m6web/timecode
最新稳定版本:v1.0.0
Composer 安装命令:
composer require m6web/timecode
包简介
Lib allowing to deal with timecode manipulation
README 文档
README
Tiny PHP library to deal with (SMPTE) timecode through Timecode object representation.
Installation
composer require m6web/timecode
Usage
<?php require __DIR__.'/vendor/autoload.php'; use M6Web\Component\Timecode\Timecode; // Let's say we want to create a timecode corresponding to 9hours, 2minutes, 0seconds and 3frames with a framerate of 25 (which is the default framerate btw) // We could either create it like any other PHP objects $timecode = new Timecode(9, 2, 0, 3, 25); // hours, minutes, seconds, frames, framerate // Or simply using its string representation $timecode = Timecode::createFromString('09:02:00:03', 25); // Or even using its total number of frames $timecode = Timecode::createFromNumberOfFrames(813003, 25); // Now let's say we want to subtract 5hours from our timecode $resultTimecode = $timecode->sub(new Timecode(5, 0, 0, 0)); $resultTimecode->getHours(); // 4 $resultTimecode->getMinutes(); // 2 $resultTimecode->getSeconds(); // 0 $resultTimecode->getFrames(); // 3 echo $resultTimecode; // '04:02:00:03'
统计信息
- 总下载量: 118.36k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-05-16