티스토리 뷰

OS/Windows

ffmpeg 컴파일 - 2

파란크리스마스 2019. 3. 16. 01:36
728x90

출처

--enable-libfdk-aac

$ git clone https://github.com/mstorsjo/fdk-aac
$ cd fdk-aac/
$ ./autogen.sh
$ ./configure --prefix=/usr/local --enable-shared --enable-static
$ make
$ make install

--enable-libaacplus (실패)

$ wget http://tipok.org.ua/downloads/media/aacplus/libaacplus/libaacplus-2.0.2.tar.gz
$ tar zxvf libaacplus-2.0.2.tar.gz
$ cd libaacplus-2.0.2
$ autoreconf -i
$ ./configure --prefix=/usr/local --enable-shared --enable-static
$ make
/bin/sh ../libtool  --tag=CC   --mode=link gcc  -I/usr/local/include -I/mingw64/x86_64-w64-mingw32/include  -L/usr/local/lib -L/mingw64/x86_64-w64-mingw32/lib -o aacplusenc.exe main.o ../src/libaacplus.la -lm
libtool: link: gcc -I/usr/local/include -I/mingw64/x86_64-w64-mingw32/include -o .libs/aacplusenc.exe main.o  -L/usr/local/lib -L/mingw64/x86_64-w64-mingw32/lib ../src/.libs/libaacplus.dll.a -L/usr/local/lib
main.o:main.c:(.text+0x13a): undefined reference to `AuChannelOpen'
main.o:main.c:(.text+0x462): undefined reference to `AuChannelReadFloat'
main.o:main.c:(.text+0x490): undefined reference to `AuChannelReadShort'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:438: aacplusenc.exe] 오류 1
make[2]: 디렉터리 '/home/bluesanta/workspace.ffmpeg/libaacplus-2.0.2/frontend' 나감
make[1]: *** [Makefile:517: all-recursive] 오류 1
make[1]: 디렉터리 '/home/bluesanta/workspace.ffmpeg/libaacplus-2.0.2' 나감
make: *** [Makefile:387: all] 오류 2

--enable-libmp3lame

$ wget http://jaist.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
$ tar zxvf lame-3.99.5.tar.gz
$ cd lame-3.99.5/
$ ./configure --prefix=/usr/local --enable-shared --enable-static
$ make
$ make install

--enable-libopenh264

$ cp ar x86_64-w64-mingw32-ar
$ git clone https://github.com/cisco/openh264.git
$ cd openh264
$ export "CFLAGS=-fno-stack-protector"
$ export "LDFLAGS=-lssp"
$ make
$ make install
sh ./codec/common/generate_version.sh ./
Keeping existing codec/common/inc/version_gen.h
mkdir -p /usr/local/include/wels
install -m 644 .//codec/api/svc/codec*.h /usr/local/include/wels
mkdir -p /usr/local/lib
install -m 644 libopenh264.a /usr/local/lib
mkdir -p /usr/local/bin
install -m 755 libopenh264.dll /usr/local/bin
if [ "dll" != "dll" ]; then \
  cp -a libopenh264.dll /usr/local/bin ; \
  cp -a libopenh264.dll /usr/local/bin ; \
fi
mkdir -p /usr/local/lib/pkgconfig
install -m 644 openh264.pc /usr/local/lib/pkgconfig
install -m 644 libopenh264.dll.a /usr/local/lib

--enable-openssl

$ wget https://ftp.openssl.org/source/old/1.1.1/openssl-1.1.1a.tar.gz
$ tar xvf openssl-1.1.1a.tar.gz
$ cd openssl-1.1.1a/
$ ./config --prefix=/usr/local
$ make
$ make install

--enable-librtmp

$ git clone https://gitlab.com/JudgeZarbi/RTMPDump-OpenSSL-1.1.git
$ cd RTMPDump-OpenSSL-1.1/
$ make SYS=mingw prefix=/usr/local XCFLAGS="-I/usr/local/include" XLDFLAGS="-L/usr/local/lib"
$ make SYS=mingw prefix=/usr/local install

ffmpeg 설치

$ git config --global core.autocrlf false
$ git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
$ cd ffmpeg
$ ./configure --prefix=/usr/local --pkg-config-flags="--static" --extra-ldflags=-L/usr/local/lib --enable-static --disable-shared --enable-gpl --enable-zlib --enable-libx264 --enable-libfreetype --enable-libfribidi --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopenh264 --enable-openssl --enable-librtmp --enable-runtime-cpudetect --enable-swscale --enable-avfilter --enable-ffplay --enable-nonfree
$ make
$ $ ./ffmpeg -version
ffmpeg version N-93332-g0321370601 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7.3.0 (Rev2, Built by MSYS2 project)
configuration: --prefix=/usr/local --pkg-config-flags=--static --extra-ldflags=-L/usr/local/lib --enable-static --disable-shared --enable-gpl --enable-zlib --enable-libx264 --enable-libfreetype --enable-libfribidi --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopenh264 --enable-openssl --enable-librtmp --enable-runtime-cpudetect --enable-swscale --enable-avfilter --enable-ffplay --enable-nonfree
libavutil      56. 26.100 / 56. 26.100
libavcodec     58. 47.103 / 58. 47.103
libavformat    58. 26.101 / 58. 26.101
libavdevice    58.  6.101 / 58.  6.101
libavfilter     7. 48.100 /  7. 48.100
libswscale      5.  4.100 /  5.  4.100
libswresample   3.  4.100 /  3.  4.100
libpostproc    55.  4.100 / 55.  4.100
댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
글 보관함