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

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) 

在这里插入图片描述


http://www.kler.cn/a/561762.html

相关文章:

  • 【JavaScript】《JavaScript高级程序设计 (第4版) 》笔记-Chapter23-JSON
  • 深入解析 synchronized 锁升级:从偏向锁到重量级锁的设计哲学
  • 面试之《nodejs中,网络请求时stream和json的区别》
  • 基于STM32的智能工业生产线质量检测系统
  • Transformers框架微调Qwen和DeepSeek
  • 6.6.3 SQL数据查询(一)
  • 算法题训练 ——— NC313 两个数组的交集
  • sklearn中的决策树
  • 以绘图(绘制点、直线、圆、椭圆、多段线)为例子 通过设计模式中的命令模式实现
  • ubuntu20.04 突破文件数限制
  • 结构型模式 - 装饰者模式 (Decorator Pattern)
  • 蓝桥杯好题推荐------蛇形方阵
  • 【Java】I/O 流篇 —— 缓冲流
  • git常用命令(时常更新)
  • MySQL-增删改查
  • 微信小程序网络请求与API调用:实现数据交互
  • 在Anaconda的虚拟环境中安装R,并在vscode中使用
  • ollama无法通过IP:11434访问
  • 06C语言——指针
  • elfk+zookeeper+kafka​数据流