从 QuickTime(电影)文件中获取缩略图

发布于 2024-08-01 20:38:46 字数 143 浏览 1 评论 0原文

有人知道是否有可能(在 PHP 中)从服务器上的 Quicktime 电影中获取帧/缩略图?

类似于通常的 GD 缩略图生成,但适用于 .mov 文件。

注意:我使用的是 dreamhost,因此我只能通过 Web 面板访问服务器。

Does someone know if it's even possible (in PHP) to take a frame/thumbnail from a quicktime movie on the server?

Something like the usual GD thumbnail generation, but for .mov files.

note: I'm using dreamhost, so I don't have more than web-panel access to the server.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

瑶笙 2024-08-08 20:38:46

我不记得在 pure-php 中有任何方法可以做到这一点:-(

一般来说,选择的解决方案是调用 ffmepg 在命令行中,使用诸如 shell_exec 之类的内容

但是,如果您无法在服务器上安装软件,这可能是不可能的(我怀疑您的托管提供商在其服务器上捆绑了 ffmepg)

甚至还有一个从 PHP 使用 ffmpeg 的扩展,无需通过命令行调用它: ffmpeg-php

但是,由于它是一个 PHP 扩展(而不仅仅是一堆 PHP 脚本),您必须将其安装在您的服务器上 - 我们可能会回到同样的问题:- (

搜索了一下,我发现 AllBrand.nu Automagic Thumbnailer ; 他们说(引用):

Features:

    * ...
    * Supports jpeg, gif, png, wbmp and video files
    * ...

Requirements:

    * PHP capable web server with GD support
    * ...

但它似乎并不真正为人所知......所以不确定它是否有效,也不知道它是一个好的解决方案......

无论如何...祝你好运!

如果您找到一些有效/不错的解决方案,请不要忘记告诉我们!

I don't remember having any way of doing that in pure-php :-(

Generally, the choosen solution is to call ffmepg in command-line, with stuff like shell_exec

But, if you can't install software on your server, this will probably not be possible (I doubt your hosting provider bundles ffmepg on their servers)

There is even an extension to use ffmpeg from PHP without having to call it via command line : ffmpeg-php

But, as it's a PHP extension (and not just a bunch of PHP scripts), you'll have to install it on your server -- and we're probably back to the same problem :-(

Searching a bit, I found AllBrand.nu Automagic Thumbnailer ; they say (quoting) :

Features:

    * ...
    * Supports jpeg, gif, png, wbmp and video files
    * ...

Requirements:

    * PHP capable web server with GD support
    * ...

But it doesn't seem to be really known... So not sure it works well, nor that it's a good solution...

Anyaway... Good luck !

And if you find some working / nice solution, don't forget to let us know !

小…楫夜泊 2024-08-08 20:38:46

Dreamhost 在 /usr/bin/ffmpeg 中提供共享 ffmpeg 二进制文件,因此您绝对应该能够调用使用 system() 或 shell_exec() 函数从 php 读取 ffmpeg。 Dreamhost wiki 还有一个条目提供有关如何安装和配置 ffmpeg-php 的说明。

Dreamhost provides a shared ffmpeg binary in /usr/bin/ffmpeg, so you should definitely be able to call ffmpeg from php by using the system() or shell_exec() functions. The Dreamhost wiki has also an entry providing directions on how to install and configure ffmpeg-php..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文