{"id":13404849,"url":"https://github.com/char0n/ffmpeg-php","last_synced_at":"2025-05-15T07:05:01.839Z","repository":{"id":796803,"uuid":"496117","full_name":"char0n/ffmpeg-php","owner":"char0n","description":"FFmpegPHP is a pure OO PHP port of ffmpeg-php library that was written in C. It adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files. It has methods for returning frames from movie files as images that can be manipulated using PHP's image functions. This works well for automatically creating thumbnail images from movies. FFmpegPHP is also useful for reporting the duration and bitrate of audio files (mp3, wma...). FFmpegPHP can access many of the video formats supported by ffmpeg (mov, avi, mpg, wmv...) ","archived":false,"fork":false,"pushed_at":"2024-09-08T15:45:58.000Z","size":2692,"stargazers_count":493,"open_issues_count":2,"forks_count":94,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-11T15:57:13.387Z","etag":null,"topics":["audio","avconv","ffmpeg","ffprobe","php","video"],"latest_commit_sha":null,"homepage":"https://char0n.github.io/ffmpeg-php/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/char0n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["char0n"],"patreon":"char0n","ko_fi":"char0n","liberapay":"char0n","issuehunt":"char0n"}},"created_at":"2010-01-31T13:03:09.000Z","updated_at":"2025-02-04T03:57:41.000Z","dependencies_parsed_at":"2024-09-25T01:59:40.487Z","dependency_job_id":"f50221f0-236d-414f-82c8-a3263e8b6af9","html_url":"https://github.com/char0n/ffmpeg-php","commit_stats":{"total_commits":240,"total_committers":17,"mean_commits":"14.117647058823529","dds":0.5041666666666667,"last_synced_commit":"f11dfc35739c478d7cc63b75f39f1f651e1009d6"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/char0n%2Fffmpeg-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/char0n%2Fffmpeg-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/char0n%2Fffmpeg-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/char0n%2Fffmpeg-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/char0n","download_url":"https://codeload.github.com/char0n/ffmpeg-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292040,"owners_count":22046426,"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":["audio","avconv","ffmpeg","ffprobe","php","video"],"created_at":"2024-07-30T19:01:52.256Z","updated_at":"2025-05-15T07:04:56.832Z","avatar_url":"https://github.com/char0n.png","language":"PHP","funding_links":["https://github.com/sponsors/char0n","https://patreon.com/char0n","https://ko-fi.com/char0n","https://liberapay.com/char0n","https://issuehunt.io/r/char0n"],"categories":["PHP"],"sub_categories":[],"readme":"[![Build Status](https://github.com/char0n/ffmpeg-php/actions/workflows/php.yml/badge.svg)](https://github.com/char0n/ffmpeg-php/actions)\n\n# FFmpegPHP\n\nFFmpegPHP is a pure OO [PSR-4 compatible](https://www.php-fig.org/psr/psr-4/) PHP port of [ffmpeg-php](http://ffmpeg-php.sourceforge.net/) library (that was written in C). It adds an easy to use,\nobject-oriented API for accessing and retrieving information from video and audio files.\nIt has methods for returning frames from movie files as images that can be manipulated\nusing PHP image functions. This works well for automatically creating thumbnail images from movies.\nFFmpegPHP is also useful for reporting the duration and bitrate of audio files (mp3, wma...).\nFFmpegPHP can access many of the video formats supported by ffmpeg (mov, avi, mpg, wmv...)\n\n## Drop-in replacement for ffmpeg-php\n\nFFmpegPHP can be used as a drop in replacement for [ffmpeg-php](http://ffmpeg-php.sourceforge.net/) library.\n\n\n## Documentation\n\nFFmpegPHP API documentation can be found here http://char0n.github.io/ffmpeg-php/.\n\n## Requirements\n\n- PHP \u003e=7\n- PHP extensions: gd, mbstring, xml\n- [ffmpeg](https://www.ffmpeg.org/) or ffprobe\n\n\n\n## Installation\n\n### Source code\n\nGrab the source code located in `src/` directory and use it as you seem appropriate.\n\n\n### Composer installation\n\nGrab the `composer.phar` which can install packages published on [packagist](https://packagist.org/).\n\n```bash\n $ wget https://raw.githubusercontent.com/composer/getcomposer.org/1b137f8bf6db3e79a38a5bc45324414a6b1f9df2/web/installer -O - -q | php\n```\n\nThis command will create file called `composer.phar`.\n\nCreate a file called `composer.json` and paste the following JSON into it:\n\n```json\n {\n    \"require\": {\n        \"char0n/ffmpeg-php\": \"^3.0.0\"\n    }\n }\n```\n\nInstall the FFmpegPHP by running the following command:\n\n```bash\n$ php composer.phar install\n```\n\nAfter this command is successfully executed, the new directory called `vendor/` is created.\nFile structure of your current working directory should now look like this:\n\n```\n - composer.json\n - composer.phar\n - vendor/\n```\n\nTo verify that everything works as expected create new file called `test.php` inside your current working\ndirectory with the following content.\n\n```php\n\u003c?php\nrequire_once './vendor/autoload.php';\n\nuse Char0n\\FFMpegPHP\\Movie;\n\n$movie = new Movie('./test.mp4');\nvar_dump($movie-\u003egetDuration());\n```\n\nBefore you run the script you need to also download the testing movie file:\n\n```bash\n$ wget https://github.com/char0n/ffmpeg-php/raw/master/tests/data/test.mp4\n```\n\nNow run it.\n\n```bash\n$ php test.php\n```\n\nThe output should be something similar to the following:\n```\nfloat(32.14)\n```\n\n\n**Note**\n\nNotice the first line (`require './vendor/autoload.php';`) in the above script. This line is\nnecessary because it configures how the FFmpegPHP will be included into your scripts and it\nauto-magically knows where to look for FFmpegPHP.\n\n\n# Using FFmpegPHP\n\n## Object Oriented interface\n\nFFmpegPHP is build using PSR-4 standard and it's interface is purely Object Oriented. We're using standar\nOOP patterns to create our API.\n\n```php\nuse Char0n\\FFMpegPHP\\Movie;\n\n$movie = new Movie('/path/to/media.mpeg');\n$movie-\u003egetDuration(); // =\u003e 24\n```\n\n\n## Compatibility layer\n\nOn top of our OO interface, there is an additional one that provides full compatibility with original [ffmpeg-php](http://ffmpeg-php.sourceforge.net/) library.\n\n```php\nuse Char0n\\FFMpegPHP\\Adapters\\FFMpegMovie as ffmpeg_movie;\n\n$movie = new ffmpeg_movie('/path/to/media.mpeg');\n$movie-\u003egetDuration(); // =\u003e 24\n```\n\n## Partnership with GoDaddy\n\n[GoDaddy](https://www.godaddy.com/) started to use FFmpegPHP as part of it's services\nfrom November 2018. If you need a server with [ffmpeg](https://www.ffmpeg.org/)\nand [FFmpegPHP](https://github.com/char0n/ffmpeg-php) installed on it\ncontact GoDaddy and they'll do it for you as part of its \"Expert Service\".\nAs author of FFmpegPHP I agreed to provide support for users coming\nfrom GoDaddy asking about FFmpegPHP. All incoming GoDaddy customers,\nplease use [GitHub issues](https://github.com/char0n/ffmpeg-php/issues/new)\nas a support channel.\n\n\n## Author\n\n- char0n (Vladimír Gorej)\n- email: vladimir.gorej@gmail.com\n- web: https://www.linkedin.com/in/vladimirgorej/\n\n\n## References\n\n- https://packagist.org/packages/char0n/ffmpeg-php\n- http://github.com/char0n/ffmpeg-php\n- http://ffmpeg-php.sourceforge.net/\n- http://www.phpclasses.org/package/5977-PHP-Manipulate-video-files-using-the-ffmpeg-program.html\n- http://freshmeat.net/projects/ffmpegphp\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchar0n%2Fffmpeg-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchar0n%2Fffmpeg-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchar0n%2Fffmpeg-php/lists"}