1 Star 0 Fork 0

劳谦君子 / GetID3库

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

GetId3

Useful links

License

For license info please read Resources/doc/license.txt

For commercial license read Resources/doc/license.commercial.txt

Installation via composer

Run composer to install the library:
$ composer require "laoqianjunzi/getid3: ~2.1"

Quick use example reading audio properties

<?php
namespace My\Project;

use GetId3\GetId3Core;

class MyClass
{
    // ...
    private function myMethod()
    {
        $mp3File = '/path/to/my/mp3file.mp3';
        $getId3 = new GetId3Core();
        $audio = $getId3
            ->setOptionMD5Data(true)
            ->setOptionMD5DataSource(true)
            ->setEncoding('UTF-8')
            ->analyze($mp3File)
        ;

        if (isset($audio['error'])) {
            throw new \RuntimeException(sprintf('Error at reading audio properties from "%s" with GetId3: %s.', $mp3File, $audio['error']));
        }
        $this->setLength(isset($audio['playtime_seconds']) ? $audio['playtime_seconds'] : '');

        // var_dump($audio);
    }
}

空文件

简介

GetID3是一个PHP库,用于解析音频和视频文件的元数据。它能够读取音频格式、视频格式以及容器格式的元数据,如MP3、FLAC、AVI、MPEG等等 展开 收起
PHP 等 2 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/laoqianjunzi/GetID3.git
git@gitee.com:laoqianjunzi/GetID3.git
laoqianjunzi
GetID3
GetID3库
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891