Possible prelim code fix for ffmpeg on Windows
kuemerle5
Joined: 2009-03-04
Posts: 31 |
Posted: Sun, 2009-07-12 21:10 |
OK, so I know that G3 pretty much doesn't work at all with videos on Windows, and possibly on some Linux boxes. I've come up with a short code snippet that is a kind of workaround for this. And it doesn't involve hard coding any paths! Here's the code I came up with: if (php_uname("s") != "Windows NT"){ if (function_exists("exec")){ $ffmpeg_path = exec("which ffmpeg"); } } else { $ffmpeg_path = str_replace("\\", "/", dirname(__FILE__)."\\ffmpeg.exe"); } This code replaces lines 149-151 of movie.php. Latest revision as of Jul 12 @ 14:10 PST. This does have a little caveat if you took a look at the code; it requires you to put ffmpeg.exe in the same directory of movie.php (modules/gallery/helpers). The binary can be downloaded from http://roundblog.net/ffmpeg.exe. This executable is the most reliable one I could find, as it comes from the FFConverter project (last updated on SourceForge Sun Jun 28 2009 08:02). This works flawlessly on my Windows machine (Apache 2.2.11 (from apache.org), PHP 5.2.10/5.3.0, and MySQL 5.1.36) and will successfully process the supported G3 movie file types, create thumbnails, and detect size. Have fun! |
|
Posts: 31
Has anyone tried this yet? And if so, does it work correctly? I would love to hear comments or feedback on this. Thanks!