PHPackages                             codebuglab/laravel-srt-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. codebuglab/laravel-srt-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

codebuglab/laravel-srt-parser
=============================

Simple package to parse SubRip or srt file in Laravel

v0.0.3-beta(4y ago)1146MITPHPPHP &gt;=7.0

Since Dec 10Pushed 4y ago1 watchersCompare

[ Source](https://github.com/codebuglab/laravel-srt-parser)[ Packagist](https://packagist.org/packages/codebuglab/laravel-srt-parser)[ RSS](/packages/codebuglab-laravel-srt-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

⚡⚡⚡ Laravel Srt Parser
======================

[](#-laravel-srt-parser)

Simple package to parse SubRip or srt file in Laravel

[![Laravel Srt Parser](logo.png)](logo.png)

Table of contents
-----------------

[](#table-of-contents)

- [Setup](#setup)
    - [Installation](#installation)
- [Instructions](#Instructions)
    - [Convert to Array](#convert-to-array)
- [License](#license)

Setup
-----

[](#setup)

### Installation

[](#installation)

To install this package through composer run the following command in the terminal

```
composer require codebuglab/laravel-srt-parser
```

Instructions
------------

[](#instructions)

- To use Srt Parser you have to include next facade file

```
use CodeBugLab\SrtParser\Facades\SrtParser;
```

### Convert to Array

[](#convert-to-array)

- This is how you can convert srt to array and read every subtitle details.

```
$path = storage_path('app/Cars (2006).srt'); // file path

$srt = SrtParser::load($path)->toArray();
```

- Next is a simple array response you can get from this parser containing subtitle number, start time, stop time, duration of the words appearing in seconds and finally an array of text.

```
Array
(
    [0] => Array
        (
            [number] => 1
            [startTime] => 00:00:38,365
            [stopTime] => 00:00:41,495
            [duration] => 3.1299998760223
            [text] => Array
                (
                    [0] => OK... Here we go. Focus.
                )

        )

    [1] => Array
        (
            [number] => 2
            [startTime] => 00:00:41,575
            [stopTime] => 00:00:44,935
            [duration] => 3.3599998950958
            [text] => Array
                (
                    [0] => Speed. I am speed.
                )

        )
    .
    .
    .
)
```

License
-------

[](#license)

This package is a free software distributed under the terms of the MIT license.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~20 days

Total

3

Last Release

1580d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b739843a13277460d1b33db36cacdd3fe8c5c5942f458ed26284aba28c16849?d=identicon)[CodeBugLab](/maintainers/CodeBugLab)

![](https://www.gravatar.com/avatar/c933185e0cb76b98ed1896622a2128f20e5dd92a305f8e5d7253b7f4e39aa84b?d=identicon)[moelkomy](/maintainers/moelkomy)

---

Top Contributors

[![moelkomy](https://avatars.githubusercontent.com/u/70802292?v=4)](https://github.com/moelkomy "moelkomy (4 commits)")

---

Tags

phplaravelparsersubtitlessubtitlesrtsubripsubtitles-parsingsubtitle-parsingsubtitles-parsersubtitle-parsersrt-parsersubrip-parser

### Embed Badge

![Health badge](/badges/codebuglab-laravel-srt-parser/health.svg)

```
[![Health](https://phpackages.com/badges/codebuglab-laravel-srt-parser/health.svg)](https://phpackages.com/packages/codebuglab-laravel-srt-parser)
```

###  Alternatives

[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[ultrono/laravel-sitemap

Sitemap generator for Laravel 11, 12 and 13

36412.6k6](/packages/ultrono-laravel-sitemap)[rajentrivedi/tokenizer-x

TokenizerX calculates required tokens for given prompt

91214.0k3](/packages/rajentrivedi-tokenizer-x)[benlipp/srt-parser

Easily Parse SRT Subtitle Files

22126.9k](/packages/benlipp-srt-parser)[pherum/laravel-bbcode

Parse your BBCode easy with this library.

2427.5k](/packages/pherum-laravel-bbcode)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
