PHPackages                             apefood/simplevc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. apefood/simplevc

ActiveLibrary[File &amp; Storage](/categories/file-storage)

apefood/simplevc
================

Convert video/audio files to web friendly formats

12.5k↑273.3%5PHP

Since Apr 28Pushed 10y ago1 watchersCompare

[ Source](https://github.com/APEFOOD/simplevc)[ Packagist](https://packagist.org/packages/apefood/simplevc)[ RSS](/packages/apefood-simplevc/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

SimpleVC (Simple Video Converter)
=================================

[](#simplevc-simple-video-converter)

What is it?
-----------

[](#what-is-it)

SimpleVC is a PHP audio and video converter

Why?
----

[](#why)

The idea here is to provide a simple way to deal with multiple browser support for different audio and video formats. Unfortunately different web browsers, for different reasons, tend to support different audio and video formats. This means in order to ensure that your audio/video is accessible to everyone, you have to provide fall-back options, and then different browsers can display it in whatever format is friendly to them. It would be nice if you could just supply audio/video files in whatever format you have and not worry about whether it will play on Firefox or Chrome or whatever. That's what SimpleVC is all about. Just supply audio/video in whatever format you have and let SimpleVC create and render the fall-back options for you.

How?
----

[](#how)

SimpleVC does it all through the awesome \[FFmpeg\] () library.

Requirements
------------

[](#requirements)

- PHP 5.4+
- FFmpeg (Version: N-71455-gfbdaebb)

Quick guide
-----------

[](#quick-guide)

The first thing you need to do is add SimpleVC as a dependency for your project.

- Install with \[Composer\] (): `composer require apefood/simplevc`

Now you can use SimpleVC's methods and classes like:

Example 1: video conversion
---------------------------

[](#example-1-video-conversion)

```
// file to convert
* $filename = /path/to/video/file/;

// instantiate video object
* $video = new Video($filename);

// instantiate  video converter object
* $video_converter = new VideoConverter($video);

// get the ffmpeg conversion command
* $command = $video_converter->convert();
```

The convert() method returns the ffmpeg command as a string so that means ultimately it's up to you what you do with it. The conversion process is slow, so instead of running exec() on the command immediately, perhaps you might want to schedule that command as a job/task.

```
// get html5 video's  tags for the video file & it's associated fall-back options.
$html = new HtmlFactory($video);
$source = $html->render();
```

Now since the exec() command will be deferred and not run immediately, that means the $source variable points to at least 2 non-existent files at the moment. So perhaps you can also defer publishing the video on a web page until the conversion task has completed.

Extracting video frames
=======================

[](#extracting-video-frames)

This command will help you extract video frames and save them as images. You can then use those images as preview content for your videos.

```
// Time on the video where you want to start extracting the frames.
// Defaults to null, in which case FFmpeg will start the extraction from beginning of the video.
$start = "01:00"; // from minute 1 [hh]:mm:ss

// Stop the extraction after t = $end. Note that if you don't provide the $start argument, it's pointless
// to specify an $end parameter since the VideoConverter class will just override it to null.
$end = "03:00"; // stop after 3 minutes

// How many frames per minute would you like to extract?
$frames = 2;

// Your preferred image format. Defaults to JPEG.
$format = "jpeg";

$video_frames = $video_converter->extractFrames($start, $end, $frames, $format);
```

Again, this only returns the FFmpeg command \[string\] needed to complete this task. It's up to you to actually execute this command on the shell (i.e. `$ php exec($video_frames);` ), when and how you please.

Example 2: audio conversion
---------------------------

[](#example-2-audio-conversion)

There is no example 2 because it's pretty much the same as example 1, but with an audio file. Basically swap out every instance of 'video' with 'audio' and you are good to go.

\##WARNING!

NO 3GPs ALLOWED!
================

[](#no-3gps-allowed)

When I tried converting a 3GP file to MP4 it failed, on multiple attempts. So do not use this package with 3GP files. In fact, I advise you to stick to popular media formats (i.e. MP3/4, MKV, WAV etc.) just to be on the safe side. It's 2016, why would you have 3GP files anyway?

Closing.
--------

[](#closing)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/93db196c51a7209fed29573fc14354429f65e1b59813f566dd84a05edb82a52b?d=identicon)[apefood](/maintainers/apefood)

---

Top Contributors

[![APEFOOD](https://avatars.githubusercontent.com/u/8609134?v=4)](https://github.com/APEFOOD "APEFOOD (6 commits)")

### Embed Badge

![Health badge](/badges/apefood-simplevc/health.svg)

```
[![Health](https://phpackages.com/badges/apefood-simplevc/health.svg)](https://phpackages.com/packages/apefood-simplevc)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
