{"id":26378112,"url":"https://github.com/json2video/json2video-php-sdk","last_synced_at":"2025-09-07T17:41:45.970Z","repository":{"id":57002359,"uuid":"436738519","full_name":"JSON2Video/json2video-php-sdk","owner":"JSON2Video","description":"Video automation with PHP: add watermarks, resize videos, create slideshows, add soundtrack, voice-over with text-to-speech (TTS), text animations.","archived":false,"fork":false,"pushed_at":"2024-04-04T15:43:34.000Z","size":19,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T14:51:07.575Z","etag":null,"topics":["api","php","php7","slideshow","text-to-speech","video","video-automation","video-edit-sdk","video-editing","video-editing-api","video-processing","watermark-video","watermarking"],"latest_commit_sha":null,"homepage":"https://json2video.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JSON2Video.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-09T19:34:14.000Z","updated_at":"2024-12-19T17:40:31.000Z","dependencies_parsed_at":"2022-08-21T14:10:41.988Z","dependency_job_id":null,"html_url":"https://github.com/JSON2Video/json2video-php-sdk","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSON2Video%2Fjson2video-php-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSON2Video%2Fjson2video-php-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSON2Video%2Fjson2video-php-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSON2Video%2Fjson2video-php-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JSON2Video","download_url":"https://codeload.github.com/JSON2Video/json2video-php-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971180,"owners_count":20376784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","php","php7","slideshow","text-to-speech","video","video-automation","video-edit-sdk","video-editing","video-editing-api","video-processing","watermark-video","watermarking"],"created_at":"2025-03-17T04:21:15.014Z","updated_at":"2025-03-17T04:21:15.696Z","avatar_url":"https://github.com/JSON2Video.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Note: Updated for API v2.0\n\n# Create videos programmatically in PHP\nCreate and edit videos: add watermarks, resize videos, create slideshows, add soundtrack, automate the creation of videos in multiple languages, add voice-over, add text animations.\n\n[JSON2Video is a video editing API](https://json2video.com) that simplifies creating, editing and customising videos programmatically. Its dead simple approach, close to the web development mindset, makes it the ultimate solution for developers that want to create or customise videos in an automated way.\n\nAdditionally, the simple integration of real HTML5+CSS elements, the already built-in text animations and voice generation (TTS) converts JSON2Video in the best solution in its category.\n\nUse cases\n* Automate the production of promotional videos for your e-commerce products\n* Automate publication of social media videos created directly from your news feed\n* Customize your advertising campaigns with different images, videos, texts and create tens or hundreds of different options\n* From weather forecasts to traffic bulletins or financial reports, if you have a data source you can create an audiovisual experience\n* Convert your text, pictures and information into engaging videos of your real estate properties\n* Add watermarks, bumpers, titles; Concatenate different videos into one; Add voice-over or music; Create photo slideshows; …\n\n\n## Get your FREE API Key\nJSON2Video is free to use. Get your API Key at [JSON2Video.com](https://json2video.com)\n\n## Documentation\nThe [API Specification](https://json2video.com/docs/api/) will provide you with all the details of the JSON payload and the endpoints.\n\nFor a step by step guide, read the [Tutorial](https://json2video.com/docs/tutorial/) that will introduce you through all features with code examples.\n\n## PHP SDK installation\nYou can use JSON2Video PHP SDK as a Composer package or with a simple require_once.\n\n### Using require_once\nThe simplest way :-)\n\n1) Download [all.php](https://github.com/JSON2Video/json2video-php-sdk/blob/main/bundled/all.php) from the /bundled folder into your project directory\n2) Import the library:\n\n```php\n\u003c?php\n    require_once 'path/to/the/sdk/all.php';\n\n    use JSON2Video\\Movie;\n    use JSON2Video\\Scene;\n\n```\n\n### Using Composer\nThe SDK has no external dependencies on other packages.\n\n1) Open the terminal and cd to your project directory\n2) Use composer:\n\n```\ncomposer require json2video/json2video-php-sdk\n```\n\n## Hello world\nJSON2Video makes video creation easy as a piece of cake:\n\n```php\n\u003c?php\n\n    require 'vendor/autoload.php';\n\n    use JSON2Video\\Movie;\n    use JSON2Video\\Scene;\n\n    // Create a new movie\n    $movie = new Movie;\n\n    // Set your API key\n    // Get your free API key at https://json2video.com\n    $movie-\u003esetAPIKey(YOUR_API_KEY);\n\n    // Set movie quality: low, medium, high\n    $movie-\u003equality = 'high';\n    $movie-\u003edraft = true;\n\n    // Create a new scene\n    $scene = new Scene;\n\n    // Set the scene background color\n    $scene-\u003ebackground_color = '#4392F1';\n\n    // Add a text element printing \"Hello world\" in a fancy way (basic/006)\n    // The element is 10 seconds long and starts 2 seconds from the scene start\n    // Element's vertical position is 50 pixels from the top\n    $scene-\u003eaddElement([\n        'type' =\u003e 'text',\n        'style' =\u003e '003',\n        'text' =\u003e 'Hello world',\n        'duration' =\u003e 10,\n        'start' =\u003e 2\n    ]);\n\n    // Add the scene to the movie\n    $movie-\u003eaddScene($scene);\n\n    // Call the API and start rendering the movie\n    $result = $movie-\u003erender();\n    var_dump($result);\n\n    //$result = $movie-\u003egetStatus('cLiLZ7fKeMvjb4b8');\n    //var_dump($result);\n\n    // Wait for the render to finish\n    $movie-\u003ewaitToFinish();\n?\u003e\n```\n\nThis is the resulting video:\n\nhttps://assets.json2video.com/sites/github/hello-world.mp4\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjson2video%2Fjson2video-php-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjson2video%2Fjson2video-php-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjson2video%2Fjson2video-php-sdk/lists"}