简体   繁体   中英

What is the difference between using ffmpeg-php extension and FFmpeg binaries with PHP?

正如主题所暗示的..此链接http://ffmpeg.zeranoe.com/builds/中的库与我们将其安装在wamp上的php-ffmpeg扩展之间有什么区别?

It isn't complicated. One is simply a standalone FFmpeg binary that you can run from a terminal or other application. The PHP extension version is... a PHP extension.

If you were to use regular FFmpeg binaries, you could use PHP's exec() to run them, like you would run any external application.

Alternatively by using the PHP extension, you get extra functions within PHP itself that you can call to run FFmpeg functionality. It's a native binding that may also be more efficient.

Personally, I recommend going the route of a regular FFmpeg binary for portability. I've found that building the PHP extension is difficult, and almost nobody has it installed. On the other hand, it's very easy to find an FFmpeg binary so you don't have to build it yourself, and it isn't difficult to handle its STDIO streams depending on what you need to do.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM