-
Notifications
You must be signed in to change notification settings - Fork 18
Class: Conversion
Conversion class is responsible for all media processing. This includes video info extraction, thumbnails creation and video conversion to multiple qualities including 240, 360, 480, 720 and 1080.
Extracts video details
Direct path of video file
Decodes extracted json before returning
Raw JSON or an array of extracted media data
$conversion = new Conversion($filename, $directory, $path, $logs);
$conversion->details($this->path, true);
Extracts video duration
Path of video file
Duration of video in seconds
$conversion->duration('helloworld.mp4');
Creates video thumbnails
Path of video file
An array with paths of created thumbnails
$conversion->createThumbnails('helloworld.mp4');
Determines video qualities that can be generated for given video
Width of video
Height of video
An array with possible qualities and their resolutions
$conversion->possibleQualities(1120, 640);
Handles main process of video conversion. This function extracts video details, determines output qualities, generates thumbnails and generates video
An array with output file paths
$conversion->process();
Removes a file
Path of file to be removed
Boolean
$conversion->remove('helloworld.mp4');