承接 thijsr/subtitles 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thijsr/subtitles

Composer 安装命令:

composer require thijsr/subtitles

包简介

Modification and conversion of subtitle file formats

README 文档

README

This package contains the functionality to modify subtitle files. It is currently in a beta state and therefore names as well as APIs can and probably will change.

Functionality

  • Delaying all subtitles in a file
  • Fixing a 'broken' subtitle file by restoring the numbering.

Installation

The package can be installed using the following command:

composer require thijsr/subtitles

Or by adding it to your composer.json manually:

"require": {
  "thijsr/subtitles": ">=1.0.0-beta
}

Examples

Below is a simple example of reading in a .srt file, delaying it by 3200 milliseconds and writing it to a new file.

use \ThijsR\Subtitles\SubRip;

$subrip_file _= SubRip\Reader::readFile("path/to/srt/file.srt");
SubRip\Modifier::addDelayInMs($srt_file, 3200);
SubRip\Writer::writeFile($srt_file, "new/path/to/delayed/srt/file.srt");

Sometimes srt files cannot be opened in Media Players because the numbering is not correct. This example shows a fix for this.

use \ThijsR\Subtitles\SubRip;

$subrip_file _= SubRip\Reader::readFile("path/to/srt/file.srt");
SubRip\Modifier::restoreNumbering($subrip_file);
SubRip\Writer::writeFile($srt_file, "new/path/to/delayed/srt/file.srt");

统计信息

  • 总下载量: 19
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固