jpegtran and ffmpeg on GoDaddy in Gallery2
28th May 2007
Jpegtran is a library for lossless rotation and cropping of JPEG photo files. Ffmpeg is a library for some basic video processing and playback. Gallery2 is a powerful and popular photo-gallery web-software.
Gallery2 uses by default either PHP’s GD2 or ImageMagick toolkits to rotate/crop images. However, you can install jpegtran plugin, to rotate/crop JPEGs with no losses in quality.
On GoDaddy shared hosting the path to jpegtran is /usr/bin/jpegtran. However, at least in my case, that binary failed the ‘crop’ test (but succeeded in ‘rotate’ test). So I downloaded another binary of jpegtran (from this page), put it into one of my folders, and told Gallery2 to use that binary instead of /usr/bin/jpegtran. This worked perfectly.
The same approach can be used to enable thumbnails for videos via the ffmpeg plugin and binary (unfortunately, have no idea where did I take ffmpeg from - it was quite a time ago). Just download the binary, put it into one of your folders, tell Gallery2 the absolute path to the binary, and you are done!
Finally, here are the links to the two binaries mentioned above:
jpegtran
ffmpeg
ffmpeg update: see here.












August 9th, 2008 at 12:18
ok so ,Does godaddy share hosting allow ffmpeg or not?
August 10th, 2008 at 20:38
Chase,
ffmpeg does work on GoDaddy shared hosting. Also, I do not recollect anything in their ToS which would make ffmpeg usage a forbidden activity.