FFmpeg学习笔记

发布于:2025-06-03 ⋅ 阅读:(20) ⋅ 点赞:(0)

1. 播放器的架构

2. 播放器的渲染流程

3. ffmpeg下载与安装

3.0 查看PC是否已经安装了ffmpeg

ffmpeg

3.1 下载

wget https://ffmpeg.org/releases/ffmpeg-7.0.tar.gz

3.2 解压

tar zxvf ffmpeg-7.0.tar.gz   && cd ./ffmpeg-7.0

3.3 查看配置文件

./configure --help

3.4查看配置文件中具体哪个配置项

./configure --list-encoders

3.5 设置配置文件

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

3.6 编译

make -j8

3.7 安装

make install

3.8 指定动态库所在位置

打开 【vim /etc/ld.so.conf】文件,输入一下内容:

include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib/

输入 ldconfig 使修改生效。

3.9 配置环境变量

打开 【vim /etc/profile】文件,在文件末尾输入一下内容:

export PATH=/usr/local/ffmpeg/bin:$PATH

输入【source /etc/profile】  使配置生效。

实在不行关机重启

3.10 验证是否安装成功【ffmpeg】

(base) lmz@ubuntu20:~/workspace$ ffmpeg
ffmpeg version 7.0 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
  configuration: --enable-shared --prefix=/usr/local/ffmpeg --disable-x86asm
  libavutil      59.  8.100 / 59.  8.100
  libavcodec     61.  3.100 / 61.  3.100
  libavformat    61.  1.100 / 61.  1.100
  libavdevice    61.  1.100 / 61.  1.100
  libavfilter    10.  1.100 / 10.  1.100
  libswscale      8.  1.100 /  8.  1.100
  libswresample   5.  1.100 /  5.  1.100
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

4. ffmpeg基本信息命令

5. ffmpeg的开发流程

 


网站公告

今日签到

点亮在社区的每一天
去签到