ffmpeg的安装和编译安装升级ubuntu


FFmpeg是一组库和工具,用来处理多媒体内容的语音、视频、字幕、相关元数据。它是一个开源项目,需要用户在对应的电脑上编译。也有预编译好的,但是预编译的可能没有你需要的某些功能,所以掌握编译安装FFmpeg也是非常有必要的。

下面是我现有的编译参数。我需要加一个增加软字幕的库。

hw@hw-s:~$ ffmpeg  -h
ffmpeg version 5.0.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg



FFmpeg项目地址是:https://github.com/FFmpeg/FFmpeg.git
只下载最新的项目代码:
git clone --depth 1 https://github.com/FFmpeg/FFmpeg.git ~/FFmpeg 
cd ~/FFmpeg
./configure \
        --extra-cflags="-I/usr/local/include" \
        --extra-ldflags="-L/usr/local/lib" \
        --extra-libs="-lpthread -lm -latomic" \
        --arch=armel \
        --enable-gmp \
        --enable-gpl \
        --enable-libaom \
        --enable-libsvtav1 \
        --enable-libass \
        --enable-libdav1d \
        --enable-libdrm \
        --enable-libfdk-aac \
        --enable-libfreetype \
        --enable-libkvazaar \
        --enable-libmp3lame \
        --enable-libopencore-amrnb \
        --enable-libopencore-amrwb \
        --enable-libopus \
        --enable-librtmp \
        --enable-libsnappy \
        --enable-libsoxr \
        --enable-libssh \
        --enable-libvorbis \
        --enable-libvpx \
        --enable-libzimg \
        --enable-libwebp \
        --enable-libx264 \
        --enable-libx265 \
        --enable-libxml2 \
        --disable-mmal \
        --enable-nonfree \
        --enable-omx \
        --enable-omx-rpi \
        --enable-version3 \
        --target-os=linux \
        --enable-pthreads \
        --enable-openssl \
        --enable-hardcoded-tables \
    && make -j$(nproc) \
    && sudo make install


sudo apt install -y \
    autoconf automake build-essential \
    cmake doxygen git graphviz imagemagick \
    libasound2-dev libass-dev libavcodec-dev \
    libavdevice-dev libavfilter-dev libavformat-dev \
    libavutil-dev libfreetype6-dev libgmp-dev \
    libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev \
    libopus-dev librtmp-dev libsdl2-dev \
    libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev \
    libsdl2-ttf-dev libsnappy-dev libsoxr-dev \
    libssh-dev libssl-dev libtool \
    libv4l-dev libva-dev libvdpau-dev \
    libvo-amrwbenc-dev libvorbis-dev libwebp-dev \
    libx264-dev libx265-dev libxcb-shape0-dev \
    libxcb-shm0-dev libxcb-xfixes0-dev libxcb1-dev \
    libxml2-dev lzma-dev meson nasm \
    pkg-config python3-dev python3-pip \
    texinfo wget yasm zlib1g-dev libdrm-dev


阅读量: 646
发布于:
修改于: