Gallery3:Modules:ffmpeg - Gallery Codex
Personal tools


From Gallery Codex

FFmpeg is an external library used by Gallery, not a module. As such, this is more of a placeholder than the module itself.


When FFmpeg is present, G3 generates thumbnails for movies automatically. Also, it detects the dimensions of movies automatically such that no further configuration is required when using the embedded movie player for movie items.


You do not need to FFmpeg *installed* on your server! This seems to be a common misconception in the forums. Correctly *installing* ffmpeg requires root access, which many shared hosting accounts don't have. Rather, all you need to do is:

  • check if you have a recent copy of FFmpeg installed on your server (type "which ffmpeg" in shell)
  • if yes, go your Gallery, then go to Settings -> Advanced and change "ffmpeg_path" to the path found above (e.g. "/usr/bin/ffmpeg")
  • if no, download an FFmpeg binary from one of the links below, copy it to a known path (e.g. the "lib" directory of your Gallery), set its permissions to 0755, then set "ffmpeg_path" to its location

This means that even most shared hosting accounts should be able to do it without issue.

More details on these steps are below.

FFmpeg download

You can get updated pre-compiled FFmpeg binaries straight from On their download page, they have links to three places to get updated static builds of ffmpeg:

The advantage of a static build is that all libraries are included in one file.

Additionally, there are several other locations online to look. Several are available on flash your web. One that may work on 1and1 can be downloaded here

For Windows, you can also search ffmpeg.rev9133 via Google and download it. Save the 3 files in a searchpath (e.g. C:\program files\php)

Set permissions

You may need to set permissions of the FFmpeg binary (and any other files it may have) to 0755. This can be done using the chmod shell command or with your file manager or FTP program.

Set ffmpeg_path

If ffmpeg is *installed* onto your server, G3 should auto detect its location. However, if you've simply downloaded your own copy as above, you'll need to set this yourself.

This is done by going to Settings -> Advanced and changing the "ffmpeg_path" value. This should be an absolute file path defined at WikiPedia and here, for example. This path varies with ISPs. To find the path if you don't have shell access or similar, drop the following PHP script onto your base web folder (commonly named phpinfo.php, but can name it whatever you want):


And then go to or whatever you named the file. Look for the DOCUMENT_ROOT variable, which is the file path to your home folder.

Missing FFmpeg alternatives - user contributed support

The Gallery3:Modules:noffmpeg module might be for some users with no ability to add ffmpeg binary to their setup.

Even if the binary does not work, its presence will allow for uploads and then you may need the Gallery3:Modules:videodimensions to set the correct height/width. You will have to set this for each movie uploaded by editing the movie. You may not get thumbnails either. How to get thumbnails in this situation is not clear to this writer.

  • Activate module Server-Add
  • Download and activate module videodemensions

You can also view videos without ffmpeg:

  • Upload a small movie through "add photos" or upload a larger movie through the Server-add method.
  • Edit This Movie -> "Video Height" and "Video Width". Add appropriate numbers, for example, "480" and "640". Click "Modify".
  • Play your movie.
  • Custom thumbs can be created and used to replace the thumbnail created manually under your gallery3/var/thumbs directory.