当前位置: 首页 > news >正文

ubuntu 源码编译ffmpeg

文章大概就是源码编译 ffmpeg,支持H265 264 编码和gdb 调试

  1. 下载ffmpeg 源码 git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
  2. 下载依赖库 sudo apt-get install libx264-dev libx265-dev
  3. 编译选项
./configure   --enable-gpl   --enable-libx264   --enable-libx265   --enable-shared   --enable-debug   --disable-stripping   --extra-cflags="-g"   --extra-ldflags="-g"  --prefix=`pwd`/builddir
  1. make -j8
  2. 生成文件如下
builddir   compat      config_components.h  configure        COPYING.GPLv2  COPYING.LGPLv2.1  CREDITS  ffbuild  ffmpeg_g  ffprobe_g  INSTALL.md  libavdevice  libavformat  libpostproc    libswscale  MAINTAINERS  presets    RELEASE  tools
Changelog  config.asm  config.h             CONTRIBUTING.md  COPYING.GPLv3  COPYING.LGPLv3    doc      ffmpeg   ffprobe   fftools    libavcodec  libavfilter  libavutil    libswresample  LICENSE.md  Makefile     README.md  test
  1. make install
  2. 在调试之前需要配置ffmpeg库的依赖路径
  3. export LD_LIBRARY_PATH=/home/hdp/Documents/OpenSource/ffmpeg/builddir/lib
hdp@hdp-DHC88:~/Documents/OpenSource/ffmpeg$ gdb ./ffprobe_g 
GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./ffprobe_g...
(gdb) r
Starting program: /home/hdp/Documents/OpenSource/ffmpeg/ffprobe_g 

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Enable debuginfod for this session? (y or [n]) n
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
ffprobe version N-118520-g392aa9daf2 Copyright (c) 2007-2025 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.3.0-6ubuntu2~24.04)
  configuration: --enable-gpl --enable-libx264 --enable-libx265 --enable-shared --enable-debug --disable-stripping --extra-cflags=-g --extra-ldflags=-g --prefix=/home/hdp/Documents/OpenSource/ffmpeg/builddir
  libavutil      59. 57.100 / 59. 57.100
  libavcodec     61. 33.102 / 61. 33.102
  libavformat    61.  9.107 / 61.  9.107
  libavdevice    61.  4.100 / 61.  4.100
  libavfilter    10.  9.100 / 10.  9.100
  libswscale      8. 13.100 /  8. 13.100
  libswresample   5.  4.100 /  5.  4.100
  libpostproc    58.  4.100 / 58.  4.100
Simple multimedia streams analyzer
usage: ffprobe [OPTIONS] INPUT_FILE

You have to specify one input file.
Use -h to get full help or, even better, run 'man ffprobe'.
[Inferior 1 (process 62429) exited with code 01]
(gdb) 

在这里插入图片描述

相关文章:

  • 大模型提示词工程实战
  • Linux中的查看命令
  • kkFileView报错no office manager available
  • 【数电笔记】第一章 数制和码制
  • 计算机毕业设计SpringBoot+Vue.js学生读书笔记共享(源码+LW文档+PPT+讲解+开题报告)
  • 【微服务】深入解析spring aop原理
  • 【0409】Postgres内核 CREATE DATABASE 之 从 new_record[] 加载 tuple 数据部分 到 堆空间指定区域 ⑥
  • 机器翻译与语音识别技术:推动人机交互的新篇章
  • Java数据结构_一篇文章搞定java对象的比较_7
  • 基于Weber和simulink的齿轮啮合刚度计算
  • 基于深度学习与知识图谱的设备智能维护系统KGPHMAgent
  • PHP2(WEB)
  • Redission可重试、超时续约的实现原理
  • C++:dfs,bfs各两则
  • kotlin的Int类型调用toString()会导致空指针吗
  • CountDownlatch实现原理
  • 1.2.2 AI 技术的融入
  • Linux 文件的三个时间:Access、Modify 和 Change
  • 【服务器与本地互传文件】远端服务器的Linux系统 和 本地Windows系统 互传文件
  • 对网络物理层芯片LAN8720A的复位信号(复位引脚nRST)的详细分析(顺便也介绍下其软复位的操作和导常情况解决方法)
  • 美国和沙特签署上千亿美元军售协议
  • 习近平同巴西总统卢拉会谈
  • 新剧|《藏海传》定档,《折腰》《人生若如初见》今日开播
  • 美国三大指数全线高开:纳指涨逾4%,大型科技股、中概股大涨
  • 来伊份:已下架涉事批次蜜枣粽产品,消费者可获额外补偿,取得实物后进一步分析
  • 泰特现代美术馆25年:那些瞬间,让艺术面向所有人