Created: August 5, 2022 9:55 AM
Eclipse - FFmpeg
Install Eclipse
sudo snap install --classic eclipse
复制代码
miss JRE
Eclipse:
A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run Eclipse. No Java virtual machine
was found after searching the following locations:
/snap/eclipse/48/jre/bin/java
java in your current PATH
复制代码
Install jre
sudo apt install default-jre
复制代码
Install CDT
Eclipse → Help → Eclipse Marketplace…
Download FFmpeg
wget -c http://ffmpeg.org/releases/ffmpeg-5.1.tar.xz
tar xvf ffmpeg-5.1.tar.xz
mkdir -p ~/ffmpeg_sources ~/bin
复制代码
CompilationGuide/Ubuntu - FFmpeg
sudo apt-get update -qq && sudo apt-get -y install \
autoconf \
automake \
build-essential \
cmake \
git-core \
libass-dev \
libfreetype6-dev \
libgnutls28-dev \
libmp3lame-dev \
libsdl2-dev \
libtool \
libva-dev \
libvdpau-dev \
libvorbis-dev \
libxcb1-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev \
meson \
ninja-build \
pkg-config \
texinfo \
wget \
yasm \
zlib1g-dev
# Ubuntu 20.04
sudo apt install libunistring-dev libaom-dev libdav1d-dev
# nasm
sudo apt-get install nasm
# libx64
sudo apt-get install libx264-dev
# libx65
sudo apt-get install libx265-dev libnuma-dev
# libaac
sudo apt-get install -y libfdk-aac-dev
# libops
sudo apt-get install libopus-dev
复制代码
build.sh
# build.sh
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--extra-libs="-lpthread -lm" \
--ld="g++" \
--bindir="$HOME/bin" \
--enable-gpl \
--enable-gnutls \
--enable-libaom \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libx264 \
--enable-libx265 \
--enable-nonfree && \
PATH="$HOME/bin:$PATH" make && \
make install && \
hash -r
复制代码
报错:
ERROR: gnutls not found using pkg-config
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
复制代码
安装 libunistring-dev
sudo apt-get install libunistring-dev
复制代码
报错:
ERROR: aom >= 1.0.0 not found using pkg-config
复制代码
安装 :
sudo apt install libaom-de
复制代码
Eclipse Debug FFmpeg
Project → Build All
左上角右键
Project Explorer → ffmpeg-5.1 → Binaryies → ffplay_g → Debug As → Debug Configurations...
自动停在 main
函数处。
Console 乱码
安装 ANSI Escape in Console
Color Tips
Enable ANSI
评论