Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 667 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 667 Bytes

html5VideoConverter

Simple lib to convert videos using fprobe and ffmpeg.

Usage

<?php

use Html5VideoConverter\ConfigBuilder;
use Html5VideoConverter\FileInfo;
use Html5VideoConverter\Converter;
use Html5VideoConverter\ProfileBuilder;

$sourceFile = '/full/path/to/original/file/video.mp4';
$destFile = '/full/path/to/dest/file/video.mp4';

$config = ConfigBuilder::build();         // The config is stored in config folder
$profile = ProfileBuilder::build('360p'); // Profiles are stored in profiles folder
$fileInfo = new FileInfo($sourceFile, $config);

$converter = new Converter($config, $fileInfo, $profile);
$converter->execute($destFile);