承接 devejesus/video-encoder 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

devejesus/video-encoder

最新稳定版本:v1.0.0

Composer 安装命令:

composer require devejesus/video-encoder

包简介

A simple PHP-based video encoder that converts raw RGB24 frames to YUV420p format using custom pixel processing.

README 文档

README

A simple PHP-based video encoder that converts raw RGB24 frames to YUV420p format using custom pixel processing.

Features

  • Convert RGB24 frames to YUV420p format
  • Efficient pixel processing
  • Simple and easy-to-use interface
  • No external dependencies required

Requirements

  • PHP >= 8.0

Installation

You can install the package via composer:

composer require devejesus/video-encoder

Usage

use Devejesus\VideoEncoder\Encoder\RGB24ToYUV420Encoder;
use Devejesus\VideoEncoder\Model\VideoConfig;

// Create a video configuration
$config = new VideoConfig(384, 216); // width and height must be even numbers

// Initialize the encoder
$encoder = new RGB24ToYUV420Encoder();

// Convert the video
try {
    $encoder->encode(
        'input.rgb24',  // Input file path (RGB24 format)
        'output.yuv',   // Output file path (YUV420p format)
        $config
    );
    echo "Conversion completed successfully!\n";
} catch (\Exception $e) {
    echo "Error: " . $e->getMessage() . "\n";
}

Input Format Requirements

  • The input file must be in RGB24 format
  • Width and height must be even numbers
  • Each pixel is represented by 3 bytes (R, G, B)
  • No headers or metadata in the file

Testing

composer test

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This package is licensed under the MIT License - see the LICENSE file for details.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-11