---
title: "centos上安装ffmpeg"
author: "java12345678"
date: "2019-08-01T15:29:15Z"
tags: []
categories: ["编程语言"]
slug: "centos-ffmpeg"
draft: false
lastmod: "2019-08-18T00:59:13Z"
id: 2443125
url: "https://java12345678.iteye.com/blog/2443125"
---

1. 

yum -y install gcc cc cl

2\.

 

```
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar -xvf yasm-1.3.0.tar.gz
cd yasm-1.3.0/
./configure && make && make install
```

 

3\.

```
wget http://download.videolan.org/x264/snapshots/last_stable_x264.tar.bz2

tar -jxvf last_stable_x264.tar.bz2

cd last_stable_x264

./configure --enable-shared --enable-static --disable-asm && make && make install 
```

 

 

 

4\.

```
wget http://www.ffmpeg.org/releases/ffmpeg-4.2.tar.gz
 tar -xvf ffmpeg-4.2.tar.gz
 cd ffmpeg-4.2/
 ./configure --enable-shared --enable-gpl --enable-libx264 && make && make install 
```

 

5\. vi .bash\_profile

   export LD\_LIBRARY\_PATH=/usr/local/lib:$LD\_LIBRARY\_PATH