Download the PHP package mhor/php-mediainfo without Composer

On this page you can find all versions of the php package mhor/php-mediainfo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-mediainfo

Php-MediaInfo Coverage Status Packagist Packagist Code Checks

Introduction

PHP wrapper around the mediainfo command

Table of contents:

Installation

1 - Install mediainfo

You should install mediainfo:

On linux:

On Mac:

2 - Integration in your php project

To use this library install it through Composer, run:

How to use

Retrieve media information container

Get general information from media information container

Get videos information from media information container

Get audios information from media information container

Get subtitles information from media information container

Get images information from media information container

Get menus information from media information container

Example

Ignore unknown types

By default, unknown type throw an error this, to avoid this behavior, you can do:

Access to information

Get all information into an array

Get one information by field name

Field Name are in lower case separated by "_"

Check if information exists

Field Name are in lower case separated by "_"

List available information

Specials types

Cover

For field:

Cover type will be applied

Duration

For fields:

Duration type will be applied

Mode

For fields:

Mode type will be applied

Rate

For fields:

Rate type will be applied

FloatRate

For fields:

FloatRate type will be applied

Ratio

For fields:

Ratio type will be applied

Size

For fields:

Size type will be applied

Others

Extra

Use custom mediainfo path

Support old mediainfo version (<17.10)

Use url as filepath

MediaInfoContainer to JSON, Array or XML

Usage for WindowsOS

Download MediaInfo CLI from here. Extract zip-archive and place MediaInfo.exe somewhere. Use it:

Urlencode Config

By default, MediaInfo tries to detect if a URL is already percent-encode and encodes the URL when it's not. Setting the 'urlencode' config setting to true forces MediaInfo to encode the URL despite the presence of percentage signs in the URL. This is for example required when using pre-signed URLs for AWS S3 objects.

This setting requires MediaInfo 20.03 minimum

Cover data

Recent versions of MediaInfo don't include cover data by default, without passing an additional flag. To include any available cover data, set the 'include_cover_data' config setting to true. See the cover type for details on retrieving the base64 encoded image from cover_data.

Originally this cover data was always included in the MediaInfo output, so this option is unnecessary for older versions. But around version 18 cover data was removed from the output by default, unless you also pass the --Cover_Data=base64 flag.

Note: Older versions of MediaInfo will print the following error if passed this flag:

Override attribute checkers/types

This configuration allows you to customize the return values of attributes in php-mediainfo by creating custom checker and attribute classes. You can extend existing classes, override methods, and add additional functionality to provide more comprehensive or specialized information in the attribute objects returned by php-mediainfo.

  1. Create a new class that implements the AttributeCheckerInterface

  2. Create a new class that implements the AttributeInterface

  3. Set the new list of attribute checkers into the config

Symfony integration

Look at this bundle: MhorMediaInfoBunde

Codeigniter integration

Look at this to use composer with Codeigniter

License

See LICENSE for more information


All versions of php-mediainfo with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
symfony/process Version ~3.4|~4.0|~5.0|~6.0|~7.0
symfony/filesystem Version ~3.4|~4.0|~5.0|~6.0|~7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mhor/php-mediainfo contains the following files

Loading the files please wait ....