Re: Extension Proposal: Video Encoding using FFmpeg
| From: | Anatol Belski | Date: | Tue, 22 Apr 2014 08:44:52 +0000 |
| Subject: | Re: Extension Proposal: Video Encoding using FFmpeg | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-11738@lists.php.net to get a copy of this message | ||
Hi Leong,
On Tue, April 22, 2014 02:31, Chung Leong wrote:
> I would like to add my AV extension to PECL. The extension gives PHP
> programmers a way to decode and encode video using the FFmpeg or Libav
> (the
> latter is favored by some distros like Debian). I've written about it
> here:
>
> http://www.php-qb.net/index.php/2-uncategorised/16-a-new-bridge-between-ph
> p-and-ffmpeg
>
I would strongely discourage you from linking with the libraries built
with MinGW. Especially if those are C++, but also in case of simple C. You
can read here a bit about some issues which could be caused
http://www.mingw.org/wiki/Interoperability_of_Libraries_Created_by_Different_Compiler_Brands
but also in case of simple C - different alignment, passing around
allocated object pointers, file descriptors - the risk of an instability
is very high.
Instead, ffmpeg libraries and their dependencies should be built with the
native vc++, namely the same the corresponding PHP version is using. I'm
reading this one right now
https://www.ffmpeg.org/platform.html#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows
Regards
Anatol