有没有办法在没有 ffmpeg 的情况下通过 PHP 创建视频缩略图? [英] Is there any way to create a video thumbnail through PHP without ffmpeg?

查看:25
本文介绍了有没有办法在没有 ffmpeg 的情况下通过 PHP 创建视频缩略图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法通过PHP不用 ffmpeg来创建视频缩略图?

Is there any way to create a video thumbnail through PHP without ffmpeg?

我的托管服务器不提供 ffmpeg,所以我需要另一种方式(开源和免费).

My hosting server doesn't provide ffmpeg, so I need an alternative way (open source and free).

我到处搜索,但到目前为止都没有运气.

I have searched everywhere but no luck so far.

推荐答案

当然,您可以自己在 PHP 中为相关视频实现解码算法.您可能不想这样做.所以你必须使用一个已经实现了这些算法的库.ffmpeg 是其中之一,libav 将是另一个.您可以编写一个 PECL 来连接任一库,以从您的 PHP 进程中运行某些功能(如提取框架).

Of course you can implement the decoding algorithm for the video in question yourself, in PHP. Chances are you do not want to do that. So you will have to use a library that already implemented these algorithms. ffmpeg is one of those libraries, libav would be another. You could write a PECL to interface either library to run certain functions (like extracting a frame) from within your PHP process.

但老实说,我不明白您为什么要经历其中任何一个.所以问题归结为»你为什么要寻求没有 ffmpeg 的解决方案?«

But I honestly do not see why you would want to go through either of that. So the question boils down to »why are you asking for a solution without ffmpeg?«

它在您的服务器上不可用吗?询问您的 IT 支持是否可以让您使用它.如果他们做不到,请考虑更换提供商.

Is it not available on your server? Ask your IT-Support if they can make it available to you. If they can't, consider switching providers.

这篇关于有没有办法在没有 ffmpeg 的情况下通过 PHP 创建视频缩略图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆