Download the PHP package ymakhloufi/subtitle-toolbox without Composer

On this page you can find all versions of the php package ymakhloufi/subtitle-toolbox. 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 subtitle-toolbox

[!CAUTION]

This package is abandoned

ymakhloufi/subtitle-toolbox gets no more releases. This repository is a read-only archive of its 1.x and 2.x versions.

The project continues as yama6a/subtitle-toolbox-php:

Never install both packages together. They share the SubtitleToolbox\ namespace.

Subtitle Toolbox

Packagist version CI

A PHP library and command line tool that reads, edits and writes subtitles, transcripts and chapter lists in more than 30 formats.

Upgrading from 1.x? See the upgrade guide.

Install

From 3.0, the package continues as yama6a/subtitle-toolbox-php. Never install both packages together.

The core package needs neither OCR engine. See ocr.md for the install commands of other systems and languages.

The library needs PHP 8.2 or later with ext-dom and ext-iconv. These extensions are optional:

The command line tool also comes as a PHAR file and as two container images. The -tesseract image includes Tesseract for OCR. See Install without Composer for the commands.

Supported formats

Format Case Name Extensions Read Write Notes
ASS, SSA Ass ass .ass, .ssa yes yes
CSV, TSV Csv, Tsv csv, tsv .csv, .tsv yes yes not detected from the content
EBU STL EbuStl stl .stl yes yes binary, 25 or 30 fps
iTunes Timed Text Itt itt .itt yes yes needs a frame rate to write
LRC Lyrics lrc .lrc yes yes with enhanced LRC word times
MicroDVD MicroDvd microdvd .sub yes yes needs the frame rate of the video
MPL2 Mpl2 mpl2 .txt yes yes
MPSub MpSub mpsub .mpsub yes yes
SAMI Sami sami .smi, .sami yes yes one language class per parse
SBV Sbv sbv .sbv yes yes
SCC Scc scc .scc yes yes CEA-608 closed captions
SubRip SubRip srt .srt yes yes
SubViewer 1 and 2 SubViewer subviewer .sub yes yes
TMPlayer TmPlayer tmplayer .txt yes yes
TTML, IMSC, DFXP Ttml ttml .ttml, .dfxp, .xml yes yes
WebVTT WebVtt vtt .vtt yes yes also chapters
PGS Pgs pgs .sup yes yes Blu-ray bitmaps as image cues
VobSub VobSub vobsub .idx with .sub yes no DVD bitmaps as image cues
JSON of this library Json json .json yes yes
Plain text PlainText txt .txt no yes transcript
Whisper JSON Whisper whisper .json yes no OpenAI API, openai-whisper, faster-whisper, WhisperX, whisper.cpp
Cloud speech-to-text JSON AwsTranscribe, Deepgram, AssemblyAi, GoogleSpeech aws-transcribe, deepgram, assemblyai, google-speech .json yes no not detected from the content
YouTube timed text YouTubeTimedText youtube .json3, .srv3, .srv1 yes no json3, srv1, srv2, srv3 and transcript XML
Podcasting 2.0 transcript JSON PodcastTranscript podcast-transcript .json yes yes
HTML transcript HtmlTranscript html .html, .htm yes yes the Podcasting 2.0 HTML format
YouTube chapters YouTubeChapters youtube-chapters .txt yes yes not detected from the content
Podcasting 2.0 chapters PodcastChapters podcast-chapters .json yes yes not detected from the content
FFmpeg metadata chapters FfMetadataChapters ffmeta-chapters .ffmeta yes yes not detected from the content
OGM chapters OgmChapters ogm-chapters .txt yes yes not detected from the content
MKV and WebM tracks .mkv, .webm yes no text, ASS, SSA, WebVTT and PGS tracks

Case is the case of the enum Format, for example Format::SubRip. Name is the format name for --from and --to. An image cue holds a bitmap in place of text.

Command line tool

Composer installs vendor/bin/subtitle-toolbox. Optional parts are in brackets.

subtitle-toolbox convert --help lists the option groups of convert. See cli.md for all commands and options.

Library

Load and write

Read options

See read-options.md for the options of each format.

Edit

A service such as HearingImpairedRemover changes the subtitle in place and returns a report.

Validate and count

MKV and WebM tracks

OCR

create() takes the Tesseract language as its second argument, for example 'deu+eng'. For engine settings, pass TesseractOcrOptions to new TesseractOcrEngine() or GlyphOcrOptions to new GlyphOcrEngine().

Translate

GoogleTranslateEngine works the same way. See translation.md.

Sync to a reference

Every exception implements SubtitleToolboxException. See errors.md.

OCR

OCR turns the bitmaps of PGS and VobSub subtitles into text. The library uses Tesseract when it is installed. Otherwise it uses php-glyph-ocr. When neither engine is installed, the call throws InvalidArgumentException that names both engines. Tesseract reads more than 100 languages. php-glyph-ocr reads only Latin-script fonts. See ocr.md for the install commands and a comparison of the engines.

Compatibility

See compatibility.md for the parts that semantic versioning covers and for what a minor or patch release can change.

Documentation

docs/README.md lists every page. The most used pages:

Contributing

Pull requests are welcome. Run the tests with composer test. Each pull request carries one label that sets the version bump: major, minor, patch or skip-release. Every merge to master publishes a release.

License

MIT, see LICENSE.


All versions of subtitle-toolbox with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-dom Version *
ext-iconv Version *
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 ymakhloufi/subtitle-toolbox contains the following files

Loading the files please wait ...