ubuntu 源码编译ffmpeg
源码编译ffmpeg 支持h265 H264 和调试
·
文章大概就是源码编译 ffmpeg,支持H265 264 编码和gdb 调试
- 下载ffmpeg 源码
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg - 下载依赖库
sudo apt-get install libx264-dev libx265-dev - 编译选项
./configure --enable-gpl --enable-libx264 --enable-libx265 --enable-shared --enable-debug --disable-stripping --extra-cflags="-g" --extra-ldflags="-g" --prefix=`pwd`/builddir
make -j8- 生成文件如下
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
make install- 在调试之前需要配置ffmpeg库的依赖路径
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)

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)