Take a thumbnail from a quicktime (movie) file

为君一笑 提交于 2019-12-07 00:45:23

问题


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.


回答1:


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..




回答2:


This looks promising: http://ffmpeg-php.sourceforge.net/index.php




回答3:


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 !



来源:https://stackoverflow.com/questions/1246533/take-a-thumbnail-from-a-quicktime-movie-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!