search
HomeBackend DevelopmentPHP ProblemHow to install php ffpemg extension

How to install php ffpemg extension

Mar 09, 2023 am 11:11 AM
phpffpemg

How to install the php ffpemg extension: 1. Download the "ffmpeg-php" extension through "git clone https://github.com/tony2001/ffmpeg-php.git"; 2. Through the corresponding version of phpize Generate the configure file; 3. Modify the "ffmpeg_frame.c" file; 4. Compile and install, and then add "extension=ffmpeg.so" to php.ini.

How to install php ffpemg extension

The operating environment of this tutorial: Red Hat 4.4.7 system, ffmpeg-php version 0.7.0, DELL G3 computer

How to install php ffpemg extension?

Perfect installation of ffmpeg-php extension

FFmpeg is a set of open source computer programs that can be used to record, convert digital audio and video, and convert them into streams. Use LGPL or GPL license. It provides a complete solution for recording, converting and streaming audio and video.

I won’t go into details about the installation of FFmpeg. There are tutorials on the Internet. It is recommended to install it with yum, compile and install the dependencies, and install it as much as you want. I have my heart...

If you install yum, here is a yum source. According to your own system selection, the one given here is el7, and el6 can be found by yourself according to the website address

sudo rpm –import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
How to install php ffpemg extension

PHP can use the ffmpeg-php extension to process images, audio, and video

I am tortured by this extension After two days, the tutorials on the Internet are really unreliable. I thought about it and sorted it out by myself. Without further ado, I went directly to the installation process:

1. Download the ffmpeg-php extension source code

git clone https://github.com/tony2001/ffmpeg-php.git

2. Enter the directory and generate the configure file through the corresponding version of phpize

How to install php ffpemg extension
##3. Modify ffmpeg_frame .c file

Since PIX_FMT_RGB32 is not defined in the original file, it must be defined in this file

Look for the line:

How to install php ffpemg extension

Add the part outlined in red for definition

Save and exit

4. Modify the php_ffmpeg.h file and modify the avhe avcodec_alloc definition order

How to install php ffpemg extension
Just change the order of the original av_frame_alloc avcodec_alloc_frame, save and exit

5, start configure configuration

./configure --with=php-config=/path/php/bin/php-config

6. Start compiling and installing

make && make install

After completion, the ffmpeg.so file will be generated under /path_to_php/lib/php/extensions/no-debug……/

在php.ini中添加extension=ffmpeg.so

7 , check whether the loading is successful

How to install php ffpemg extension
##ok, perfect!

Recommended learning: "

PHP Video Tutorial

"

The above is the detailed content of How to install php ffpemg extension. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use