Download the PHP package saeven/subtitles without Composer

On this page you can find all versions of the php package saeven/subtitles. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package subtitles

Caption And Subtitle Converter for PHP

Convert and edit subtitles and captions.

Supported formats

Format Extension
SubRip .srt
WebVTT .vtt
Youtube Subtitles .sbv

WebVTT cue settings

WebVTT timing lines support the align, line, position, size, vertical, and region cue settings. Settings are validated against the WebVTT cue setting syntax and preserved when writing VTT, including after shifting cue times. Spaces and tabs are accepted as separators. For example:

Validation uses the current authoring syntax: align:middle is rejected; use align:center instead. Unknown or repeated settings, invalid values, and percentages outside 0–100 are also rejected. Empty cues are validated and then omitted. Converting to SRT or SBV retains timing and text but omits VTT settings. This support covers settings on cue timing lines; it does not add support for REGION or STYLE definition blocks.

Installation

Fork Notes

This package was forked from mantas-done/subtitles (thank you) to become more opinionated, to implement strict types and new interfaces, and to implement proper PSR-4 loading. What's more, this version of that package removes all ability to manipulate files directly or to attempt to infer the existence of converters by scanning the filesystem with file_exists and so forth. It also resorts to pattern matching in cases where the original implementation would split strings. Lastly, it adds Carbon to perform time conversions.

Usage

Convert .srt content to .vtt:

Manually create VTT

Load subtitles from string

Get file content without saving to file

Add subtitles

`

Remove subtitles

Add 1 second to all subtitles

Subtract 0.5 second

Add 5 second to subtitles starting from 1 minute till 2 mintes

Example: shift time gradually by 2 seconds over 1 hour video. At the beginning of the video don't change time, in the middle shift time by 1 second. By the end of video, shift time by 2 seconds.

"Internal Format"

"Internal Format" is just a PHP array. It is used internally in library to be able to convert between different formats.

Running Tests

Contribution

Not all original converters from the fork have been corrected. Feel free to convert one from the 'todo' folder and open a PR!

Report Bugs

If some file is not working with the library, please create and issue and attach the file.


All versions of subtitles with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4.0 || ~8.0.12 || ~8.1.0 || ~8.2.0
nesbot/carbon Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package saeven/subtitles contains the following files

Loading the files please wait ...