Take a thumbnail from a quicktime (movie) file
Asked Answered
K

3

7

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.

Kurman answered 7/8, 2009 at 19:22 Comment(0)
A
2

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

Aerostatics answered 7/8, 2009 at 21:46 Comment(1)
+1 that's definitly a nice -- and satisfying -- answer ; good to know there are hosting providers that provide that kind of software!Starlastarlene
S
4

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

Seurat answered 7/8, 2009 at 19:30 Comment(1)
It does indeed look nice, but if he is on a shared hosting service and has no access to the machine (except a web-interface) and cannot install any PHP extension, it probably won't help him much :-( (except as a way to indicate "get a real server for you only, on which you'll be root ^^ )Starlastarlene
A
2

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

Aerostatics answered 7/8, 2009 at 21:46 Comment(1)
+1 that's definitly a nice -- and satisfying -- answer ; good to know there are hosting providers that provide that kind of software!Starlastarlene
S
0

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 !

Starlastarlene answered 7/8, 2009 at 19:33 Comment(1)
The thumbnail that the Allbrand.nu plugin creates for videos is an graphic with the filetype and filesize of the video. It is not an actual image from the video.Fuji

© 2022 - 2024 — McMap. All rights reserved.