Current location - Health Preservation Learning Network - Slimming men and women - How to install ffmpeg on linux server
How to install ffmpeg on linux server
1, download ffmpeg.

2. Decompress the tar-zxvf ffmpeg.tar.gz.

3. Edit the configuration file:

vi /etc/profile

Add two sentences at the end of the document:

Export FFMPEG_HOME=/usr/local/ffmpeg.

Export path =$FFMPEG_HOME/bin:$PATH

4. Configure the installation path and so on:

. /configure-enable-shared-prefix =/usr/local/ffmpeg

It is said that the-enable-shared parameter allows it to compile and generate dynamic libraries that will be used in future programming.

If an exception occurs, you will be prompted to add parameters due to the lack of yasm, and then execute the following command:

. /configure-enable-shared-disable-yasm-prefix =/usr/local/ffmpeg

If the execution result is wrong, you can solve the problem according to the prompt information and check the help.

. /configure - help

5. Compile and install

manufacture

Carry out installation

6. After installation, you will see three directories in /usr/local/ffmpeg.

Bin execution file directory

Static and dynamic link library directory

Contains header files used in programming.

7. In order to prevent the executing program from finding the library file,

You can set the /usr/local/ffmpeg/lib directory to the LD_LIBRARY_PATH environment variable.

8. If an error occurs while loading the shared library.

Modify /etc/ld.so.conf and add /usr/local/ffmpeg/lib in the last line.

ldconfig -v

And modify the file permissions in the /usr/local/ffmpeg/lib directory to 777.