PHPackages                             longsir0/video-screenshot - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. longsir0/video-screenshot

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

longsir0/video-screenshot
=========================

321PHP

Since Sep 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/longsir0/VideoScreenshot)[ Packagist](https://packagist.org/packages/longsir0/video-screenshot)[ RSS](/packages/longsir0-video-screenshot/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

VideoScreenshot
===============

[](#videoscreenshot)

video.php，自动读取所设定目录下所有视频文件，并批量生成第一帧截图，并压缩图片等方法封装。 在平常做视频处理业务过程中封装的一些好用的方法，文件中每个方法都有做说明，简单易懂，现在共享出来方便大家使用

需要用到ffmpeg工具： （使用下面宝塔的脚本安装，很省心，静静的等待安装完成即可）

wget  &amp;&amp; sh ffmpeg.sh

需要用到的方法：

/\*\*

- desription 读取目录下所有文件
- @param sting $dir 目录路径

\*/

function read\_all($dir)

/\*\*

- desription 获得视频文件的缩略图，默认截取第一秒第一帧
- @param sting $file 视频路径
- @param int $time 第几帧（默认为第一帧：1）

\*/

function getVideoCover()

//创建图片名称 get\_image\_mp4\_path()

//判断文件夹是否存在，不存在则创建文件夹 video\_mkdir()

/\*\*

- desription 压缩图片
- @param sting $imgsrc 图片路径
- @param string $imgdst 压缩后保存路径

\*/

function compressed\_image($imgsrc,$imgdst)

/\*\*

- desription 判断是否gif动画
- @param sting $image\_file图片路径
- @return boolean t 是 f 否

\*/

function check\_gifcartoon($image\_file)

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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://avatars.githubusercontent.com/u/3121944?v=4)[longsir](/maintainers/longsir)[@longsir](https://github.com/longsir)

---

Top Contributors

[![longsir0](https://avatars.githubusercontent.com/u/21691259?v=4)](https://github.com/longsir0 "longsir0 (9 commits)")

### Embed Badge

![Health badge](/badges/longsir0-video-screenshot/health.svg)

```
[![Health](https://phpackages.com/badges/longsir0-video-screenshot/health.svg)](https://phpackages.com/packages/longsir0-video-screenshot)
```

###  Alternatives

[mpetrovich/dash

A functional programming library for PHP. Inspired by Underscore, Lodash, and Ramda.

10330.0k1](/packages/mpetrovich-dash)[njxqlus/filament-relation-manager-component

Use Filament Relation Manager Everywhere!

47110.9k4](/packages/njxqlus-filament-relation-manager-component)[fluidtypo3/builder

The builder package from FluidTYPO3

259.6k1](/packages/fluidtypo3-builder)

PHPackages © 2026

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