├── .gitignore ├── README.md ├── composer.json ├── composer.lock └── examples ├── assets └── transcript.srt ├── border.php ├── captions.php ├── destination.php ├── filters.php ├── gif.php ├── images.php ├── layers.php ├── luma.php ├── merge.php ├── probe.php ├── s3.php ├── serve-api ├── assetId.php └── renderId.php ├── status.php ├── templates ├── create.php ├── get.php └── render.php ├── text.php ├── titles.php ├── transform.php └── trim.php /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | vendor/ 3 | 4 | **/.DS_Store 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Shotstack PHP Examples 2 | 3 | ### Video examples 4 | 5 | - **text.php** - 6 | Create a HELLO WORLD video title against black background with a zoom in motion effect and soundtrack. 7 | 8 | - **images.php** - 9 | Takes an array of image URLs and creates a video with a soundtrack and simple zoom in effect. 10 | 11 | - **titles.php** - 12 | Create a video to demo titles using the available preset font styles, a soundtrack, zoom in motion effect and 13 | wipe right transition. 14 | 15 | - **trim.php** - 16 | Trim the start and end of a video clip to output a shortened video. 17 | 18 | - **filters.php** - 19 | Applies filters to a video clip, including a title with the name of the filter and a soundtrack. 20 | 21 | - **captions.php** - 22 | Parse an SRT transcript file and apply the captions to a video. 23 | 24 | - **layers.php** - 25 | Layer a title over a background video using tracks. The title includes a zoom effect and is semi-transparent. 26 | 27 | - **luma.php** - 28 | Create animated transition effects using a luma matte and the luma matte asset type. 29 | 30 | - **merge.php** - 31 | Merge data in to a video using merge fields. 32 | 33 | - **transform.php** - 34 | Apply transformations (rotate, skew and flip) to a video clip. 35 | 36 | ### Image examples 37 | 38 | - **border.php** - 39 | Add a border frame around a background photo. 40 | 41 | - **gif.php** - 42 | Create an animated gif that plays once. 43 | 44 | ### Polling example 45 | 46 | - **status.php** - 47 | Shows the status of a render task and the output video URL. Run this after running one of the render examples. 48 | 49 | ### Probe example 50 | 51 | - **probe.php** - 52 | Fetch metadata for any media asset on the internet such as width, height, duration, etc... 53 | 54 | ### Asset management examples 55 | 56 | - **serve-api/renderId.php** - 57 | Fetch all assets associated with a render ID. Includes video or image and thumbnail and poster. 58 | 59 | - **serve-api/assetId.php** - 60 | Fetch an individual asset by asset ID. 61 | 62 | - **serve-api/destination.php** - 63 | Shows how to exclude a render from being sent to the Shotstack hosting destination. 64 | 65 | - **s3.js** - 66 | Sends a rendered video to an S3 bucket and excludes it from Shotstack. Requires an AWS account and S3 bucket. 67 | 68 | ### Template examples 69 | 70 | - **templates/create.php** - 71 | Create a reusable template with a placeholder that can be rendered with different merge field values. 72 | 73 | - **templates/get.php** - 74 | Get a stored template by template ID. 75 | 76 | - **templates/render.php** - 77 | Render the template created using `templates/create.php` using its ID and merge field. 78 | 79 | --- 80 | 81 | ### Requirements 82 | 83 | - PHP 7.3+ 84 | - Composer 85 | ### Installation 86 | 87 | Install the required dependencies including the [Shotstack SDK](https://packagist.org/packages/shotstack/shotstack-sdk-php) 88 | 89 | ```bash 90 | composer install 91 | ``` 92 | 93 | ### Set your API key 94 | 95 | The demos use the **staging** endpoint by default so use your provided **staging** key: 96 | 97 | ```bash 98 | export SHOTSTACK_KEY=your_key_here 99 | ``` 100 | 101 | Windows users (Command Prompt): 102 | 103 | ```bash 104 | set SHOTSTACK_KEY=your_key_here 105 | ``` 106 | 107 | You can [get an API key](http://shotstack.io/?utm_source=github&utm_medium=demos&utm_campaign=php_sdk) via the Shotstack web site. 108 | 109 | ### Run an example 110 | 111 | The examples directory includes a number of examples demonstrating the capabilities of the 112 | Shotstack API. 113 | 114 | #### Rendering 115 | 116 | To run a rendering/editing example run the examples at the root of the examples folder, e.g. to run the images video 117 | example: 118 | 119 | ```bash 120 | php examples/images.php 121 | ``` 122 | 123 | #### Polling 124 | 125 | To check the status of a render, similar to polling run the `status.php` example with the render ID, e.g.: 126 | 127 | ```bash 128 | php examples/status.php 8b844085-779c-4c3a-b52f-d79deca2a960 129 | ``` 130 | 131 | #### Asset management 132 | 133 | To look up assets hosted by Shotstack run the examples in the [examples/serve-api](./examples/serve-api/) directory. 134 | 135 | Find assets by render ID: 136 | ```bash 137 | php examples/serve-api/renderId.php 8b844085-779c-4c3a-b52f-d79deca2a960 138 | ``` 139 | 140 | or 141 | 142 | Find an asset by asset ID: 143 | ```bash 144 | php examples/serve-api/assetId.php 3f446298-779c-8c8c-f253-900c1627b776 145 | ``` 146 | 147 | ## Documentation 148 | 149 | Documentation and reference guides for the Shotstack video editing API 150 | 151 | - [Getting Started Guide](https://shotstack.io/docs/guide/getting-started/core-concepts/) 152 | - [API Reference](https://shotstack.io/docs/api/) 153 | - [Examples](https://github.com/shotstack/php-demos) 154 | - [Shotstack Website](https://shotstack.io) 155 | - [PHP video editor](https://shotstack.io/product/sdk/php) 156 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shotstack/php-examples", 3 | "description": "Shotstack PHP Examples. Edit videos in the cloud using the Shotstack API and PHP.", 4 | "require": { 5 | "ext-json": "*", 6 | "benlipp/srt-parser": "^1.1", 7 | "shotstack/shotstack-sdk-php": "^0.2.3" 8 | }, 9 | "require-dev": { 10 | "phpunit/phpunit": "^8" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "98d20469bc8b7af2c193bcdd57bb28a5", 8 | "packages": [ 9 | { 10 | "name": "benlipp/srt-parser", 11 | "version": "v1.1.1", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/benlipp/srt-parser.git", 15 | "reference": "e87bb5fb4e373db0c33f54f3783fe174b562a01c" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/benlipp/srt-parser/zipball/e87bb5fb4e373db0c33f54f3783fe174b562a01c", 20 | "reference": "e87bb5fb4e373db0c33f54f3783fe174b562a01c", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "php": ">=7.0" 25 | }, 26 | "require-dev": { 27 | "phpunit/phpunit": "6.0.*" 28 | }, 29 | "type": "project", 30 | "autoload": { 31 | "psr-4": { 32 | "Benlipp\\SrtParser\\": "src/SrtParser/" 33 | } 34 | }, 35 | "notification-url": "https://packagist.org/downloads/", 36 | "license": [ 37 | "DBAD" 38 | ], 39 | "authors": [ 40 | { 41 | "name": "Ben Lippincott", 42 | "email": "ben@benlipp.com" 43 | } 44 | ], 45 | "description": "Easily Parse SRT Subtitle Files", 46 | "keywords": [ 47 | "parser", 48 | "srt", 49 | "subtitles" 50 | ], 51 | "support": { 52 | "issues": "https://github.com/benlipp/srt-parser/issues", 53 | "source": "https://github.com/benlipp/srt-parser/tree/master" 54 | }, 55 | "time": "2017-06-23T23:28:38+00:00" 56 | }, 57 | { 58 | "name": "guzzlehttp/guzzle", 59 | "version": "7.8.1", 60 | "source": { 61 | "type": "git", 62 | "url": "https://github.com/guzzle/guzzle.git", 63 | "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" 64 | }, 65 | "dist": { 66 | "type": "zip", 67 | "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", 68 | "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", 69 | "shasum": "" 70 | }, 71 | "require": { 72 | "ext-json": "*", 73 | "guzzlehttp/promises": "^1.5.3 || ^2.0.1", 74 | "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", 75 | "php": "^7.2.5 || ^8.0", 76 | "psr/http-client": "^1.0", 77 | "symfony/deprecation-contracts": "^2.2 || ^3.0" 78 | }, 79 | "provide": { 80 | "psr/http-client-implementation": "1.0" 81 | }, 82 | "require-dev": { 83 | "bamarni/composer-bin-plugin": "^1.8.2", 84 | "ext-curl": "*", 85 | "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", 86 | "php-http/message-factory": "^1.1", 87 | "phpunit/phpunit": "^8.5.36 || ^9.6.15", 88 | "psr/log": "^1.1 || ^2.0 || ^3.0" 89 | }, 90 | "suggest": { 91 | "ext-curl": "Required for CURL handler support", 92 | "ext-intl": "Required for Internationalized Domain Name (IDN) support", 93 | "psr/log": "Required for using the Log middleware" 94 | }, 95 | "type": "library", 96 | "extra": { 97 | "bamarni-bin": { 98 | "bin-links": true, 99 | "forward-command": false 100 | } 101 | }, 102 | "autoload": { 103 | "files": [ 104 | "src/functions_include.php" 105 | ], 106 | "psr-4": { 107 | "GuzzleHttp\\": "src/" 108 | } 109 | }, 110 | "notification-url": "https://packagist.org/downloads/", 111 | "license": [ 112 | "MIT" 113 | ], 114 | "authors": [ 115 | { 116 | "name": "Graham Campbell", 117 | "email": "hello@gjcampbell.co.uk", 118 | "homepage": "https://github.com/GrahamCampbell" 119 | }, 120 | { 121 | "name": "Michael Dowling", 122 | "email": "mtdowling@gmail.com", 123 | "homepage": "https://github.com/mtdowling" 124 | }, 125 | { 126 | "name": "Jeremy Lindblom", 127 | "email": "jeremeamia@gmail.com", 128 | "homepage": "https://github.com/jeremeamia" 129 | }, 130 | { 131 | "name": "George Mponos", 132 | "email": "gmponos@gmail.com", 133 | "homepage": "https://github.com/gmponos" 134 | }, 135 | { 136 | "name": "Tobias Nyholm", 137 | "email": "tobias.nyholm@gmail.com", 138 | "homepage": "https://github.com/Nyholm" 139 | }, 140 | { 141 | "name": "Márk Sági-Kazár", 142 | "email": "mark.sagikazar@gmail.com", 143 | "homepage": "https://github.com/sagikazarmark" 144 | }, 145 | { 146 | "name": "Tobias Schultze", 147 | "email": "webmaster@tubo-world.de", 148 | "homepage": "https://github.com/Tobion" 149 | } 150 | ], 151 | "description": "Guzzle is a PHP HTTP client library", 152 | "keywords": [ 153 | "client", 154 | "curl", 155 | "framework", 156 | "http", 157 | "http client", 158 | "psr-18", 159 | "psr-7", 160 | "rest", 161 | "web service" 162 | ], 163 | "support": { 164 | "issues": "https://github.com/guzzle/guzzle/issues", 165 | "source": "https://github.com/guzzle/guzzle/tree/7.8.1" 166 | }, 167 | "funding": [ 168 | { 169 | "url": "https://github.com/GrahamCampbell", 170 | "type": "github" 171 | }, 172 | { 173 | "url": "https://github.com/Nyholm", 174 | "type": "github" 175 | }, 176 | { 177 | "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", 178 | "type": "tidelift" 179 | } 180 | ], 181 | "time": "2023-12-03T20:35:24+00:00" 182 | }, 183 | { 184 | "name": "guzzlehttp/promises", 185 | "version": "2.0.2", 186 | "source": { 187 | "type": "git", 188 | "url": "https://github.com/guzzle/promises.git", 189 | "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" 190 | }, 191 | "dist": { 192 | "type": "zip", 193 | "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", 194 | "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", 195 | "shasum": "" 196 | }, 197 | "require": { 198 | "php": "^7.2.5 || ^8.0" 199 | }, 200 | "require-dev": { 201 | "bamarni/composer-bin-plugin": "^1.8.2", 202 | "phpunit/phpunit": "^8.5.36 || ^9.6.15" 203 | }, 204 | "type": "library", 205 | "extra": { 206 | "bamarni-bin": { 207 | "bin-links": true, 208 | "forward-command": false 209 | } 210 | }, 211 | "autoload": { 212 | "psr-4": { 213 | "GuzzleHttp\\Promise\\": "src/" 214 | } 215 | }, 216 | "notification-url": "https://packagist.org/downloads/", 217 | "license": [ 218 | "MIT" 219 | ], 220 | "authors": [ 221 | { 222 | "name": "Graham Campbell", 223 | "email": "hello@gjcampbell.co.uk", 224 | "homepage": "https://github.com/GrahamCampbell" 225 | }, 226 | { 227 | "name": "Michael Dowling", 228 | "email": "mtdowling@gmail.com", 229 | "homepage": "https://github.com/mtdowling" 230 | }, 231 | { 232 | "name": "Tobias Nyholm", 233 | "email": "tobias.nyholm@gmail.com", 234 | "homepage": "https://github.com/Nyholm" 235 | }, 236 | { 237 | "name": "Tobias Schultze", 238 | "email": "webmaster@tubo-world.de", 239 | "homepage": "https://github.com/Tobion" 240 | } 241 | ], 242 | "description": "Guzzle promises library", 243 | "keywords": [ 244 | "promise" 245 | ], 246 | "support": { 247 | "issues": "https://github.com/guzzle/promises/issues", 248 | "source": "https://github.com/guzzle/promises/tree/2.0.2" 249 | }, 250 | "funding": [ 251 | { 252 | "url": "https://github.com/GrahamCampbell", 253 | "type": "github" 254 | }, 255 | { 256 | "url": "https://github.com/Nyholm", 257 | "type": "github" 258 | }, 259 | { 260 | "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", 261 | "type": "tidelift" 262 | } 263 | ], 264 | "time": "2023-12-03T20:19:20+00:00" 265 | }, 266 | { 267 | "name": "guzzlehttp/psr7", 268 | "version": "2.6.2", 269 | "source": { 270 | "type": "git", 271 | "url": "https://github.com/guzzle/psr7.git", 272 | "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" 273 | }, 274 | "dist": { 275 | "type": "zip", 276 | "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", 277 | "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", 278 | "shasum": "" 279 | }, 280 | "require": { 281 | "php": "^7.2.5 || ^8.0", 282 | "psr/http-factory": "^1.0", 283 | "psr/http-message": "^1.1 || ^2.0", 284 | "ralouphie/getallheaders": "^3.0" 285 | }, 286 | "provide": { 287 | "psr/http-factory-implementation": "1.0", 288 | "psr/http-message-implementation": "1.0" 289 | }, 290 | "require-dev": { 291 | "bamarni/composer-bin-plugin": "^1.8.2", 292 | "http-interop/http-factory-tests": "^0.9", 293 | "phpunit/phpunit": "^8.5.36 || ^9.6.15" 294 | }, 295 | "suggest": { 296 | "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" 297 | }, 298 | "type": "library", 299 | "extra": { 300 | "bamarni-bin": { 301 | "bin-links": true, 302 | "forward-command": false 303 | } 304 | }, 305 | "autoload": { 306 | "psr-4": { 307 | "GuzzleHttp\\Psr7\\": "src/" 308 | } 309 | }, 310 | "notification-url": "https://packagist.org/downloads/", 311 | "license": [ 312 | "MIT" 313 | ], 314 | "authors": [ 315 | { 316 | "name": "Graham Campbell", 317 | "email": "hello@gjcampbell.co.uk", 318 | "homepage": "https://github.com/GrahamCampbell" 319 | }, 320 | { 321 | "name": "Michael Dowling", 322 | "email": "mtdowling@gmail.com", 323 | "homepage": "https://github.com/mtdowling" 324 | }, 325 | { 326 | "name": "George Mponos", 327 | "email": "gmponos@gmail.com", 328 | "homepage": "https://github.com/gmponos" 329 | }, 330 | { 331 | "name": "Tobias Nyholm", 332 | "email": "tobias.nyholm@gmail.com", 333 | "homepage": "https://github.com/Nyholm" 334 | }, 335 | { 336 | "name": "Márk Sági-Kazár", 337 | "email": "mark.sagikazar@gmail.com", 338 | "homepage": "https://github.com/sagikazarmark" 339 | }, 340 | { 341 | "name": "Tobias Schultze", 342 | "email": "webmaster@tubo-world.de", 343 | "homepage": "https://github.com/Tobion" 344 | }, 345 | { 346 | "name": "Márk Sági-Kazár", 347 | "email": "mark.sagikazar@gmail.com", 348 | "homepage": "https://sagikazarmark.hu" 349 | } 350 | ], 351 | "description": "PSR-7 message implementation that also provides common utility methods", 352 | "keywords": [ 353 | "http", 354 | "message", 355 | "psr-7", 356 | "request", 357 | "response", 358 | "stream", 359 | "uri", 360 | "url" 361 | ], 362 | "support": { 363 | "issues": "https://github.com/guzzle/psr7/issues", 364 | "source": "https://github.com/guzzle/psr7/tree/2.6.2" 365 | }, 366 | "funding": [ 367 | { 368 | "url": "https://github.com/GrahamCampbell", 369 | "type": "github" 370 | }, 371 | { 372 | "url": "https://github.com/Nyholm", 373 | "type": "github" 374 | }, 375 | { 376 | "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", 377 | "type": "tidelift" 378 | } 379 | ], 380 | "time": "2023-12-03T20:05:35+00:00" 381 | }, 382 | { 383 | "name": "psr/http-client", 384 | "version": "1.0.3", 385 | "source": { 386 | "type": "git", 387 | "url": "https://github.com/php-fig/http-client.git", 388 | "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" 389 | }, 390 | "dist": { 391 | "type": "zip", 392 | "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", 393 | "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", 394 | "shasum": "" 395 | }, 396 | "require": { 397 | "php": "^7.0 || ^8.0", 398 | "psr/http-message": "^1.0 || ^2.0" 399 | }, 400 | "type": "library", 401 | "extra": { 402 | "branch-alias": { 403 | "dev-master": "1.0.x-dev" 404 | } 405 | }, 406 | "autoload": { 407 | "psr-4": { 408 | "Psr\\Http\\Client\\": "src/" 409 | } 410 | }, 411 | "notification-url": "https://packagist.org/downloads/", 412 | "license": [ 413 | "MIT" 414 | ], 415 | "authors": [ 416 | { 417 | "name": "PHP-FIG", 418 | "homepage": "https://www.php-fig.org/" 419 | } 420 | ], 421 | "description": "Common interface for HTTP clients", 422 | "homepage": "https://github.com/php-fig/http-client", 423 | "keywords": [ 424 | "http", 425 | "http-client", 426 | "psr", 427 | "psr-18" 428 | ], 429 | "support": { 430 | "source": "https://github.com/php-fig/http-client" 431 | }, 432 | "time": "2023-09-23T14:17:50+00:00" 433 | }, 434 | { 435 | "name": "psr/http-factory", 436 | "version": "1.1.0", 437 | "source": { 438 | "type": "git", 439 | "url": "https://github.com/php-fig/http-factory.git", 440 | "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" 441 | }, 442 | "dist": { 443 | "type": "zip", 444 | "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", 445 | "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", 446 | "shasum": "" 447 | }, 448 | "require": { 449 | "php": ">=7.1", 450 | "psr/http-message": "^1.0 || ^2.0" 451 | }, 452 | "type": "library", 453 | "extra": { 454 | "branch-alias": { 455 | "dev-master": "1.0.x-dev" 456 | } 457 | }, 458 | "autoload": { 459 | "psr-4": { 460 | "Psr\\Http\\Message\\": "src/" 461 | } 462 | }, 463 | "notification-url": "https://packagist.org/downloads/", 464 | "license": [ 465 | "MIT" 466 | ], 467 | "authors": [ 468 | { 469 | "name": "PHP-FIG", 470 | "homepage": "https://www.php-fig.org/" 471 | } 472 | ], 473 | "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", 474 | "keywords": [ 475 | "factory", 476 | "http", 477 | "message", 478 | "psr", 479 | "psr-17", 480 | "psr-7", 481 | "request", 482 | "response" 483 | ], 484 | "support": { 485 | "source": "https://github.com/php-fig/http-factory" 486 | }, 487 | "time": "2024-04-15T12:06:14+00:00" 488 | }, 489 | { 490 | "name": "psr/http-message", 491 | "version": "2.0", 492 | "source": { 493 | "type": "git", 494 | "url": "https://github.com/php-fig/http-message.git", 495 | "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" 496 | }, 497 | "dist": { 498 | "type": "zip", 499 | "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", 500 | "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", 501 | "shasum": "" 502 | }, 503 | "require": { 504 | "php": "^7.2 || ^8.0" 505 | }, 506 | "type": "library", 507 | "extra": { 508 | "branch-alias": { 509 | "dev-master": "2.0.x-dev" 510 | } 511 | }, 512 | "autoload": { 513 | "psr-4": { 514 | "Psr\\Http\\Message\\": "src/" 515 | } 516 | }, 517 | "notification-url": "https://packagist.org/downloads/", 518 | "license": [ 519 | "MIT" 520 | ], 521 | "authors": [ 522 | { 523 | "name": "PHP-FIG", 524 | "homepage": "https://www.php-fig.org/" 525 | } 526 | ], 527 | "description": "Common interface for HTTP messages", 528 | "homepage": "https://github.com/php-fig/http-message", 529 | "keywords": [ 530 | "http", 531 | "http-message", 532 | "psr", 533 | "psr-7", 534 | "request", 535 | "response" 536 | ], 537 | "support": { 538 | "source": "https://github.com/php-fig/http-message/tree/2.0" 539 | }, 540 | "time": "2023-04-04T09:54:51+00:00" 541 | }, 542 | { 543 | "name": "ralouphie/getallheaders", 544 | "version": "3.0.3", 545 | "source": { 546 | "type": "git", 547 | "url": "https://github.com/ralouphie/getallheaders.git", 548 | "reference": "120b605dfeb996808c31b6477290a714d356e822" 549 | }, 550 | "dist": { 551 | "type": "zip", 552 | "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", 553 | "reference": "120b605dfeb996808c31b6477290a714d356e822", 554 | "shasum": "" 555 | }, 556 | "require": { 557 | "php": ">=5.6" 558 | }, 559 | "require-dev": { 560 | "php-coveralls/php-coveralls": "^2.1", 561 | "phpunit/phpunit": "^5 || ^6.5" 562 | }, 563 | "type": "library", 564 | "autoload": { 565 | "files": [ 566 | "src/getallheaders.php" 567 | ] 568 | }, 569 | "notification-url": "https://packagist.org/downloads/", 570 | "license": [ 571 | "MIT" 572 | ], 573 | "authors": [ 574 | { 575 | "name": "Ralph Khattar", 576 | "email": "ralph.khattar@gmail.com" 577 | } 578 | ], 579 | "description": "A polyfill for getallheaders.", 580 | "support": { 581 | "issues": "https://github.com/ralouphie/getallheaders/issues", 582 | "source": "https://github.com/ralouphie/getallheaders/tree/develop" 583 | }, 584 | "time": "2019-03-08T08:55:37+00:00" 585 | }, 586 | { 587 | "name": "shotstack/shotstack-sdk-php", 588 | "version": "0.2.6", 589 | "source": { 590 | "type": "git", 591 | "url": "https://github.com/shotstack/shotstack-sdk-php.git", 592 | "reference": "2a26b85061c2afeae0e6079683b8e1ac7e46e371" 593 | }, 594 | "dist": { 595 | "type": "zip", 596 | "url": "https://api.github.com/repos/shotstack/shotstack-sdk-php/zipball/2a26b85061c2afeae0e6079683b8e1ac7e46e371", 597 | "reference": "2a26b85061c2afeae0e6079683b8e1ac7e46e371", 598 | "shasum": "" 599 | }, 600 | "require": { 601 | "ext-curl": "*", 602 | "ext-json": "*", 603 | "ext-mbstring": "*", 604 | "guzzlehttp/guzzle": "^7.3", 605 | "guzzlehttp/psr7": "^1.7 || ^2.0", 606 | "php": "^7.4 || ^8.0" 607 | }, 608 | "require-dev": { 609 | "friendsofphp/php-cs-fixer": "^3.5", 610 | "phpunit/phpunit": "^8.0 || ^9.0" 611 | }, 612 | "type": "library", 613 | "autoload": { 614 | "psr-4": { 615 | "Shotstack\\Client\\": "src/" 616 | } 617 | }, 618 | "notification-url": "https://packagist.org/downloads/", 619 | "license": [ 620 | "MIT" 621 | ], 622 | "authors": [ 623 | { 624 | "name": "Shotstack", 625 | "homepage": "https://shotstack.io" 626 | } 627 | ], 628 | "description": "Official PHP SDK for the Shotstack Cloud Video Editing API", 629 | "homepage": "https://shotstack.io", 630 | "keywords": [ 631 | "api", 632 | "shotstack", 633 | "video", 634 | "video editing" 635 | ], 636 | "support": { 637 | "issues": "https://github.com/shotstack/shotstack-sdk-php/issues", 638 | "source": "https://github.com/shotstack/shotstack-sdk-php/tree/v0.2.6" 639 | }, 640 | "time": "2024-05-20T04:07:48+00:00" 641 | }, 642 | { 643 | "name": "symfony/deprecation-contracts", 644 | "version": "v3.5.0", 645 | "source": { 646 | "type": "git", 647 | "url": "https://github.com/symfony/deprecation-contracts.git", 648 | "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" 649 | }, 650 | "dist": { 651 | "type": "zip", 652 | "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", 653 | "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", 654 | "shasum": "" 655 | }, 656 | "require": { 657 | "php": ">=8.1" 658 | }, 659 | "type": "library", 660 | "extra": { 661 | "branch-alias": { 662 | "dev-main": "3.5-dev" 663 | }, 664 | "thanks": { 665 | "name": "symfony/contracts", 666 | "url": "https://github.com/symfony/contracts" 667 | } 668 | }, 669 | "autoload": { 670 | "files": [ 671 | "function.php" 672 | ] 673 | }, 674 | "notification-url": "https://packagist.org/downloads/", 675 | "license": [ 676 | "MIT" 677 | ], 678 | "authors": [ 679 | { 680 | "name": "Nicolas Grekas", 681 | "email": "p@tchwork.com" 682 | }, 683 | { 684 | "name": "Symfony Community", 685 | "homepage": "https://symfony.com/contributors" 686 | } 687 | ], 688 | "description": "A generic function and convention to trigger deprecation notices", 689 | "homepage": "https://symfony.com", 690 | "support": { 691 | "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" 692 | }, 693 | "funding": [ 694 | { 695 | "url": "https://symfony.com/sponsor", 696 | "type": "custom" 697 | }, 698 | { 699 | "url": "https://github.com/fabpot", 700 | "type": "github" 701 | }, 702 | { 703 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 704 | "type": "tidelift" 705 | } 706 | ], 707 | "time": "2024-04-18T09:32:20+00:00" 708 | } 709 | ], 710 | "packages-dev": [ 711 | { 712 | "name": "doctrine/instantiator", 713 | "version": "1.5.0", 714 | "source": { 715 | "type": "git", 716 | "url": "https://github.com/doctrine/instantiator.git", 717 | "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" 718 | }, 719 | "dist": { 720 | "type": "zip", 721 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", 722 | "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", 723 | "shasum": "" 724 | }, 725 | "require": { 726 | "php": "^7.1 || ^8.0" 727 | }, 728 | "require-dev": { 729 | "doctrine/coding-standard": "^9 || ^11", 730 | "ext-pdo": "*", 731 | "ext-phar": "*", 732 | "phpbench/phpbench": "^0.16 || ^1", 733 | "phpstan/phpstan": "^1.4", 734 | "phpstan/phpstan-phpunit": "^1", 735 | "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", 736 | "vimeo/psalm": "^4.30 || ^5.4" 737 | }, 738 | "type": "library", 739 | "autoload": { 740 | "psr-4": { 741 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 742 | } 743 | }, 744 | "notification-url": "https://packagist.org/downloads/", 745 | "license": [ 746 | "MIT" 747 | ], 748 | "authors": [ 749 | { 750 | "name": "Marco Pivetta", 751 | "email": "ocramius@gmail.com", 752 | "homepage": "https://ocramius.github.io/" 753 | } 754 | ], 755 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 756 | "homepage": "https://www.doctrine-project.org/projects/instantiator.html", 757 | "keywords": [ 758 | "constructor", 759 | "instantiate" 760 | ], 761 | "support": { 762 | "issues": "https://github.com/doctrine/instantiator/issues", 763 | "source": "https://github.com/doctrine/instantiator/tree/1.5.0" 764 | }, 765 | "funding": [ 766 | { 767 | "url": "https://www.doctrine-project.org/sponsorship.html", 768 | "type": "custom" 769 | }, 770 | { 771 | "url": "https://www.patreon.com/phpdoctrine", 772 | "type": "patreon" 773 | }, 774 | { 775 | "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", 776 | "type": "tidelift" 777 | } 778 | ], 779 | "time": "2022-12-30T00:15:36+00:00" 780 | }, 781 | { 782 | "name": "myclabs/deep-copy", 783 | "version": "1.11.1", 784 | "source": { 785 | "type": "git", 786 | "url": "https://github.com/myclabs/DeepCopy.git", 787 | "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" 788 | }, 789 | "dist": { 790 | "type": "zip", 791 | "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", 792 | "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", 793 | "shasum": "" 794 | }, 795 | "require": { 796 | "php": "^7.1 || ^8.0" 797 | }, 798 | "conflict": { 799 | "doctrine/collections": "<1.6.8", 800 | "doctrine/common": "<2.13.3 || >=3,<3.2.2" 801 | }, 802 | "require-dev": { 803 | "doctrine/collections": "^1.6.8", 804 | "doctrine/common": "^2.13.3 || ^3.2.2", 805 | "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" 806 | }, 807 | "type": "library", 808 | "autoload": { 809 | "files": [ 810 | "src/DeepCopy/deep_copy.php" 811 | ], 812 | "psr-4": { 813 | "DeepCopy\\": "src/DeepCopy/" 814 | } 815 | }, 816 | "notification-url": "https://packagist.org/downloads/", 817 | "license": [ 818 | "MIT" 819 | ], 820 | "description": "Create deep copies (clones) of your objects", 821 | "keywords": [ 822 | "clone", 823 | "copy", 824 | "duplicate", 825 | "object", 826 | "object graph" 827 | ], 828 | "support": { 829 | "issues": "https://github.com/myclabs/DeepCopy/issues", 830 | "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" 831 | }, 832 | "funding": [ 833 | { 834 | "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", 835 | "type": "tidelift" 836 | } 837 | ], 838 | "time": "2023-03-08T13:26:56+00:00" 839 | }, 840 | { 841 | "name": "phar-io/manifest", 842 | "version": "2.0.4", 843 | "source": { 844 | "type": "git", 845 | "url": "https://github.com/phar-io/manifest.git", 846 | "reference": "54750ef60c58e43759730615a392c31c80e23176" 847 | }, 848 | "dist": { 849 | "type": "zip", 850 | "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", 851 | "reference": "54750ef60c58e43759730615a392c31c80e23176", 852 | "shasum": "" 853 | }, 854 | "require": { 855 | "ext-dom": "*", 856 | "ext-libxml": "*", 857 | "ext-phar": "*", 858 | "ext-xmlwriter": "*", 859 | "phar-io/version": "^3.0.1", 860 | "php": "^7.2 || ^8.0" 861 | }, 862 | "type": "library", 863 | "extra": { 864 | "branch-alias": { 865 | "dev-master": "2.0.x-dev" 866 | } 867 | }, 868 | "autoload": { 869 | "classmap": [ 870 | "src/" 871 | ] 872 | }, 873 | "notification-url": "https://packagist.org/downloads/", 874 | "license": [ 875 | "BSD-3-Clause" 876 | ], 877 | "authors": [ 878 | { 879 | "name": "Arne Blankerts", 880 | "email": "arne@blankerts.de", 881 | "role": "Developer" 882 | }, 883 | { 884 | "name": "Sebastian Heuer", 885 | "email": "sebastian@phpeople.de", 886 | "role": "Developer" 887 | }, 888 | { 889 | "name": "Sebastian Bergmann", 890 | "email": "sebastian@phpunit.de", 891 | "role": "Developer" 892 | } 893 | ], 894 | "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", 895 | "support": { 896 | "issues": "https://github.com/phar-io/manifest/issues", 897 | "source": "https://github.com/phar-io/manifest/tree/2.0.4" 898 | }, 899 | "funding": [ 900 | { 901 | "url": "https://github.com/theseer", 902 | "type": "github" 903 | } 904 | ], 905 | "time": "2024-03-03T12:33:53+00:00" 906 | }, 907 | { 908 | "name": "phar-io/version", 909 | "version": "3.2.1", 910 | "source": { 911 | "type": "git", 912 | "url": "https://github.com/phar-io/version.git", 913 | "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" 914 | }, 915 | "dist": { 916 | "type": "zip", 917 | "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", 918 | "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", 919 | "shasum": "" 920 | }, 921 | "require": { 922 | "php": "^7.2 || ^8.0" 923 | }, 924 | "type": "library", 925 | "autoload": { 926 | "classmap": [ 927 | "src/" 928 | ] 929 | }, 930 | "notification-url": "https://packagist.org/downloads/", 931 | "license": [ 932 | "BSD-3-Clause" 933 | ], 934 | "authors": [ 935 | { 936 | "name": "Arne Blankerts", 937 | "email": "arne@blankerts.de", 938 | "role": "Developer" 939 | }, 940 | { 941 | "name": "Sebastian Heuer", 942 | "email": "sebastian@phpeople.de", 943 | "role": "Developer" 944 | }, 945 | { 946 | "name": "Sebastian Bergmann", 947 | "email": "sebastian@phpunit.de", 948 | "role": "Developer" 949 | } 950 | ], 951 | "description": "Library for handling version information and constraints", 952 | "support": { 953 | "issues": "https://github.com/phar-io/version/issues", 954 | "source": "https://github.com/phar-io/version/tree/3.2.1" 955 | }, 956 | "time": "2022-02-21T01:04:05+00:00" 957 | }, 958 | { 959 | "name": "phpunit/php-code-coverage", 960 | "version": "7.0.17", 961 | "source": { 962 | "type": "git", 963 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git", 964 | "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66" 965 | }, 966 | "dist": { 967 | "type": "zip", 968 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/40a4ed114a4aea5afd6df8d0f0c9cd3033097f66", 969 | "reference": "40a4ed114a4aea5afd6df8d0f0c9cd3033097f66", 970 | "shasum": "" 971 | }, 972 | "require": { 973 | "ext-dom": "*", 974 | "ext-xmlwriter": "*", 975 | "php": ">=7.2", 976 | "phpunit/php-file-iterator": "^2.0.2", 977 | "phpunit/php-text-template": "^1.2.1", 978 | "phpunit/php-token-stream": "^3.1.3 || ^4.0", 979 | "sebastian/code-unit-reverse-lookup": "^1.0.1", 980 | "sebastian/environment": "^4.2.2", 981 | "sebastian/version": "^2.0.1", 982 | "theseer/tokenizer": "^1.1.3" 983 | }, 984 | "require-dev": { 985 | "phpunit/phpunit": "^8.2.2" 986 | }, 987 | "suggest": { 988 | "ext-xdebug": "^2.7.2" 989 | }, 990 | "type": "library", 991 | "extra": { 992 | "branch-alias": { 993 | "dev-master": "7.0-dev" 994 | } 995 | }, 996 | "autoload": { 997 | "classmap": [ 998 | "src/" 999 | ] 1000 | }, 1001 | "notification-url": "https://packagist.org/downloads/", 1002 | "license": [ 1003 | "BSD-3-Clause" 1004 | ], 1005 | "authors": [ 1006 | { 1007 | "name": "Sebastian Bergmann", 1008 | "email": "sebastian@phpunit.de", 1009 | "role": "lead" 1010 | } 1011 | ], 1012 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", 1013 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage", 1014 | "keywords": [ 1015 | "coverage", 1016 | "testing", 1017 | "xunit" 1018 | ], 1019 | "support": { 1020 | "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", 1021 | "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.17" 1022 | }, 1023 | "funding": [ 1024 | { 1025 | "url": "https://github.com/sebastianbergmann", 1026 | "type": "github" 1027 | } 1028 | ], 1029 | "time": "2024-03-02T06:09:37+00:00" 1030 | }, 1031 | { 1032 | "name": "phpunit/php-file-iterator", 1033 | "version": "2.0.6", 1034 | "source": { 1035 | "type": "git", 1036 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git", 1037 | "reference": "69deeb8664f611f156a924154985fbd4911eb36b" 1038 | }, 1039 | "dist": { 1040 | "type": "zip", 1041 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/69deeb8664f611f156a924154985fbd4911eb36b", 1042 | "reference": "69deeb8664f611f156a924154985fbd4911eb36b", 1043 | "shasum": "" 1044 | }, 1045 | "require": { 1046 | "php": ">=7.1" 1047 | }, 1048 | "require-dev": { 1049 | "phpunit/phpunit": "^8.5" 1050 | }, 1051 | "type": "library", 1052 | "extra": { 1053 | "branch-alias": { 1054 | "dev-master": "2.0.x-dev" 1055 | } 1056 | }, 1057 | "autoload": { 1058 | "classmap": [ 1059 | "src/" 1060 | ] 1061 | }, 1062 | "notification-url": "https://packagist.org/downloads/", 1063 | "license": [ 1064 | "BSD-3-Clause" 1065 | ], 1066 | "authors": [ 1067 | { 1068 | "name": "Sebastian Bergmann", 1069 | "email": "sebastian@phpunit.de", 1070 | "role": "lead" 1071 | } 1072 | ], 1073 | "description": "FilterIterator implementation that filters files based on a list of suffixes.", 1074 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", 1075 | "keywords": [ 1076 | "filesystem", 1077 | "iterator" 1078 | ], 1079 | "support": { 1080 | "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", 1081 | "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.6" 1082 | }, 1083 | "funding": [ 1084 | { 1085 | "url": "https://github.com/sebastianbergmann", 1086 | "type": "github" 1087 | } 1088 | ], 1089 | "time": "2024-03-01T13:39:50+00:00" 1090 | }, 1091 | { 1092 | "name": "phpunit/php-text-template", 1093 | "version": "1.2.1", 1094 | "source": { 1095 | "type": "git", 1096 | "url": "https://github.com/sebastianbergmann/php-text-template.git", 1097 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" 1098 | }, 1099 | "dist": { 1100 | "type": "zip", 1101 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 1102 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 1103 | "shasum": "" 1104 | }, 1105 | "require": { 1106 | "php": ">=5.3.3" 1107 | }, 1108 | "type": "library", 1109 | "autoload": { 1110 | "classmap": [ 1111 | "src/" 1112 | ] 1113 | }, 1114 | "notification-url": "https://packagist.org/downloads/", 1115 | "license": [ 1116 | "BSD-3-Clause" 1117 | ], 1118 | "authors": [ 1119 | { 1120 | "name": "Sebastian Bergmann", 1121 | "email": "sebastian@phpunit.de", 1122 | "role": "lead" 1123 | } 1124 | ], 1125 | "description": "Simple template engine.", 1126 | "homepage": "https://github.com/sebastianbergmann/php-text-template/", 1127 | "keywords": [ 1128 | "template" 1129 | ], 1130 | "support": { 1131 | "issues": "https://github.com/sebastianbergmann/php-text-template/issues", 1132 | "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" 1133 | }, 1134 | "time": "2015-06-21T13:50:34+00:00" 1135 | }, 1136 | { 1137 | "name": "phpunit/php-timer", 1138 | "version": "2.1.4", 1139 | "source": { 1140 | "type": "git", 1141 | "url": "https://github.com/sebastianbergmann/php-timer.git", 1142 | "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb" 1143 | }, 1144 | "dist": { 1145 | "type": "zip", 1146 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/a691211e94ff39a34811abd521c31bd5b305b0bb", 1147 | "reference": "a691211e94ff39a34811abd521c31bd5b305b0bb", 1148 | "shasum": "" 1149 | }, 1150 | "require": { 1151 | "php": ">=7.1" 1152 | }, 1153 | "require-dev": { 1154 | "phpunit/phpunit": "^8.5" 1155 | }, 1156 | "type": "library", 1157 | "extra": { 1158 | "branch-alias": { 1159 | "dev-master": "2.1-dev" 1160 | } 1161 | }, 1162 | "autoload": { 1163 | "classmap": [ 1164 | "src/" 1165 | ] 1166 | }, 1167 | "notification-url": "https://packagist.org/downloads/", 1168 | "license": [ 1169 | "BSD-3-Clause" 1170 | ], 1171 | "authors": [ 1172 | { 1173 | "name": "Sebastian Bergmann", 1174 | "email": "sebastian@phpunit.de", 1175 | "role": "lead" 1176 | } 1177 | ], 1178 | "description": "Utility class for timing", 1179 | "homepage": "https://github.com/sebastianbergmann/php-timer/", 1180 | "keywords": [ 1181 | "timer" 1182 | ], 1183 | "support": { 1184 | "issues": "https://github.com/sebastianbergmann/php-timer/issues", 1185 | "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.4" 1186 | }, 1187 | "funding": [ 1188 | { 1189 | "url": "https://github.com/sebastianbergmann", 1190 | "type": "github" 1191 | } 1192 | ], 1193 | "time": "2024-03-01T13:42:41+00:00" 1194 | }, 1195 | { 1196 | "name": "phpunit/php-token-stream", 1197 | "version": "4.0.4", 1198 | "source": { 1199 | "type": "git", 1200 | "url": "https://github.com/sebastianbergmann/php-token-stream.git", 1201 | "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3" 1202 | }, 1203 | "dist": { 1204 | "type": "zip", 1205 | "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/a853a0e183b9db7eed023d7933a858fa1c8d25a3", 1206 | "reference": "a853a0e183b9db7eed023d7933a858fa1c8d25a3", 1207 | "shasum": "" 1208 | }, 1209 | "require": { 1210 | "ext-tokenizer": "*", 1211 | "php": "^7.3 || ^8.0" 1212 | }, 1213 | "require-dev": { 1214 | "phpunit/phpunit": "^9.0" 1215 | }, 1216 | "type": "library", 1217 | "extra": { 1218 | "branch-alias": { 1219 | "dev-master": "4.0-dev" 1220 | } 1221 | }, 1222 | "autoload": { 1223 | "classmap": [ 1224 | "src/" 1225 | ] 1226 | }, 1227 | "notification-url": "https://packagist.org/downloads/", 1228 | "license": [ 1229 | "BSD-3-Clause" 1230 | ], 1231 | "authors": [ 1232 | { 1233 | "name": "Sebastian Bergmann", 1234 | "email": "sebastian@phpunit.de" 1235 | } 1236 | ], 1237 | "description": "Wrapper around PHP's tokenizer extension.", 1238 | "homepage": "https://github.com/sebastianbergmann/php-token-stream/", 1239 | "keywords": [ 1240 | "tokenizer" 1241 | ], 1242 | "support": { 1243 | "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", 1244 | "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" 1245 | }, 1246 | "funding": [ 1247 | { 1248 | "url": "https://github.com/sebastianbergmann", 1249 | "type": "github" 1250 | } 1251 | ], 1252 | "abandoned": true, 1253 | "time": "2020-08-04T08:28:15+00:00" 1254 | }, 1255 | { 1256 | "name": "phpunit/phpunit", 1257 | "version": "8.5.38", 1258 | "source": { 1259 | "type": "git", 1260 | "url": "https://github.com/sebastianbergmann/phpunit.git", 1261 | "reference": "1ecad678646c817a29e55a32c930f3601c3f5a8c" 1262 | }, 1263 | "dist": { 1264 | "type": "zip", 1265 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1ecad678646c817a29e55a32c930f3601c3f5a8c", 1266 | "reference": "1ecad678646c817a29e55a32c930f3601c3f5a8c", 1267 | "shasum": "" 1268 | }, 1269 | "require": { 1270 | "doctrine/instantiator": "^1.3.1", 1271 | "ext-dom": "*", 1272 | "ext-json": "*", 1273 | "ext-libxml": "*", 1274 | "ext-mbstring": "*", 1275 | "ext-xml": "*", 1276 | "ext-xmlwriter": "*", 1277 | "myclabs/deep-copy": "^1.10.0", 1278 | "phar-io/manifest": "^2.0.3", 1279 | "phar-io/version": "^3.0.2", 1280 | "php": ">=7.2", 1281 | "phpunit/php-code-coverage": "^7.0.12", 1282 | "phpunit/php-file-iterator": "^2.0.4", 1283 | "phpunit/php-text-template": "^1.2.1", 1284 | "phpunit/php-timer": "^2.1.2", 1285 | "sebastian/comparator": "^3.0.5", 1286 | "sebastian/diff": "^3.0.2", 1287 | "sebastian/environment": "^4.2.3", 1288 | "sebastian/exporter": "^3.1.5", 1289 | "sebastian/global-state": "^3.0.0", 1290 | "sebastian/object-enumerator": "^3.0.3", 1291 | "sebastian/resource-operations": "^2.0.1", 1292 | "sebastian/type": "^1.1.3", 1293 | "sebastian/version": "^2.0.1" 1294 | }, 1295 | "suggest": { 1296 | "ext-soap": "To be able to generate mocks based on WSDL files", 1297 | "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage", 1298 | "phpunit/php-invoker": "To allow enforcing time limits" 1299 | }, 1300 | "bin": [ 1301 | "phpunit" 1302 | ], 1303 | "type": "library", 1304 | "extra": { 1305 | "branch-alias": { 1306 | "dev-master": "8.5-dev" 1307 | } 1308 | }, 1309 | "autoload": { 1310 | "classmap": [ 1311 | "src/" 1312 | ] 1313 | }, 1314 | "notification-url": "https://packagist.org/downloads/", 1315 | "license": [ 1316 | "BSD-3-Clause" 1317 | ], 1318 | "authors": [ 1319 | { 1320 | "name": "Sebastian Bergmann", 1321 | "email": "sebastian@phpunit.de", 1322 | "role": "lead" 1323 | } 1324 | ], 1325 | "description": "The PHP Unit Testing framework.", 1326 | "homepage": "https://phpunit.de/", 1327 | "keywords": [ 1328 | "phpunit", 1329 | "testing", 1330 | "xunit" 1331 | ], 1332 | "support": { 1333 | "issues": "https://github.com/sebastianbergmann/phpunit/issues", 1334 | "security": "https://github.com/sebastianbergmann/phpunit/security/policy", 1335 | "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.38" 1336 | }, 1337 | "funding": [ 1338 | { 1339 | "url": "https://phpunit.de/sponsors.html", 1340 | "type": "custom" 1341 | }, 1342 | { 1343 | "url": "https://github.com/sebastianbergmann", 1344 | "type": "github" 1345 | }, 1346 | { 1347 | "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", 1348 | "type": "tidelift" 1349 | } 1350 | ], 1351 | "time": "2024-04-05T04:31:23+00:00" 1352 | }, 1353 | { 1354 | "name": "sebastian/code-unit-reverse-lookup", 1355 | "version": "1.0.3", 1356 | "source": { 1357 | "type": "git", 1358 | "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", 1359 | "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54" 1360 | }, 1361 | "dist": { 1362 | "type": "zip", 1363 | "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54", 1364 | "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54", 1365 | "shasum": "" 1366 | }, 1367 | "require": { 1368 | "php": ">=5.6" 1369 | }, 1370 | "require-dev": { 1371 | "phpunit/phpunit": "^8.5" 1372 | }, 1373 | "type": "library", 1374 | "extra": { 1375 | "branch-alias": { 1376 | "dev-master": "1.0.x-dev" 1377 | } 1378 | }, 1379 | "autoload": { 1380 | "classmap": [ 1381 | "src/" 1382 | ] 1383 | }, 1384 | "notification-url": "https://packagist.org/downloads/", 1385 | "license": [ 1386 | "BSD-3-Clause" 1387 | ], 1388 | "authors": [ 1389 | { 1390 | "name": "Sebastian Bergmann", 1391 | "email": "sebastian@phpunit.de" 1392 | } 1393 | ], 1394 | "description": "Looks up which function or method a line of code belongs to", 1395 | "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", 1396 | "support": { 1397 | "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", 1398 | "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.3" 1399 | }, 1400 | "funding": [ 1401 | { 1402 | "url": "https://github.com/sebastianbergmann", 1403 | "type": "github" 1404 | } 1405 | ], 1406 | "time": "2024-03-01T13:45:45+00:00" 1407 | }, 1408 | { 1409 | "name": "sebastian/comparator", 1410 | "version": "3.0.5", 1411 | "source": { 1412 | "type": "git", 1413 | "url": "https://github.com/sebastianbergmann/comparator.git", 1414 | "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" 1415 | }, 1416 | "dist": { 1417 | "type": "zip", 1418 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", 1419 | "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", 1420 | "shasum": "" 1421 | }, 1422 | "require": { 1423 | "php": ">=7.1", 1424 | "sebastian/diff": "^3.0", 1425 | "sebastian/exporter": "^3.1" 1426 | }, 1427 | "require-dev": { 1428 | "phpunit/phpunit": "^8.5" 1429 | }, 1430 | "type": "library", 1431 | "extra": { 1432 | "branch-alias": { 1433 | "dev-master": "3.0-dev" 1434 | } 1435 | }, 1436 | "autoload": { 1437 | "classmap": [ 1438 | "src/" 1439 | ] 1440 | }, 1441 | "notification-url": "https://packagist.org/downloads/", 1442 | "license": [ 1443 | "BSD-3-Clause" 1444 | ], 1445 | "authors": [ 1446 | { 1447 | "name": "Sebastian Bergmann", 1448 | "email": "sebastian@phpunit.de" 1449 | }, 1450 | { 1451 | "name": "Jeff Welch", 1452 | "email": "whatthejeff@gmail.com" 1453 | }, 1454 | { 1455 | "name": "Volker Dusch", 1456 | "email": "github@wallbash.com" 1457 | }, 1458 | { 1459 | "name": "Bernhard Schussek", 1460 | "email": "bschussek@2bepublished.at" 1461 | } 1462 | ], 1463 | "description": "Provides the functionality to compare PHP values for equality", 1464 | "homepage": "https://github.com/sebastianbergmann/comparator", 1465 | "keywords": [ 1466 | "comparator", 1467 | "compare", 1468 | "equality" 1469 | ], 1470 | "support": { 1471 | "issues": "https://github.com/sebastianbergmann/comparator/issues", 1472 | "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" 1473 | }, 1474 | "funding": [ 1475 | { 1476 | "url": "https://github.com/sebastianbergmann", 1477 | "type": "github" 1478 | } 1479 | ], 1480 | "time": "2022-09-14T12:31:48+00:00" 1481 | }, 1482 | { 1483 | "name": "sebastian/diff", 1484 | "version": "3.0.6", 1485 | "source": { 1486 | "type": "git", 1487 | "url": "https://github.com/sebastianbergmann/diff.git", 1488 | "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6" 1489 | }, 1490 | "dist": { 1491 | "type": "zip", 1492 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/98ff311ca519c3aa73ccd3de053bdb377171d7b6", 1493 | "reference": "98ff311ca519c3aa73ccd3de053bdb377171d7b6", 1494 | "shasum": "" 1495 | }, 1496 | "require": { 1497 | "php": ">=7.1" 1498 | }, 1499 | "require-dev": { 1500 | "phpunit/phpunit": "^7.5 || ^8.0", 1501 | "symfony/process": "^2 || ^3.3 || ^4" 1502 | }, 1503 | "type": "library", 1504 | "extra": { 1505 | "branch-alias": { 1506 | "dev-master": "3.0-dev" 1507 | } 1508 | }, 1509 | "autoload": { 1510 | "classmap": [ 1511 | "src/" 1512 | ] 1513 | }, 1514 | "notification-url": "https://packagist.org/downloads/", 1515 | "license": [ 1516 | "BSD-3-Clause" 1517 | ], 1518 | "authors": [ 1519 | { 1520 | "name": "Sebastian Bergmann", 1521 | "email": "sebastian@phpunit.de" 1522 | }, 1523 | { 1524 | "name": "Kore Nordmann", 1525 | "email": "mail@kore-nordmann.de" 1526 | } 1527 | ], 1528 | "description": "Diff implementation", 1529 | "homepage": "https://github.com/sebastianbergmann/diff", 1530 | "keywords": [ 1531 | "diff", 1532 | "udiff", 1533 | "unidiff", 1534 | "unified diff" 1535 | ], 1536 | "support": { 1537 | "issues": "https://github.com/sebastianbergmann/diff/issues", 1538 | "source": "https://github.com/sebastianbergmann/diff/tree/3.0.6" 1539 | }, 1540 | "funding": [ 1541 | { 1542 | "url": "https://github.com/sebastianbergmann", 1543 | "type": "github" 1544 | } 1545 | ], 1546 | "time": "2024-03-02T06:16:36+00:00" 1547 | }, 1548 | { 1549 | "name": "sebastian/environment", 1550 | "version": "4.2.5", 1551 | "source": { 1552 | "type": "git", 1553 | "url": "https://github.com/sebastianbergmann/environment.git", 1554 | "reference": "56932f6049a0482853056ffd617c91ffcc754205" 1555 | }, 1556 | "dist": { 1557 | "type": "zip", 1558 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/56932f6049a0482853056ffd617c91ffcc754205", 1559 | "reference": "56932f6049a0482853056ffd617c91ffcc754205", 1560 | "shasum": "" 1561 | }, 1562 | "require": { 1563 | "php": ">=7.1" 1564 | }, 1565 | "require-dev": { 1566 | "phpunit/phpunit": "^7.5" 1567 | }, 1568 | "suggest": { 1569 | "ext-posix": "*" 1570 | }, 1571 | "type": "library", 1572 | "extra": { 1573 | "branch-alias": { 1574 | "dev-master": "4.2-dev" 1575 | } 1576 | }, 1577 | "autoload": { 1578 | "classmap": [ 1579 | "src/" 1580 | ] 1581 | }, 1582 | "notification-url": "https://packagist.org/downloads/", 1583 | "license": [ 1584 | "BSD-3-Clause" 1585 | ], 1586 | "authors": [ 1587 | { 1588 | "name": "Sebastian Bergmann", 1589 | "email": "sebastian@phpunit.de" 1590 | } 1591 | ], 1592 | "description": "Provides functionality to handle HHVM/PHP environments", 1593 | "homepage": "http://www.github.com/sebastianbergmann/environment", 1594 | "keywords": [ 1595 | "Xdebug", 1596 | "environment", 1597 | "hhvm" 1598 | ], 1599 | "support": { 1600 | "issues": "https://github.com/sebastianbergmann/environment/issues", 1601 | "source": "https://github.com/sebastianbergmann/environment/tree/4.2.5" 1602 | }, 1603 | "funding": [ 1604 | { 1605 | "url": "https://github.com/sebastianbergmann", 1606 | "type": "github" 1607 | } 1608 | ], 1609 | "time": "2024-03-01T13:49:59+00:00" 1610 | }, 1611 | { 1612 | "name": "sebastian/exporter", 1613 | "version": "3.1.6", 1614 | "source": { 1615 | "type": "git", 1616 | "url": "https://github.com/sebastianbergmann/exporter.git", 1617 | "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56" 1618 | }, 1619 | "dist": { 1620 | "type": "zip", 1621 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1939bc8fd1d39adcfa88c5b35335910869214c56", 1622 | "reference": "1939bc8fd1d39adcfa88c5b35335910869214c56", 1623 | "shasum": "" 1624 | }, 1625 | "require": { 1626 | "php": ">=7.2", 1627 | "sebastian/recursion-context": "^3.0" 1628 | }, 1629 | "require-dev": { 1630 | "ext-mbstring": "*", 1631 | "phpunit/phpunit": "^8.5" 1632 | }, 1633 | "type": "library", 1634 | "extra": { 1635 | "branch-alias": { 1636 | "dev-master": "3.1.x-dev" 1637 | } 1638 | }, 1639 | "autoload": { 1640 | "classmap": [ 1641 | "src/" 1642 | ] 1643 | }, 1644 | "notification-url": "https://packagist.org/downloads/", 1645 | "license": [ 1646 | "BSD-3-Clause" 1647 | ], 1648 | "authors": [ 1649 | { 1650 | "name": "Sebastian Bergmann", 1651 | "email": "sebastian@phpunit.de" 1652 | }, 1653 | { 1654 | "name": "Jeff Welch", 1655 | "email": "whatthejeff@gmail.com" 1656 | }, 1657 | { 1658 | "name": "Volker Dusch", 1659 | "email": "github@wallbash.com" 1660 | }, 1661 | { 1662 | "name": "Adam Harvey", 1663 | "email": "aharvey@php.net" 1664 | }, 1665 | { 1666 | "name": "Bernhard Schussek", 1667 | "email": "bschussek@gmail.com" 1668 | } 1669 | ], 1670 | "description": "Provides the functionality to export PHP variables for visualization", 1671 | "homepage": "http://www.github.com/sebastianbergmann/exporter", 1672 | "keywords": [ 1673 | "export", 1674 | "exporter" 1675 | ], 1676 | "support": { 1677 | "issues": "https://github.com/sebastianbergmann/exporter/issues", 1678 | "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.6" 1679 | }, 1680 | "funding": [ 1681 | { 1682 | "url": "https://github.com/sebastianbergmann", 1683 | "type": "github" 1684 | } 1685 | ], 1686 | "time": "2024-03-02T06:21:38+00:00" 1687 | }, 1688 | { 1689 | "name": "sebastian/global-state", 1690 | "version": "3.0.5", 1691 | "source": { 1692 | "type": "git", 1693 | "url": "https://github.com/sebastianbergmann/global-state.git", 1694 | "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9" 1695 | }, 1696 | "dist": { 1697 | "type": "zip", 1698 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/91c7c47047a971f02de57ed6f040087ef110c5d9", 1699 | "reference": "91c7c47047a971f02de57ed6f040087ef110c5d9", 1700 | "shasum": "" 1701 | }, 1702 | "require": { 1703 | "php": ">=7.2", 1704 | "sebastian/object-reflector": "^1.1.1", 1705 | "sebastian/recursion-context": "^3.0" 1706 | }, 1707 | "require-dev": { 1708 | "ext-dom": "*", 1709 | "phpunit/phpunit": "^8.0" 1710 | }, 1711 | "suggest": { 1712 | "ext-uopz": "*" 1713 | }, 1714 | "type": "library", 1715 | "extra": { 1716 | "branch-alias": { 1717 | "dev-master": "3.0-dev" 1718 | } 1719 | }, 1720 | "autoload": { 1721 | "classmap": [ 1722 | "src/" 1723 | ] 1724 | }, 1725 | "notification-url": "https://packagist.org/downloads/", 1726 | "license": [ 1727 | "BSD-3-Clause" 1728 | ], 1729 | "authors": [ 1730 | { 1731 | "name": "Sebastian Bergmann", 1732 | "email": "sebastian@phpunit.de" 1733 | } 1734 | ], 1735 | "description": "Snapshotting of global state", 1736 | "homepage": "http://www.github.com/sebastianbergmann/global-state", 1737 | "keywords": [ 1738 | "global state" 1739 | ], 1740 | "support": { 1741 | "issues": "https://github.com/sebastianbergmann/global-state/issues", 1742 | "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.5" 1743 | }, 1744 | "funding": [ 1745 | { 1746 | "url": "https://github.com/sebastianbergmann", 1747 | "type": "github" 1748 | } 1749 | ], 1750 | "time": "2024-03-02T06:13:16+00:00" 1751 | }, 1752 | { 1753 | "name": "sebastian/object-enumerator", 1754 | "version": "3.0.5", 1755 | "source": { 1756 | "type": "git", 1757 | "url": "https://github.com/sebastianbergmann/object-enumerator.git", 1758 | "reference": "ac5b293dba925751b808e02923399fb44ff0d541" 1759 | }, 1760 | "dist": { 1761 | "type": "zip", 1762 | "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/ac5b293dba925751b808e02923399fb44ff0d541", 1763 | "reference": "ac5b293dba925751b808e02923399fb44ff0d541", 1764 | "shasum": "" 1765 | }, 1766 | "require": { 1767 | "php": ">=7.0", 1768 | "sebastian/object-reflector": "^1.1.1", 1769 | "sebastian/recursion-context": "^3.0" 1770 | }, 1771 | "require-dev": { 1772 | "phpunit/phpunit": "^6.0" 1773 | }, 1774 | "type": "library", 1775 | "extra": { 1776 | "branch-alias": { 1777 | "dev-master": "3.0.x-dev" 1778 | } 1779 | }, 1780 | "autoload": { 1781 | "classmap": [ 1782 | "src/" 1783 | ] 1784 | }, 1785 | "notification-url": "https://packagist.org/downloads/", 1786 | "license": [ 1787 | "BSD-3-Clause" 1788 | ], 1789 | "authors": [ 1790 | { 1791 | "name": "Sebastian Bergmann", 1792 | "email": "sebastian@phpunit.de" 1793 | } 1794 | ], 1795 | "description": "Traverses array structures and object graphs to enumerate all referenced objects", 1796 | "homepage": "https://github.com/sebastianbergmann/object-enumerator/", 1797 | "support": { 1798 | "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", 1799 | "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.5" 1800 | }, 1801 | "funding": [ 1802 | { 1803 | "url": "https://github.com/sebastianbergmann", 1804 | "type": "github" 1805 | } 1806 | ], 1807 | "time": "2024-03-01T13:54:02+00:00" 1808 | }, 1809 | { 1810 | "name": "sebastian/object-reflector", 1811 | "version": "1.1.3", 1812 | "source": { 1813 | "type": "git", 1814 | "url": "https://github.com/sebastianbergmann/object-reflector.git", 1815 | "reference": "1d439c229e61f244ff1f211e5c99737f90c67def" 1816 | }, 1817 | "dist": { 1818 | "type": "zip", 1819 | "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/1d439c229e61f244ff1f211e5c99737f90c67def", 1820 | "reference": "1d439c229e61f244ff1f211e5c99737f90c67def", 1821 | "shasum": "" 1822 | }, 1823 | "require": { 1824 | "php": ">=7.0" 1825 | }, 1826 | "require-dev": { 1827 | "phpunit/phpunit": "^6.0" 1828 | }, 1829 | "type": "library", 1830 | "extra": { 1831 | "branch-alias": { 1832 | "dev-master": "1.1-dev" 1833 | } 1834 | }, 1835 | "autoload": { 1836 | "classmap": [ 1837 | "src/" 1838 | ] 1839 | }, 1840 | "notification-url": "https://packagist.org/downloads/", 1841 | "license": [ 1842 | "BSD-3-Clause" 1843 | ], 1844 | "authors": [ 1845 | { 1846 | "name": "Sebastian Bergmann", 1847 | "email": "sebastian@phpunit.de" 1848 | } 1849 | ], 1850 | "description": "Allows reflection of object attributes, including inherited and non-public ones", 1851 | "homepage": "https://github.com/sebastianbergmann/object-reflector/", 1852 | "support": { 1853 | "issues": "https://github.com/sebastianbergmann/object-reflector/issues", 1854 | "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.3" 1855 | }, 1856 | "funding": [ 1857 | { 1858 | "url": "https://github.com/sebastianbergmann", 1859 | "type": "github" 1860 | } 1861 | ], 1862 | "time": "2024-03-01T13:56:04+00:00" 1863 | }, 1864 | { 1865 | "name": "sebastian/recursion-context", 1866 | "version": "3.0.2", 1867 | "source": { 1868 | "type": "git", 1869 | "url": "https://github.com/sebastianbergmann/recursion-context.git", 1870 | "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c" 1871 | }, 1872 | "dist": { 1873 | "type": "zip", 1874 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/9bfd3c6f1f08c026f542032dfb42813544f7d64c", 1875 | "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c", 1876 | "shasum": "" 1877 | }, 1878 | "require": { 1879 | "php": ">=7.0" 1880 | }, 1881 | "require-dev": { 1882 | "phpunit/phpunit": "^6.0" 1883 | }, 1884 | "type": "library", 1885 | "extra": { 1886 | "branch-alias": { 1887 | "dev-master": "3.0.x-dev" 1888 | } 1889 | }, 1890 | "autoload": { 1891 | "classmap": [ 1892 | "src/" 1893 | ] 1894 | }, 1895 | "notification-url": "https://packagist.org/downloads/", 1896 | "license": [ 1897 | "BSD-3-Clause" 1898 | ], 1899 | "authors": [ 1900 | { 1901 | "name": "Sebastian Bergmann", 1902 | "email": "sebastian@phpunit.de" 1903 | }, 1904 | { 1905 | "name": "Jeff Welch", 1906 | "email": "whatthejeff@gmail.com" 1907 | }, 1908 | { 1909 | "name": "Adam Harvey", 1910 | "email": "aharvey@php.net" 1911 | } 1912 | ], 1913 | "description": "Provides functionality to recursively process PHP variables", 1914 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", 1915 | "support": { 1916 | "issues": "https://github.com/sebastianbergmann/recursion-context/issues", 1917 | "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.2" 1918 | }, 1919 | "funding": [ 1920 | { 1921 | "url": "https://github.com/sebastianbergmann", 1922 | "type": "github" 1923 | } 1924 | ], 1925 | "time": "2024-03-01T14:07:30+00:00" 1926 | }, 1927 | { 1928 | "name": "sebastian/resource-operations", 1929 | "version": "2.0.3", 1930 | "source": { 1931 | "type": "git", 1932 | "url": "https://github.com/sebastianbergmann/resource-operations.git", 1933 | "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee" 1934 | }, 1935 | "dist": { 1936 | "type": "zip", 1937 | "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/72a7f7674d053d548003b16ff5a106e7e0e06eee", 1938 | "reference": "72a7f7674d053d548003b16ff5a106e7e0e06eee", 1939 | "shasum": "" 1940 | }, 1941 | "require": { 1942 | "php": ">=7.1" 1943 | }, 1944 | "type": "library", 1945 | "extra": { 1946 | "branch-alias": { 1947 | "dev-master": "2.0-dev" 1948 | } 1949 | }, 1950 | "autoload": { 1951 | "classmap": [ 1952 | "src/" 1953 | ] 1954 | }, 1955 | "notification-url": "https://packagist.org/downloads/", 1956 | "license": [ 1957 | "BSD-3-Clause" 1958 | ], 1959 | "authors": [ 1960 | { 1961 | "name": "Sebastian Bergmann", 1962 | "email": "sebastian@phpunit.de" 1963 | } 1964 | ], 1965 | "description": "Provides a list of PHP built-in functions that operate on resources", 1966 | "homepage": "https://www.github.com/sebastianbergmann/resource-operations", 1967 | "support": { 1968 | "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.3" 1969 | }, 1970 | "funding": [ 1971 | { 1972 | "url": "https://github.com/sebastianbergmann", 1973 | "type": "github" 1974 | } 1975 | ], 1976 | "time": "2024-03-01T13:59:09+00:00" 1977 | }, 1978 | { 1979 | "name": "sebastian/type", 1980 | "version": "1.1.5", 1981 | "source": { 1982 | "type": "git", 1983 | "url": "https://github.com/sebastianbergmann/type.git", 1984 | "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874" 1985 | }, 1986 | "dist": { 1987 | "type": "zip", 1988 | "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/18f071c3a29892b037d35e6b20ddf3ea39b42874", 1989 | "reference": "18f071c3a29892b037d35e6b20ddf3ea39b42874", 1990 | "shasum": "" 1991 | }, 1992 | "require": { 1993 | "php": ">=7.2" 1994 | }, 1995 | "require-dev": { 1996 | "phpunit/phpunit": "^8.2" 1997 | }, 1998 | "type": "library", 1999 | "extra": { 2000 | "branch-alias": { 2001 | "dev-master": "1.1-dev" 2002 | } 2003 | }, 2004 | "autoload": { 2005 | "classmap": [ 2006 | "src/" 2007 | ] 2008 | }, 2009 | "notification-url": "https://packagist.org/downloads/", 2010 | "license": [ 2011 | "BSD-3-Clause" 2012 | ], 2013 | "authors": [ 2014 | { 2015 | "name": "Sebastian Bergmann", 2016 | "email": "sebastian@phpunit.de", 2017 | "role": "lead" 2018 | } 2019 | ], 2020 | "description": "Collection of value objects that represent the types of the PHP type system", 2021 | "homepage": "https://github.com/sebastianbergmann/type", 2022 | "support": { 2023 | "issues": "https://github.com/sebastianbergmann/type/issues", 2024 | "source": "https://github.com/sebastianbergmann/type/tree/1.1.5" 2025 | }, 2026 | "funding": [ 2027 | { 2028 | "url": "https://github.com/sebastianbergmann", 2029 | "type": "github" 2030 | } 2031 | ], 2032 | "time": "2024-03-01T14:04:07+00:00" 2033 | }, 2034 | { 2035 | "name": "sebastian/version", 2036 | "version": "2.0.1", 2037 | "source": { 2038 | "type": "git", 2039 | "url": "https://github.com/sebastianbergmann/version.git", 2040 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" 2041 | }, 2042 | "dist": { 2043 | "type": "zip", 2044 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", 2045 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", 2046 | "shasum": "" 2047 | }, 2048 | "require": { 2049 | "php": ">=5.6" 2050 | }, 2051 | "type": "library", 2052 | "extra": { 2053 | "branch-alias": { 2054 | "dev-master": "2.0.x-dev" 2055 | } 2056 | }, 2057 | "autoload": { 2058 | "classmap": [ 2059 | "src/" 2060 | ] 2061 | }, 2062 | "notification-url": "https://packagist.org/downloads/", 2063 | "license": [ 2064 | "BSD-3-Clause" 2065 | ], 2066 | "authors": [ 2067 | { 2068 | "name": "Sebastian Bergmann", 2069 | "email": "sebastian@phpunit.de", 2070 | "role": "lead" 2071 | } 2072 | ], 2073 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", 2074 | "homepage": "https://github.com/sebastianbergmann/version", 2075 | "support": { 2076 | "issues": "https://github.com/sebastianbergmann/version/issues", 2077 | "source": "https://github.com/sebastianbergmann/version/tree/master" 2078 | }, 2079 | "time": "2016-10-03T07:35:21+00:00" 2080 | }, 2081 | { 2082 | "name": "theseer/tokenizer", 2083 | "version": "1.2.3", 2084 | "source": { 2085 | "type": "git", 2086 | "url": "https://github.com/theseer/tokenizer.git", 2087 | "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2" 2088 | }, 2089 | "dist": { 2090 | "type": "zip", 2091 | "url": "https://api.github.com/repos/theseer/tokenizer/zipball/737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", 2092 | "reference": "737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2", 2093 | "shasum": "" 2094 | }, 2095 | "require": { 2096 | "ext-dom": "*", 2097 | "ext-tokenizer": "*", 2098 | "ext-xmlwriter": "*", 2099 | "php": "^7.2 || ^8.0" 2100 | }, 2101 | "type": "library", 2102 | "autoload": { 2103 | "classmap": [ 2104 | "src/" 2105 | ] 2106 | }, 2107 | "notification-url": "https://packagist.org/downloads/", 2108 | "license": [ 2109 | "BSD-3-Clause" 2110 | ], 2111 | "authors": [ 2112 | { 2113 | "name": "Arne Blankerts", 2114 | "email": "arne@blankerts.de", 2115 | "role": "Developer" 2116 | } 2117 | ], 2118 | "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", 2119 | "support": { 2120 | "issues": "https://github.com/theseer/tokenizer/issues", 2121 | "source": "https://github.com/theseer/tokenizer/tree/1.2.3" 2122 | }, 2123 | "funding": [ 2124 | { 2125 | "url": "https://github.com/theseer", 2126 | "type": "github" 2127 | } 2128 | ], 2129 | "time": "2024-03-03T12:36:25+00:00" 2130 | } 2131 | ], 2132 | "aliases": [], 2133 | "minimum-stability": "stable", 2134 | "stability-flags": [], 2135 | "prefer-stable": false, 2136 | "prefer-lowest": false, 2137 | "platform": { 2138 | "ext-json": "*" 2139 | }, 2140 | "platform-dev": [], 2141 | "plugin-api-version": "2.6.0" 2142 | } 2143 | -------------------------------------------------------------------------------- /examples/assets/transcript.srt: -------------------------------------------------------------------------------- 1 | 1 2 | 00:00:00,540 --> 00:00:03,120 3 | Hi, my name's Scott Ko, as an entrepreneur, 4 | 5 | 2 6 | 00:00:03,180 --> 00:00:07,680 7 | I cannot overstate how important it is these days to use video as a tool to 8 | 9 | 3 10 | 00:00:07,681 --> 00:00:10,860 11 | reach your audience, your community, and your customers. 12 | 13 | 4 14 | 00:00:11,250 --> 00:00:15,780 15 | People connect with stories and video allows us to be the most authentic we can 16 | 17 | 5 18 | 00:00:15,781 --> 00:00:17,760 19 | be in order to tell those stories. 20 | 21 | 6 22 | 00:00:18,120 --> 00:00:21,780 23 | And so if you can present in front of a camera and you have the right tools to 24 | 25 | 7 26 | 00:00:21,781 --> 00:00:25,260 27 | support and amplify you, you can be unstoppable. 28 | 29 | -------------------------------------------------------------------------------- /examples/border.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 28 | } 29 | 30 | $this->apiKey = getenv('SHOTSTACK_KEY'); 31 | } 32 | 33 | public function render() 34 | { 35 | $config = Configuration::getDefaultConfiguration() 36 | ->setHost($this->apiUrl) 37 | ->setApiKey('x-api-key', $this->apiKey); 38 | 39 | $client = new EditApi(null, $config); 40 | 41 | // Border - top layer (track1) 42 | $borderAsset = new ImageAsset(); 43 | $borderAsset 44 | ->setSrc('https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/borders/80s-acid-pink-square.png'); 45 | 46 | $border = new Clip(); 47 | $border 48 | ->setAsset($borderAsset) 49 | ->setStart(0) 50 | ->setLength(1); 51 | 52 | $track1 = new Track(); 53 | $track1 54 | ->setClips([$border]); 55 | 56 | // Background image - bottom layer (track2) 57 | $imageAsset = new ImageAsset(); 58 | $imageAsset 59 | ->setSrc('https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/images/dolphins.jpg'); 60 | 61 | $image = new Clip(); 62 | $image 63 | ->setAsset($imageAsset) 64 | ->setStart(0) 65 | ->setLength(1); 66 | 67 | $track2 = new Track(); 68 | $track2 69 | ->setClips([$image]); 70 | 71 | $timeline = new Timeline(); 72 | $timeline 73 | ->setBackground("#000000") 74 | ->setTracks([$track1, $track2]); // Put track1 first to go above track2 75 | 76 | $output = new Output(); 77 | $output 78 | ->setFormat('jpg') 79 | ->setQuality('high') 80 | ->setSize((new Size()) 81 | ->setWidth(1000) 82 | ->setHeight(1000) 83 | ); 84 | 85 | $edit = new Edit(); 86 | $edit 87 | ->setTimeline($timeline) 88 | ->setOutput($output); 89 | 90 | try { 91 | $response = $client->postRender($edit)->getResponse(); 92 | } catch (ApiException $e) { 93 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 94 | } 95 | 96 | echo $response->getMessage() . "\n"; 97 | echo ">> Now check the progress of your render by running:\n"; 98 | echo ">> php examples/status.php " . $response->getId() . "\n"; 99 | } 100 | } 101 | 102 | $editor = new BorderDemo(); 103 | $editor->render(); 104 | -------------------------------------------------------------------------------- /examples/captions.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 30 | } 31 | 32 | $this->apiKey = getenv('SHOTSTACK_KEY'); 33 | } 34 | 35 | public function render() 36 | { 37 | $config = Configuration::getDefaultConfiguration() 38 | ->setHost($this->apiUrl) 39 | ->setApiKey('x-api-key', $this->apiKey); 40 | 41 | $client = new EditApi(null, $config); 42 | 43 | $videoAsset = new VideoAsset(); 44 | $videoAsset 45 | ->setSrc('https://github.com/shotstack/test-media/raw/main/captioning/scott-ko.mp4') 46 | ->setVolume(1); 47 | 48 | $videoClip = new Clip(); 49 | $videoClip 50 | ->setAsset($videoAsset) 51 | ->setLength(25.85) 52 | ->setStart(0); 53 | 54 | $clips = []; 55 | 56 | $parser = new Parser(); 57 | $parser->loadFile(__DIR__ . '/assets/transcript.srt'); 58 | $captions = $parser->parse(); 59 | 60 | foreach ($captions as $index => $caption) { 61 | $captionAsset = new TitleAsset(); 62 | $captionAsset 63 | ->setText(wordwrap($caption->text, 80, "\n")) 64 | ->setStyle('subtitle') 65 | ->setBackground('#000000') 66 | ->setPosition('bottom') 67 | ->setOffset((new Offset)->setY(-0.4)) 68 | ->setSize('small'); 69 | 70 | $clip = new Clip(); 71 | $clip 72 | ->setAsset($captionAsset) 73 | ->setLength($caption->endTime - ($caption->startTime + 0.1) ) 74 | ->setStart($caption->startTime); 75 | 76 | $clips[] = $clip; 77 | } 78 | 79 | $track1 = new Track(); 80 | $track1 81 | ->setClips($clips); 82 | 83 | $track2 = new Track(); 84 | $track2 85 | ->setClips([$videoClip]); 86 | 87 | $timeline = new Timeline(); 88 | $timeline 89 | ->setTracks([$track1,$track2]); 90 | 91 | $output = new Output(); 92 | $output 93 | ->setFormat('mp4') 94 | ->setResolution('sd'); 95 | 96 | $edit = new Edit(); 97 | $edit 98 | ->setTimeline($timeline) 99 | ->setOutput($output); 100 | 101 | try { 102 | $response = $client->postRender($edit)->getResponse(); 103 | } catch (ApiException $e) { 104 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 105 | } 106 | 107 | echo $response->getMessage() . "\n"; 108 | echo ">> Now check the progress of your render by running:\n"; 109 | echo ">> php examples/status.php " . $response->getId() . "\n"; 110 | } 111 | } 112 | 113 | $demo = new CaptionsDemo(); 114 | $demo->render(); 115 | -------------------------------------------------------------------------------- /examples/destination.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 34 | } 35 | 36 | $this->apiKey = getenv('SHOTSTACK_KEY'); 37 | } 38 | 39 | public function render() 40 | { 41 | $config = Configuration::getDefaultConfiguration() 42 | ->setHost($this->apiUrl) 43 | ->setApiKey('x-api-key', $this->apiKey); 44 | 45 | $client = new EditApi(null, $config); 46 | 47 | $soundtrack = new Soundtrack(); 48 | $soundtrack 49 | ->setEffect("fadeInFadeOut") 50 | ->setSrc("https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/music/gangsta.mp3"); 51 | 52 | $clips = []; 53 | $start = 0; 54 | $length = 3; 55 | 56 | foreach ($this->images as $index => $image) { 57 | $imageAsset = new ImageAsset(); 58 | $imageAsset->setSrc($image); 59 | 60 | $clip = new Clip(); 61 | $clip 62 | ->setAsset($imageAsset) 63 | ->setLength($length) 64 | ->setStart($start) 65 | ->setEffect('zoomIn'); 66 | 67 | $start += $length; 68 | 69 | $clips[] = $clip; 70 | } 71 | 72 | $track1 = new Track(); 73 | $track1 74 | ->setClips($clips); 75 | 76 | $timeline = new Timeline(); 77 | $timeline 78 | ->setBackground("#000000") 79 | ->setSoundtrack($soundtrack) 80 | ->setTracks([$track1]); 81 | 82 | // Exclude from hosting 83 | $destination = new ShotstackDestination(); 84 | $destination->setExclude(true); 85 | 86 | $output = new Output(); 87 | $output 88 | ->setFormat('mp4') 89 | ->setResolution('sd') 90 | ->setDestinations([ 91 | $destination 92 | ]); 93 | 94 | $edit = new Edit(); 95 | $edit 96 | ->setTimeline($timeline) 97 | ->setOutput($output); 98 | 99 | try { 100 | $response = $client->postRender($edit)->getResponse(); 101 | } catch (ApiException $e) { 102 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 103 | } 104 | 105 | echo $response->getMessage() . "\n"; 106 | echo ">> Now check the progress of your render by running:\n"; 107 | echo ">> php examples/status.php " . $response->getId() . "\n"; 108 | } 109 | } 110 | 111 | $demo = new DestinationDemo(); 112 | $demo->render(); 113 | -------------------------------------------------------------------------------- /examples/filters.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 40 | } 41 | 42 | $this->apiKey = getenv('SHOTSTACK_KEY'); 43 | } 44 | 45 | public function render() 46 | { 47 | $config = Configuration::getDefaultConfiguration() 48 | ->setHost($this->apiUrl) 49 | ->setApiKey('x-api-key', $this->apiKey); 50 | 51 | $client = new EditApi(null, $config); 52 | 53 | $soundtrack = new Soundtrack(); 54 | $soundtrack 55 | ->setEffect("fadeInFadeOut") 56 | ->setSrc("https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/music/freeflow.mp3"); 57 | 58 | $videoClips = []; 59 | $titleClips = []; 60 | $start = 0; 61 | $length = 3; 62 | $trim = 0; 63 | $end = $length; 64 | 65 | foreach ($this->filters as $index => $filter) { 66 | // Video clips 67 | $videoAsset = new VideoAsset(); 68 | $videoAsset 69 | ->setSrc('https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/footage/skater.hd.mp4') 70 | ->setTrim($trim); 71 | 72 | $videoClip = new Clip(); 73 | $videoClip 74 | ->setAsset($videoAsset) 75 | ->setLength($length) 76 | ->setStart($start); 77 | 78 | if ($filter !== 'original') { 79 | $videoTransition = new Transition(); 80 | $videoTransition->setIn('wipeRight'); 81 | 82 | $videoClip 83 | ->setTransition($videoTransition) 84 | ->setLength($length + 1) 85 | ->setFilter($filter); 86 | } 87 | 88 | $videoClips[] = $videoClip; 89 | 90 | // Title clips 91 | $titleTransition = new Transition(); 92 | $titleTransition 93 | ->setIn('fade') 94 | ->setOut('fade'); 95 | 96 | $titleAsset = new TitleAsset(); 97 | $titleAsset 98 | ->setText($filter) 99 | ->setStyle('minimal') 100 | ->setSize('x-small'); 101 | 102 | $titleClip = new Clip(); 103 | $titleClip 104 | ->setAsset($titleAsset) 105 | ->setLength($length - ($start === 0 ? 1 : 0)) 106 | ->setStart($start) 107 | ->setTransition($titleTransition); 108 | 109 | $titleClips[] = $titleClip; 110 | 111 | $trim = $end - 1; 112 | $end = $trim + $length + 1; 113 | $start = $trim; 114 | } 115 | 116 | $track1 = new Track(); 117 | $track1 118 | ->setClips($titleClips); 119 | 120 | $track2 = new Track(); 121 | $track2 122 | ->setClips($videoClips); 123 | 124 | $timeline = new Timeline(); 125 | $timeline 126 | ->setBackground("#000000") 127 | ->setSoundtrack($soundtrack) 128 | ->setTracks([$track1, $track2]); 129 | 130 | $output = new Output(); 131 | $output 132 | ->setFormat('mp4') 133 | ->setResolution('sd'); 134 | 135 | $edit = new Edit(); 136 | $edit 137 | ->setTimeline($timeline) 138 | ->setOutput($output); 139 | 140 | try { 141 | $response = $client->postRender($edit)->getResponse(); 142 | } catch (ApiException $e) { 143 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 144 | } 145 | 146 | echo $response->getMessage() . "\n"; 147 | echo ">> Now check the progress of your render by running:\n"; 148 | echo ">> php examples/status.php " . $response->getId() . "\n"; 149 | } 150 | } 151 | 152 | $editor = new FiltersDemo(); 153 | $editor->render(); 154 | -------------------------------------------------------------------------------- /examples/gif.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 33 | } 34 | 35 | $this->apiKey = getenv('SHOTSTACK_KEY'); 36 | } 37 | 38 | public function render() 39 | { 40 | $config = Configuration::getDefaultConfiguration() 41 | ->setHost($this->apiUrl) 42 | ->setApiKey('x-api-key', $this->apiKey); 43 | 44 | $client = new EditApi(null, $config); 45 | 46 | $clips = []; 47 | $start = 0; 48 | $length = 1.5; 49 | 50 | foreach ($this->images as $index => $image) { 51 | $imageAsset = new ImageAsset(); 52 | $imageAsset->setSrc($image); 53 | 54 | $clip = new Clip(); 55 | $clip 56 | ->setAsset($imageAsset) 57 | ->setLength($length) 58 | ->setStart($start) 59 | ->setEffect('zoomIn'); 60 | 61 | $start += $length; 62 | 63 | $clips[] = $clip; 64 | } 65 | 66 | $track1 = new Track(); 67 | $track1 68 | ->setClips($clips); 69 | 70 | $timeline = new Timeline(); 71 | $timeline 72 | ->setBackground("#000000") 73 | ->setTracks([$track1]); 74 | 75 | $output = new Output(); 76 | $output 77 | ->setFormat('gif') 78 | ->setResolution('preview') 79 | ->setFps(12) 80 | ->setRepeat(false); 81 | 82 | $edit = new Edit(); 83 | $edit 84 | ->setTimeline($timeline) 85 | ->setOutput($output); 86 | 87 | try { 88 | $response = $client->postRender($edit)->getResponse(); 89 | } catch (ApiException $e) { 90 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 91 | } 92 | 93 | echo $response->getMessage() . "\n"; 94 | echo ">> Now check the progress of your render by running:\n"; 95 | echo ">> php examples/status.php " . $response->getId() . "\n"; 96 | } 97 | } 98 | 99 | $demo = new GifDemo(); 100 | $demo->render(); 101 | -------------------------------------------------------------------------------- /examples/images.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 40 | } 41 | 42 | $this->apiKey = getenv('SHOTSTACK_KEY'); 43 | } 44 | 45 | public function render() 46 | { 47 | $config = Configuration::getDefaultConfiguration() 48 | ->setHost($this->apiUrl) 49 | ->setApiKey('x-api-key', $this->apiKey); 50 | 51 | $client = new EditApi(null, $config); 52 | 53 | $soundtrack = new Soundtrack(); 54 | $soundtrack 55 | ->setEffect("fadeInFadeOut") 56 | ->setSrc("https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/music/gangsta.mp3"); 57 | 58 | $clips = []; 59 | $start = 0; 60 | $length = 1.5; 61 | 62 | foreach ($this->images as $index => $image) { 63 | $imageAsset = new ImageAsset(); 64 | $imageAsset->setSrc($image); 65 | 66 | $clip = new Clip(); 67 | $clip 68 | ->setAsset($imageAsset) 69 | ->setLength($length) 70 | ->setStart($start) 71 | ->setEffect('zoomIn'); 72 | 73 | $start += $length; 74 | 75 | $clips[] = $clip; 76 | } 77 | 78 | $track1 = new Track(); 79 | $track1 80 | ->setClips($clips); 81 | 82 | $timeline = new Timeline(); 83 | $timeline 84 | ->setBackground("#000000") 85 | ->setSoundtrack($soundtrack) 86 | ->setTracks([$track1]); 87 | 88 | $output = new Output(); 89 | $output 90 | ->setFormat('mp4') 91 | ->setResolution('sd'); 92 | 93 | $edit = new Edit(); 94 | $edit 95 | ->setTimeline($timeline) 96 | ->setOutput($output); 97 | 98 | try { 99 | $response = $client->postRender($edit)->getResponse(); 100 | } catch (ApiException $e) { 101 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 102 | } 103 | 104 | echo $response->getMessage() . "\n"; 105 | echo ">> Now check the progress of your render by running:\n"; 106 | echo ">> php examples/status.php " . $response->getId() . "\n"; 107 | } 108 | } 109 | 110 | $demo = new ImageDemo(); 111 | $demo->render(); 112 | -------------------------------------------------------------------------------- /examples/layers.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 29 | } 30 | 31 | $this->apiKey = getenv('SHOTSTACK_KEY'); 32 | } 33 | 34 | public function render() 35 | { 36 | $config = Configuration::getDefaultConfiguration() 37 | ->setHost($this->apiUrl) 38 | ->setApiKey('x-api-key', $this->apiKey); 39 | 40 | $client = new EditApi(null, $config); 41 | 42 | $soundtrack = new Soundtrack(); 43 | $soundtrack 44 | ->setEffect("fadeOut") 45 | ->setSrc("https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/music/freepd/fireworks.mp3"); 46 | 47 | // Title - top layer (track1) 48 | $titleAsset = new TitleAsset(); 49 | $titleAsset 50 | ->setStyle('chunk') 51 | ->setText('HELLO WORLD') 52 | ->setSize('x-large'); 53 | 54 | $title = new Clip(); 55 | $title 56 | ->setAsset($titleAsset) 57 | ->setStart(0) 58 | ->setLength(10) 59 | ->setEffect('zoomIn') 60 | ->setOpacity(0.35); 61 | 62 | $track1 = new Track(); 63 | $track1 64 | ->setClips([$title]); 65 | 66 | // Video - bottom layer (track2) 67 | $videoAsset = new VideoAsset(); 68 | $videoAsset 69 | ->setSrc('https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/footage/night-sky.mp4'); 70 | 71 | $video = new Clip(); 72 | $video 73 | ->setAsset($videoAsset) 74 | ->setStart(0) 75 | ->setLength(10); 76 | 77 | $track2 = new Track(); 78 | $track2 79 | ->setClips([$video]); 80 | 81 | $timeline = new Timeline(); 82 | $timeline 83 | ->setBackground("#000000") 84 | ->setSoundtrack($soundtrack) 85 | ->setTracks([$track1, $track2]); // Put track1 first to go above track2 86 | 87 | $output = new Output(); 88 | $output 89 | ->setFormat('mp4') 90 | ->setResolution('sd'); 91 | 92 | $edit = new Edit(); 93 | $edit 94 | ->setTimeline($timeline) 95 | ->setOutput($output); 96 | 97 | try { 98 | $response = $client->postRender($edit)->getResponse(); 99 | } catch (ApiException $e) { 100 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 101 | } 102 | 103 | echo $response->getMessage() . "\n"; 104 | echo ">> Now check the progress of your render by running:\n"; 105 | echo ">> php examples/status.php " . $response->getId() . "\n"; 106 | } 107 | } 108 | 109 | $editor = new LayersDemo(); 110 | $editor->render(); 111 | -------------------------------------------------------------------------------- /examples/luma.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 29 | } 30 | 31 | $this->apiKey = getenv('SHOTSTACK_KEY'); 32 | } 33 | 34 | public function render() 35 | { 36 | $config = Configuration::getDefaultConfiguration() 37 | ->setHost($this->apiUrl) 38 | ->setApiKey('x-api-key', $this->apiKey); 39 | 40 | $client = new EditApi(null, $config); 41 | 42 | $soundtrack = new Soundtrack(); 43 | $soundtrack 44 | ->setEffect("fadeOut") 45 | ->setSrc("https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/music/unminus/palmtrees.mp3"); 46 | 47 | // First luma matte - top layer (track1) 48 | $lumaAsset1 = new LumaAsset(); 49 | $lumaAsset1 50 | ->setSrc('https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/examples/luma-mattes/paint-left.mp4'); 51 | 52 | $lumaClip1 = new Clip(); 53 | $lumaClip1 54 | ->setAsset($lumaAsset1) 55 | ->setStart(3.6) 56 | ->setLength(1.4); 57 | 58 | $videoAsset1 = new VideoAsset(); 59 | $videoAsset1 60 | ->setSrc('https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/footage/table-mountain.mp4'); 61 | 62 | $videoClip1 = new Clip(); 63 | $videoClip1 64 | ->setAsset($videoAsset1) 65 | ->setStart(0) 66 | ->setLength(5); 67 | 68 | $track1 = new Track(); 69 | $track1 70 | ->setClips([$lumaClip1, $videoClip1]); 71 | 72 | // Video on second track to be revealed with luma matte to reveal third track 73 | $lumaAsset2 = new LumaAsset(); 74 | $lumaAsset2 75 | ->setSrc('https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/examples/luma-mattes/paint-right.mp4'); 76 | 77 | $lumaClip2 = new Clip(); 78 | $lumaClip2 79 | ->setAsset($lumaAsset2) 80 | ->setStart(7.2) 81 | ->setLength(1.4); 82 | 83 | $videoAsset2 = new VideoAsset(); 84 | $videoAsset2 85 | ->setSrc('https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/footage/road.mp4'); 86 | 87 | $videoClip2 = new Clip(); 88 | $videoClip2 89 | ->setAsset($videoAsset2) 90 | ->setStart(3.6) 91 | ->setLength(5); 92 | 93 | $track2 = new Track(); 94 | $track2 95 | ->setClips([$lumaClip2, $videoClip2]); 96 | 97 | // Final video on third track 98 | $videoAsset3 = new VideoAsset(); 99 | $videoAsset3 100 | ->setSrc('https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/footage/lake.mp4'); 101 | 102 | $videoClip3 = new Clip(); 103 | $videoClip3 104 | ->setAsset($videoAsset3) 105 | ->setStart(7.2) 106 | ->setLength(5); 107 | 108 | $track3 = new Track(); 109 | $track3 110 | ->setClips([$videoClip3]); 111 | 112 | $timeline = new Timeline(); 113 | $timeline 114 | ->setBackground("#000000") 115 | ->setSoundtrack($soundtrack) 116 | ->setTracks([$track1, $track2, $track3]); 117 | 118 | $output = new Output(); 119 | $output 120 | ->setFormat('mp4') 121 | ->setResolution('sd'); 122 | 123 | $edit = new Edit(); 124 | $edit 125 | ->setTimeline($timeline) 126 | ->setOutput($output); 127 | 128 | try { 129 | $response = $client->postRender($edit)->getResponse(); 130 | } catch (ApiException $e) { 131 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 132 | } 133 | 134 | echo $response->getMessage() . "\n"; 135 | echo ">> Now check the progress of your render by running:\n"; 136 | echo ">> php examples/status.php " . $response->getId() . "\n"; 137 | } 138 | } 139 | 140 | $editor = new LumaDemo(); 141 | $editor->render(); 142 | -------------------------------------------------------------------------------- /examples/merge.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 29 | } 30 | 31 | $this->apiKey = getenv('SHOTSTACK_KEY'); 32 | } 33 | 34 | public function render() 35 | { 36 | $config = Configuration::getDefaultConfiguration() 37 | ->setHost($this->apiUrl) 38 | ->setApiKey('x-api-key', $this->apiKey); 39 | 40 | $client = new EditApi(null, $config); 41 | 42 | $soundtrack = new Soundtrack(); 43 | $soundtrack 44 | ->setEffect("fadeInFadeOut") 45 | ->setSrc("https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/music/disco.mp3"); 46 | 47 | $titleAsset = new TitleAsset(); 48 | $titleAsset 49 | ->setStyle('minimal') 50 | ->setText('Hello {{NAME}}') 51 | ->setSize('x-small'); 52 | 53 | $title = new Clip(); 54 | $title 55 | ->setAsset($titleAsset) 56 | ->setStart(0) 57 | ->setLength(5) 58 | ->setEffect('zoomIn'); 59 | 60 | $track1 = new Track(); 61 | $track1 62 | ->setClips([$title]); 63 | 64 | $timeline = new Timeline(); 65 | $timeline 66 | ->setBackground("#000000") 67 | ->setSoundtrack($soundtrack) 68 | ->setTracks([$track1]); 69 | 70 | $output = new Output(); 71 | $output 72 | ->setFormat('mp4') 73 | ->setResolution('sd'); 74 | 75 | $mergeField = new MergeField(); 76 | $mergeField 77 | ->setFind('NAME') 78 | ->setReplace('Jane'); 79 | 80 | $edit = new Edit(); 81 | $edit 82 | ->setTimeline($timeline) 83 | ->setOutput($output) 84 | ->setMerge([ 85 | $mergeField 86 | ]); 87 | 88 | try { 89 | $response = $client->postRender($edit)->getResponse(); 90 | } catch (ApiException $e) { 91 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 92 | } 93 | 94 | echo $response->getMessage() . "\n"; 95 | echo ">> Now check the progress of your render by running:\n"; 96 | echo ">> php examples/status.php " . $response->getId() . "\n"; 97 | } 98 | } 99 | 100 | $editor = new MergeDemo(); 101 | $editor->render(); -------------------------------------------------------------------------------- /examples/probe.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 21 | } 22 | 23 | $this->apiKey = getenv('SHOTSTACK_KEY'); 24 | } 25 | 26 | public function render($url) 27 | { 28 | $config = Configuration::getDefaultConfiguration() 29 | ->setHost($this->apiUrl) 30 | ->setApiKey('x-api-key', $this->apiKey); 31 | 32 | $client = new EditApi(null, $config); 33 | 34 | try { 35 | $response = $client->probe($url)->getResponse(); 36 | } catch (ApiException $e) { 37 | die('Request failed or not found: ' . $e->getMessage() . $e->getResponseBody()); 38 | } 39 | 40 | foreach ($response['metadata']->streams as $stream) { 41 | if ($stream->codec_type === 'video') { 42 | echo 'Example settings for: ' . $response['metadata']->format->filename, PHP_EOL, PHP_EOL; 43 | echo 'Width: ' . $stream->width . 'px', PHP_EOL; 44 | echo 'Height: ' . $stream->height . 'px', PHP_EOL; 45 | echo 'Framerate: ' . $stream->r_frame_rate . ' fps', PHP_EOL; 46 | echo 'Duration: ' . $stream->duration . ' secs', PHP_EOL; 47 | } 48 | } 49 | } 50 | } 51 | 52 | if (empty($argv[1])) { 53 | echo ">> Please provide the URL to a media file to inspect (i.e. php examples/probe.php https://github.com/shotstack/test-media/raw/main/captioning/scott-ko.mp4)\n"; 54 | return; 55 | } 56 | 57 | $demo = new ProbeDemo(); 58 | $demo->render($argv[1]); 59 | -------------------------------------------------------------------------------- /examples/s3.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 46 | } 47 | 48 | $this->apiKey = getenv('SHOTSTACK_KEY'); 49 | } 50 | 51 | public function render() 52 | { 53 | $config = Configuration::getDefaultConfiguration() 54 | ->setHost($this->apiUrl) 55 | ->setApiKey('x-api-key', $this->apiKey); 56 | 57 | $client = new EditApi(null, $config); 58 | 59 | $soundtrack = new Soundtrack(); 60 | $soundtrack 61 | ->setEffect("fadeInFadeOut") 62 | ->setSrc("https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/music/gangsta.mp3"); 63 | 64 | $clips = []; 65 | $start = 0; 66 | $length = 4; 67 | 68 | foreach ($this->images as $index => $image) { 69 | $imageAsset = new ImageAsset(); 70 | $imageAsset->setSrc($image); 71 | 72 | $clip = new Clip(); 73 | $clip 74 | ->setAsset($imageAsset) 75 | ->setLength($length) 76 | ->setStart($start) 77 | ->setEffect('zoomIn'); 78 | 79 | $start += $length; 80 | 81 | $clips[] = $clip; 82 | } 83 | 84 | $track = new Track(); 85 | $track 86 | ->setClips($clips); 87 | 88 | $timeline = new Timeline(); 89 | $timeline 90 | ->setBackground("#000000") 91 | ->setSoundtrack($soundtrack) 92 | ->setTracks([$track]); 93 | 94 | // Exclude from Shotstack hosting 95 | $shotstackDestination = new ShotstackDestination(); 96 | $shotstackDestination 97 | ->setExclude(true); 98 | 99 | // Send to S3 bucket 100 | $s3Destination = new S3Destination(); 101 | $s3DestinationOptions = new S3DestinationOptions(); 102 | 103 | $s3DestinationOptions 104 | ->setRegion(self::S3_REGION) 105 | ->setBucket(self::S3_BUCKET) 106 | ->setAcl(self::S3_ACL); 107 | $s3Destination 108 | ->setOptions($s3DestinationOptions); 109 | 110 | $output = new Output(); 111 | $output 112 | ->setFormat('mp4') 113 | ->setResolution('sd') 114 | ->setDestinations([ 115 | $shotstackDestination, 116 | $s3Destination, 117 | ]); 118 | 119 | $edit = new Edit(); 120 | $edit 121 | ->setTimeline($timeline) 122 | ->setOutput($output); 123 | 124 | try { 125 | $response = $client->postRender($edit)->getResponse(); 126 | } catch (ApiException $e) { 127 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 128 | } 129 | 130 | echo $response->getMessage() . "\n"; 131 | echo ">> Now check the progress of your render by running:\n"; 132 | echo ">> php examples/status.php " . $response->getId() . "\n"; 133 | } 134 | } 135 | 136 | $demo = new S3Demo(); 137 | $demo->render(); 138 | -------------------------------------------------------------------------------- /examples/serve-api/assetId.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_SERVE_HOST'); 21 | } 22 | 23 | $this->apiKey = getenv('SHOTSTACK_KEY'); 24 | } 25 | 26 | public function get($id) 27 | { 28 | $config = Configuration::getDefaultConfiguration() 29 | ->setHost($this->apiUrl) 30 | ->setApiKey('x-api-key', $this->apiKey); 31 | 32 | $client = new ServeApi(null, $config); 33 | 34 | try { 35 | $response = $client->getAsset($id)->getData(); 36 | } catch (ApiException $e) { 37 | die('Request failed or not found: ' . $e->getMessage() . $e->getResponseBody()); 38 | } 39 | 40 | if ($response->getAttributes()->getStatus() === 'ready') { 41 | echo "\nStatus: " . strtoupper($response->getAttributes()->getStatus()) . "\n\n"; 42 | echo ">> Asset CDN URL: " . $response->getAttributes()->getUrl() . "\n"; 43 | echo ">> Asset ID: " . $response->getAttributes()->getId() . "\n"; 44 | echo ">> Render ID: " . $response->getAttributes()->getRenderId() . "\n"; 45 | } else if ($response->getAttributes()->getStatus() === 'failed') { 46 | echo ">> Something went wrong, asset could not be copied.\n"; 47 | } else { 48 | echo ">> Copying in progress, please try again in a few seconds.\n"; 49 | } 50 | } 51 | } 52 | 53 | if (empty($argv[1])) { 54 | echo ">> Please provide the UUID of the render task (i.e. php examples/serve-api/assetId.php 2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7)\n"; 55 | return; 56 | } 57 | 58 | $demo = new AssetByIdDemo(); 59 | $demo->get($argv[1]); 60 | -------------------------------------------------------------------------------- /examples/serve-api/renderId.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_SERVE_HOST'); 21 | } 22 | 23 | $this->apiKey = getenv('SHOTSTACK_KEY'); 24 | } 25 | 26 | public function get($id) 27 | { 28 | $config = Configuration::getDefaultConfiguration() 29 | ->setHost($this->apiUrl) 30 | ->setApiKey('x-api-key', $this->apiKey); 31 | 32 | $client = new ServeApi(null, $config); 33 | 34 | try { 35 | $response = $client->getAssetByRenderId($id)->getData(); 36 | } catch (ApiException $e) { 37 | die('Request failed or not found: ' . $e->getMessage() . $e->getResponseBody()); 38 | } 39 | 40 | foreach ($response as $asset) { 41 | if ($asset->getAttributes()->getStatus() === 'ready') { 42 | echo "\nStatus: " . strtoupper($asset->getAttributes()->getStatus()) . "\n\n"; 43 | echo ">> Asset CDN URL: " . $asset->getAttributes()->getUrl() . "\n"; 44 | echo ">> Asset ID: " . $asset->getAttributes()->getId() . "\n"; 45 | echo ">> Render ID: " . $asset->getAttributes()->getRenderId() . "\n"; 46 | } else if ($asset->getAttributes()->getStatus() === 'failed') { 47 | echo ">> Something went wrong, asset could not be copied.\n"; 48 | } else { 49 | echo ">> Copying in progress, please try again in a few seconds.\n"; 50 | } 51 | } 52 | } 53 | } 54 | 55 | if (empty($argv[1])) { 56 | echo ">> Please provide the UUID of the render task (i.e. php examples/serve-api/renderId.php 2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7)\n"; 57 | return; 58 | } 59 | 60 | $demo = new AssetByRenderIdDemo(); 61 | $demo->get($argv[1]); 62 | -------------------------------------------------------------------------------- /examples/status.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 21 | } 22 | 23 | $this->apiKey = getenv('SHOTSTACK_KEY'); 24 | } 25 | 26 | public function render($id) 27 | { 28 | $config = Configuration::getDefaultConfiguration() 29 | ->setHost($this->apiUrl) 30 | ->setApiKey('x-api-key', $this->apiKey); 31 | 32 | $client = new EditApi(null, $config); 33 | 34 | try { 35 | $response = $client->getRender($id, false, true)->getResponse(); 36 | } catch (ApiException $e) { 37 | die('Request failed or not found: ' . $e->getMessage() . $e->getResponseBody()); 38 | } 39 | 40 | echo "\nStatus: " . strtoupper($response->getStatus()) . "\n\n"; 41 | 42 | if ($response->getStatus() == 'done') { 43 | echo ">> Asset URL: " . $response->getUrl() . "\n"; 44 | } else if ($response->getStatus() == 'failed') { 45 | echo ">> Something went wrong, rendering has terminated and will not continue.\n"; 46 | } else { 47 | echo ">> Rendering in progress, please try again shortly.\n>> Note: Rendering may take up to 1 minute to complete.\n"; 48 | } 49 | } 50 | } 51 | 52 | if (empty($argv[1])) { 53 | echo ">> Please provide the UUID of the render task (i.e. php examples/status.php 2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7)\n"; 54 | return; 55 | } 56 | 57 | $demo = new StatusDemo(); 58 | $demo->render($argv[1]); 59 | -------------------------------------------------------------------------------- /examples/templates/create.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 28 | } 29 | 30 | $this->apiKey = getenv('SHOTSTACK_KEY'); 31 | } 32 | 33 | public function post() 34 | { 35 | $config = Configuration::getDefaultConfiguration() 36 | ->setHost($this->apiUrl) 37 | ->setApiKey('x-api-key', $this->apiKey); 38 | 39 | $client = new EditApi(null, $config); 40 | 41 | $videoAsset = new videoAsset(); 42 | $videoAsset 43 | ->setSrc('{{ URL }}') 44 | ->setTrim('{{ TRIM }}'); 45 | 46 | $videoClip = new Clip(); 47 | $videoClip 48 | ->setAsset($videoAsset) 49 | ->setStart(0) 50 | ->setLength('{{ LENGTH }}'); 51 | 52 | $track = new Track(); 53 | $track 54 | ->setClips([$videoClip]); 55 | 56 | $timeline = new Timeline(); 57 | $timeline 58 | ->setTracks([$track]); 59 | 60 | $output = new Output(); 61 | $output 62 | ->setFormat('mp4') 63 | ->setResolution('sd'); 64 | 65 | $edit = new Edit(); 66 | $edit 67 | ->setTimeline($timeline) 68 | ->setOutput($output); 69 | 70 | $template = new Template(); 71 | $template 72 | ->setName('Trim Template') 73 | ->setTemplate($edit); 74 | 75 | try { 76 | $response = $client->postTemplate($template)->getResponse(); 77 | } catch (ApiException $e) { 78 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 79 | } 80 | 81 | echo $response->getMessage() . "\n"; 82 | echo ">> Now get the template details using:\n"; 83 | echo ">> php examples/templates/get.php " . $response->getId() . "\n\n"; 84 | echo ">> or render the template using:\n"; 85 | echo ">> php examples/templates/render.php " . $response->getId() . "\n\n"; 86 | } 87 | } 88 | 89 | $template = new CreateTemplate(); 90 | $template->post(); -------------------------------------------------------------------------------- /examples/templates/get.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 21 | } 22 | 23 | $this->apiKey = getenv('SHOTSTACK_KEY'); 24 | } 25 | 26 | public function fetch($id) 27 | { 28 | $config = Configuration::getDefaultConfiguration() 29 | ->setHost($this->apiUrl) 30 | ->setApiKey('x-api-key', $this->apiKey); 31 | 32 | $client = new EditApi(null, $config); 33 | 34 | try { 35 | $response = $client->getTemplate($id); 36 | } catch (ApiException $e) { 37 | die('Request failed or not found: ' . $e->getMessage()); 38 | } 39 | 40 | echo "\nTemplate found\n\n"; 41 | echo ">> Template name: " . $response->getResponse()->getName() . "\n"; 42 | echo ">> Template JSON: " . $response->getResponse()->getTemplate() . "\n\n"; 43 | echo ">> Now render the template using:\n"; 44 | echo ">> php examples/templates/render.php " . $response->getResponse()->getId() . "\n\n"; 45 | } 46 | } 47 | 48 | if (empty($argv[1])) { 49 | echo ">> Please provide the UUID of the template (i.e. php examples/templates/get.php 2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7)\n"; 50 | return; 51 | } 52 | 53 | $template = new GetTemplate(); 54 | $template->fetch($argv[1]); 55 | -------------------------------------------------------------------------------- /examples/templates/render.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 23 | } 24 | 25 | $this->apiKey = getenv('SHOTSTACK_KEY'); 26 | } 27 | 28 | public function render(string $id) 29 | { 30 | $config = Configuration::getDefaultConfiguration() 31 | ->setHost($this->apiUrl) 32 | ->setApiKey('x-api-key', $this->apiKey); 33 | 34 | $client = new EditApi(null, $config); 35 | 36 | $mergeFieldUrl = new MergeField(); 37 | $mergeFieldUrl 38 | ->setFind('URL') 39 | ->setReplace('https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/footage/skater.hd.mp4'); 40 | 41 | $mergeFieldTrim = new MergeField(); 42 | $mergeFieldTrim 43 | ->setFind('TRIM') 44 | ->setReplace(3); 45 | 46 | $mergeFieldLength = new MergeField(); 47 | $mergeFieldLength 48 | ->setFind('LENGTH') 49 | ->setReplace(6); 50 | 51 | $template = new TemplateRender(); 52 | $template 53 | ->setId($id) 54 | ->setMerge([ 55 | $mergeFieldUrl, 56 | $mergeFieldTrim, 57 | $mergeFieldLength, 58 | ]); 59 | 60 | try { 61 | $response = $client->postTemplateRender($template)->getResponse(); 62 | } catch (ApiException $e) { 63 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 64 | } 65 | 66 | echo $response->getMessage() . "\n"; 67 | echo ">> Now check the progress of your render by running:\n"; 68 | echo ">> php examples/status.php " . $response->getId() . "\n"; 69 | } 70 | } 71 | 72 | if (empty($argv[1])) { 73 | echo ">> Please provide the UUID of the template (i.e. php examples/templates/render.php 2abd5c11-0f3d-4c6d-ba20-235fc9b8e8b7)\n"; 74 | return; 75 | } 76 | 77 | $template = new RenderTemplate(); 78 | $template->render($argv[1]); 79 | -------------------------------------------------------------------------------- /examples/text.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 28 | } 29 | 30 | $this->apiKey = getenv('SHOTSTACK_KEY'); 31 | } 32 | 33 | public function render() 34 | { 35 | $config = Configuration::getDefaultConfiguration() 36 | ->setHost($this->apiUrl) 37 | ->setApiKey('x-api-key', $this->apiKey); 38 | 39 | $client = new EditApi(null, $config); 40 | 41 | $soundtrack = new Soundtrack(); 42 | $soundtrack 43 | ->setEffect("fadeInFadeOut") 44 | ->setSrc("https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/music/disco.mp3"); 45 | 46 | $titleAsset = new TitleAsset(); 47 | $titleAsset 48 | ->setStyle('minimal') 49 | ->setText('Hello World') 50 | ->setSize('x-small'); 51 | 52 | $title = new Clip(); 53 | $title 54 | ->setAsset($titleAsset) 55 | ->setStart(0) 56 | ->setLength(5) 57 | ->setEffect('zoomIn'); 58 | 59 | $track1 = new Track(); 60 | $track1 61 | ->setClips([$title]); 62 | 63 | $timeline = new Timeline(); 64 | $timeline 65 | ->setBackground("#000000") 66 | ->setSoundtrack($soundtrack) 67 | ->setTracks([$track1]); 68 | 69 | $output = new Output(); 70 | $output 71 | ->setFormat('mp4') 72 | ->setResolution('sd'); 73 | 74 | $edit = new Edit(); 75 | $edit 76 | ->setTimeline($timeline) 77 | ->setOutput($output); 78 | 79 | try { 80 | $response = $client->postRender($edit)->getResponse(); 81 | } catch (ApiException $e) { 82 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 83 | } 84 | 85 | echo $response->getMessage() . "\n"; 86 | echo ">> Now check the progress of your render by running:\n"; 87 | echo ">> php examples/status.php " . $response->getId() . "\n"; 88 | } 89 | } 90 | 91 | $editor = new TextDemo(); 92 | $editor->render(); -------------------------------------------------------------------------------- /examples/titles.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 41 | } 42 | 43 | $this->apiKey = getenv('SHOTSTACK_KEY'); 44 | } 45 | 46 | public function render() 47 | { 48 | $config = Configuration::getDefaultConfiguration() 49 | ->setHost($this->apiUrl) 50 | ->setApiKey('x-api-key', $this->apiKey); 51 | 52 | $client = new EditApi(null, $config); 53 | 54 | $soundtrack = new Soundtrack(); 55 | $soundtrack 56 | ->setEffect("fadeInFadeOut") 57 | ->setSrc("https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/music/dreams.mp3"); 58 | 59 | $clips = []; 60 | $start = 0; 61 | $length = 4; 62 | 63 | foreach ($this->styles as $index => $style) { 64 | $title = new TitleAsset(); 65 | $title 66 | ->setText($style) 67 | ->setStyle($style) 68 | ->setSize('small'); 69 | 70 | $transition = new Transition(); 71 | $transition 72 | ->setIn('fade') 73 | ->setOut('fade'); 74 | 75 | $clip = new Clip(); 76 | $clip 77 | ->setAsset($title) 78 | ->setStart($start) 79 | ->setLength($length) 80 | ->setTransition($transition) 81 | ->setEffect('zoomIn'); 82 | 83 | $start += $length; 84 | 85 | $clips[] = $clip; 86 | } 87 | 88 | $track1 = new Track(); 89 | $track1 90 | ->setClips($clips); 91 | 92 | $timeline = new Timeline(); 93 | $timeline 94 | ->setBackground("#000000") 95 | ->setSoundtrack($soundtrack) 96 | ->setTracks([$track1]); 97 | 98 | $output = new Output(); 99 | $output 100 | ->setFormat('mp4') 101 | ->setResolution('sd'); 102 | 103 | $edit = new Edit(); 104 | $edit 105 | ->setTimeline($timeline) 106 | ->setOutput($output); 107 | 108 | try { 109 | $response = $client->postRender($edit)->getResponse(); 110 | } catch (ApiException $e) { 111 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 112 | } 113 | 114 | echo $response->getMessage() . "\n"; 115 | echo ">> Now check the progress of your render by running:\n"; 116 | echo ">> php examples/status.php " . $response->getId() . "\n"; 117 | } 118 | } 119 | 120 | $editor = new TitlesDemo(); 121 | $editor->render(); 122 | -------------------------------------------------------------------------------- /examples/transform.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 31 | } 32 | 33 | $this->apiKey = getenv('SHOTSTACK_KEY'); 34 | } 35 | 36 | public function render() 37 | { 38 | $config = Configuration::getDefaultConfiguration() 39 | ->setHost($this->apiUrl) 40 | ->setApiKey('x-api-key', $this->apiKey); 41 | 42 | $client = new EditApi(null, $config); 43 | 44 | $videoAsset = new VideoAsset(); 45 | $videoAsset 46 | ->setSrc('https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/footage/skater.hd.mp4'); 47 | 48 | $rotate = new RotateTransformation(); 49 | $rotate 50 | ->setAngle(45); 51 | 52 | $skew = new SkewTransformation(); 53 | $skew 54 | ->setX(0.25) 55 | ->setY(0.1); 56 | 57 | $flip = new FlipTransformation(); 58 | $flip 59 | ->setHorizontal(true) 60 | ->setVertical(true); 61 | 62 | $transformation = new Transformation(); 63 | $transformation 64 | ->setRotate($rotate) 65 | ->setSkew($skew) 66 | ->setFlip($flip); 67 | 68 | $videoClip = new Clip(); 69 | $videoClip 70 | ->setAsset($videoAsset) 71 | ->setLength(8) 72 | ->setStart(0) 73 | ->setScale(0.6) 74 | ->setTransform($transformation); 75 | 76 | $track = new Track(); 77 | $track->setClips([$videoClip]); 78 | 79 | $timeline = new Timeline(); 80 | $timeline->setTracks([$track]); 81 | 82 | $output = new Output(); 83 | $output 84 | ->setFormat('mp4') 85 | ->setResolution('sd'); 86 | 87 | $edit = new Edit(); 88 | $edit 89 | ->setTimeline($timeline) 90 | ->setOutput($output); 91 | 92 | try { 93 | $response = $client->postRender($edit)->getResponse(); 94 | } catch (ApiException $e) { 95 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 96 | } 97 | 98 | echo $response->getMessage() . "\n"; 99 | echo ">> Now check the progress of your render by running:\n"; 100 | echo ">> php examples/status.php " . $response->getId() . "\n"; 101 | } 102 | } 103 | 104 | $editor = new TransformDemo(); 105 | $editor->render(); 106 | -------------------------------------------------------------------------------- /examples/trim.php: -------------------------------------------------------------------------------- 1 | apiUrl = getenv('SHOTSTACK_HOST'); 27 | } 28 | 29 | $this->apiKey = getenv('SHOTSTACK_KEY'); 30 | } 31 | 32 | public function render() 33 | { 34 | $config = Configuration::getDefaultConfiguration() 35 | ->setHost($this->apiUrl) 36 | ->setApiKey('x-api-key', $this->apiKey); 37 | 38 | $client = new EditApi(null, $config); 39 | 40 | $videoAsset = new VideoAsset(); 41 | $videoAsset 42 | ->setSrc('https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/footage/skater.hd.mp4') 43 | ->setTrim(3); 44 | 45 | $videoClip = new Clip(); 46 | $videoClip 47 | ->setAsset($videoAsset) 48 | ->setLength(8) 49 | ->setStart(0); 50 | 51 | $track = new Track(); 52 | $track->setClips([$videoClip]); 53 | 54 | $timeline = new Timeline(); 55 | $timeline->setTracks([$track]); 56 | 57 | $output = new Output(); 58 | $output 59 | ->setFormat('mp4') 60 | ->setResolution('hd'); 61 | 62 | $edit = new Edit(); 63 | $edit 64 | ->setTimeline($timeline) 65 | ->setOutput($output); 66 | 67 | try { 68 | $response = $client->postRender($edit)->getResponse(); 69 | } catch (ApiException $e) { 70 | die('Request failed: ' . $e->getMessage() . $e->getResponseBody()); 71 | } 72 | 73 | echo $response->getMessage() . "\n"; 74 | echo ">> Now check the progress of your render by running:\n"; 75 | echo ">> php examples/status.php " . $response->getId() . "\n"; 76 | } 77 | } 78 | 79 | $editor = new TrimDemo(); 80 | $editor->render(); 81 | --------------------------------------------------------------------------------