ffmpeg을 직접 빌드해야하는 이슈가 발생하여 linuxmint-18.2-mate-64bit 에서 빌드한 내용을 남긴다.
아래 링크를 참조하여 작업하였다.
https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
1. 종속성 라이브러리 설치
$ sudo apt-get update
$ sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libsdl2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev
2. 설치시 사용할 디렉토리 생성
$ mkdir ~/ffmpeg_sources ~/ffmpeg_build ~/bin
3. yasm 설치
$ sudo apt-get install yasm
4. nasm 설치
$ cd ~/ffmpeg_sources
$ wget http://www.nasm.us/pub/nasm/releasebuilds/2.13.01/nasm-2.13.01.tar.bz2
$ tar xjvf nasm-2.13.01.tar.bz2
$ cd nasm-2.13.01
$ ./autogen.sh
$ PATH="$HOME/bin:$PATH" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
$ PATH="$HOME/bin:$PATH" make
$ make install
5. libx264 설치
$ sudo apt-get install libx264-dev
6. libx265 설치
$ sudo apt-get install libx265-dev
7. libfdk-aac 설치
$ sudo apt-get install libfdk-aac-dev
8. libfdk-aac 설치
$ sudo apt-get install libmp3lame-dev
9. libfdk-aac 설치
$ sudo apt-get install libopus-dev
10. libfdk-aac 설치
$ sudo apt-get install libvpx-dev
11. ffmpeg 빌드 및 설치
$ cd ~/ffmpeg_sources
$ wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
$ tar xjvf ffmpeg-snapshot.tar.bz2
$ cd ffmpeg
$ 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" --bindir="$HOME/bin" --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
$ PATH="$HOME/bin:$PATH" make
$ make install
12. ffmpeg 동작 확인
$ ./ffmpeg -version
ffmpeg version N-87286-g6ce4a63 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/home/sharpis/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/sharpis/ffmpeg_build/include --extra-ldflags=-L/home/sharpis/ffmpeg_build/lib --bindir=/home/sharpis/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 55. 74.100 / 55. 74.100
libavcodec 57.105.100 / 57.105.100
libavformat 57. 82.100 / 57. 82.100
libavdevice 57. 8.100 / 57. 8.100
libavfilter 6.105.100 / 6.105.100
libswscale 4. 7.103 / 4. 7.103
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
13. troubleshoot
A. 11에 configure 에서 "ERROR: x265 not found using pkg-config" 오류 발생 시 libx265을 아래와 같이 소스 설치 후 다시 시도 한다.
$ sudo apt-get install cmake mercurial
$ cd ~/ffmpeg_sources
$ hg clone https://bitbucket.org/multicoreware/x265
$ cd ~/ffmpeg_sources/x265/build/linux
$ PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
$ make
$ make install