8000 GitHub - enxas/scoria: A PHP library for encoding video files into ASCII art and playing them in the terminal.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

enxas/scoria

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

About

Scoria is a PHP library that allows you to encode video files into ASCII art, save the recording to a file and play it in the terminal, or encode and play directly without saving.

Installation

Add these values to your composer.json then run composer update.

"repositories": [
	{
		"type": "vcs",
		"url": "https://github.com/enxas/scoria"
	}
],
"require": {
	"enxas/scoria": "dev-main"
}

Ensure that FFmpeg is installed on your system..

Usage

Example usage:

require_once __DIR__ . '/vendor/autoload.php';

use Enxas\Scoria;

$inputFilePath = "./big_buck_bunny_1080p_h264.mov";
$outputFilePath = "./ascii_video.amov";

$scoria = new Scoria(ffmpegPath: "C:\\tools\\ffmpeg.exe");

// Convert video and play it back (slower)
$scoria->encodeAndPlay($inputFilePath);

// OR

// Convert video to ASCII art and save converted video (faster)
$scoria->encode($inputFilePath, $outputFilePath);

// Then play back the ASCII art video
$scoria->play($outputFilePath);

About

A PHP library for encoding video files into ASCII art and playing them in the terminal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0