728x90

출처

MSYS2 설치

https://www.msys2.org/ 설치본 다운로드

git 설치

$ pacman -S git

컴파일 도구 설치

$ pacman -S diffutils make pkg-config yasm mingw-w64-x86_64-autotools

x64 Native Tools Command Prompt for VS 2022 실행(msvc 환경)후 mingw 환경 실행

C:\Program Files\Microsoft Visual Studio\2022\Enterprise>D:\msys64\msys2_shell.cmd -msys -use-full-path

소스 다운로드

nv-codec-headers 소스 다운로드

$ git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git

ffmpeg 소스 다운로드

$ git clone https://git.ffmpeg.org/ffmpeg.git

PREFIX 경로 /usr 설정

$ make install PREFIX=/usr
sed 's#@@PREFIX@@#D:/msys64/usr#' ffnvcodec.pc.in > ffnvcodec.pc
install -m 0755 -d '/usr/include/ffnvcodec'
install -m 0644 include/ffnvcodec/*.h '/usr/include/ffnvcodec'
install -m 0755 -d '/usr/lib/pkgconfig'
install -m 0644 ffnvcodec.pc '/usr/lib/pkgconfig'

환경 설정(.bash_profile 마지막에 추가)

export LIB=/C/Program\ Files/Microsoft\ Visual\ Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/lib/x64:/C/Program\ Files/Microsoft\ Visual\ Studio/2022/Enterprise/SDK/ScopeCppSDK/vc15/SDK/lib
export LIBPATH=/C/Program\ Files/Microsoft\ Visual\ Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/lib/x64:/C/Program\ Files/Microsoft\ Visual\ Studio/2022/Enterprise/SDK/ScopeCppSDK/vc15/SDK/lib

configure 실행

$ ./configure --enable-nonfree --disable-shared --enable-cuda-nvcc --enable-libnpp --toolchain=msvc --extra-cflags=-I../nv_sdk --extra-cflags=-I../nv_sdk/include/ --extra-ldflags=-libpath:../nv_sdk --extra-ldflags=-libpath:../nv_sdk/lib/x64 --arch=x86_64

ffmpeg 컴파일

X
user@localhost:~

[user@localhost]$ make -j$(nproc)

확인

X
user@localhost:~

[user@localhost]$ ffmpeg -version
ffmpeg version N-111746-gd53acf452f Copyright (c) 2000-2023 the FFmpeg developers
built with Microsoft (R) C/C++ 최적화 컴파일러 버전 19.36.32537(x64)
configuration: --enable-nonfree --disable-shared --enable-cuda-nvcc --enable-libnpp --toolchain=ms
vc --enable-filter=drawtext --extra-cflags=-I../nv_sdk --extra-cflags=-I../nv_sdk/include/ --extra
-ldflags='-libpath:../nv_sdk' --extra-ldflags='-libpath:../nv_sdk/lib/x64' --arch=x86_64
libavutil      58. 16.101 / 58. 16.101
libavcodec     60. 23.100 / 60. 23.100
libavformat    60. 10.100 / 60. 10.100
libavdevice    60.  2.101 / 60.  2.101
libavfilter     9. 10.100 /  9. 10.100
libswscale      7.  3.100 /  7.  3.100
libswresample   4. 11.100 /  4. 11.100

ffmpeg 설치

X
user@localhost:~

bluesanta@DESKTOP-PJENQJG MSYS ~/ffmpeg
[user@localhost]$ make install
INSTALL doc/ffmpeg.1
INSTALL doc/ffprobe.1
INSTALL doc/ffmpeg-all.1
INSTALL doc/ffprobe-all.1
INSTALL doc/ffmpeg-utils.1
INSTALL doc/ffmpeg-scaler.1
INSTALL doc/ffmpeg-resampler.1
INSTALL doc/ffmpeg-codecs.1
INSTALL doc/ffmpeg-bitstream-filters.1
INSTALL doc/ffmpeg-formats.1
INSTALL doc/ffmpeg-protocols.1
INSTALL doc/ffmpeg-devices.1
INSTALL doc/ffmpeg-filters.1
INSTALL doc/libavutil.3
INSTALL doc/libswscale.3
INSTALL doc/libswresample.3
INSTALL doc/libavcodec.3
INSTALL doc/libavformat.3
INSTALL doc/libavdevice.3
INSTALL doc/libavfilter.3
INSTALL doc/ffmpeg.1
INSTALL doc/ffprobe.1
INSTALL doc/ffmpeg-all.1
INSTALL doc/ffprobe-all.1
INSTALL doc/ffmpeg-utils.1
INSTALL doc/ffmpeg-scaler.1
INSTALL doc/ffmpeg-resampler.1
INSTALL doc/ffmpeg-codecs.1
INSTALL doc/ffmpeg-bitstream-filters.1
INSTALL doc/ffmpeg-formats.1
INSTALL doc/ffmpeg-protocols.1
INSTALL doc/ffmpeg-devices.1
INSTALL doc/ffmpeg-filters.1
INSTALL doc/libavutil.3
INSTALL doc/libswscale.3
INSTALL doc/libswresample.3
INSTALL doc/libavcodec.3
INSTALL doc/libavformat.3
INSTALL doc/libavdevice.3
INSTALL doc/libavfilter.3
INSTALL install-progs-yes
INSTALL ffmpeg.exe
INSTALL ffprobe.exe
INSTALL presets/libvpx-1080p.ffpreset
INSTALL presets/libvpx-1080p50_60.ffpreset
INSTALL presets/libvpx-360p.ffpreset
INSTALL presets/libvpx-720p.ffpreset
INSTALL presets/libvpx-720p50_60.ffpreset
INSTALL doc/ffprobe.xsd
INSTALL doc/examples/avio_http_serve_files.c
INSTALL doc/examples/avio_list_dir.c
INSTALL doc/examples/avio_read_callback.c
INSTALL doc/examples/decode_audio.c
INSTALL doc/examples/decode_filter_audio.c
INSTALL doc/examples/decode_filter_video.c
INSTALL doc/examples/decode_video.c
INSTALL doc/examples/demux_decode.c
INSTALL doc/examples/encode_audio.c
INSTALL doc/examples/encode_video.c
INSTALL doc/examples/extract_mvs.c
INSTALL doc/examples/filter_audio.c
INSTALL doc/examples/hw_decode.c
INSTALL doc/examples/mux.c
INSTALL doc/examples/qsv_decode.c
INSTALL doc/examples/qsv_transcode.c
INSTALL doc/examples/remux.c
INSTALL doc/examples/resample_audio.c
INSTALL doc/examples/scale_video.c
INSTALL doc/examples/show_metadata.c
INSTALL doc/examples/transcode.c
INSTALL doc/examples/transcode_aac.c
INSTALL doc/examples/vaapi_encode.c
INSTALL doc/examples/vaapi_transcode.c
INSTALL doc/examples/README
INSTALL doc/examples/Makefile
INSTALL doc/examples/avio_http_serve_files.c
INSTALL doc/examples/avio_list_dir.c
INSTALL doc/examples/avio_read_callback.c
INSTALL doc/examples/decode_audio.c
INSTALL doc/examples/decode_filter_audio.c
INSTALL doc/examples/decode_filter_video.c
INSTALL doc/examples/decode_video.c
INSTALL doc/examples/demux_decode.c
INSTALL doc/examples/encode_audio.c
INSTALL doc/examples/encode_video.c
INSTALL doc/examples/extract_mvs.c
INSTALL doc/examples/filter_audio.c
INSTALL doc/examples/hw_decode.c
INSTALL doc/examples/mux.c
INSTALL doc/examples/qsv_decode.c
INSTALL doc/examples/qsv_transcode.c
INSTALL doc/examples/remux.c
INSTALL doc/examples/resample_audio.c
INSTALL doc/examples/scale_video.c
INSTALL doc/examples/show_metadata.c
INSTALL doc/examples/transcode.c
INSTALL doc/examples/transcode_aac.c
INSTALL doc/examples/vaapi_encode.c
INSTALL doc/examples/vaapi_transcode.c
INSTALL doc/examples/README
INSTALL doc/examples/Makefile
INSTALL libavdevice/libavdevice.a
INSTALL libavfilter/libavfilter.a
INSTALL libavformat/libavformat.a
INSTALL libavcodec/libavcodec.a
INSTALL libswresample/libswresample.a
INSTALL libswscale/libswscale.a
INSTALL libavutil/libavutil.a
INSTALL libavdevice/avdevice.h
INSTALL libavdevice/version.h
INSTALL libavdevice/version_major.h
INSTALL libavdevice/libavdevice.pc
INSTALL libavfilter/avfilter.h
INSTALL libavfilter/buffersink.h
INSTALL libavfilter/buffersrc.h
INSTALL libavfilter/version.h
INSTALL libavfilter/version_major.h
INSTALL libavfilter/libavfilter.pc
INSTALL libavformat/avformat.h
INSTALL libavformat/avio.h
INSTALL libavformat/version.h
INSTALL libavformat/version_major.h
INSTALL libavformat/libavformat.pc
INSTALL libavcodec/ac3_parser.h
INSTALL libavcodec/adts_parser.h
INSTALL libavcodec/avcodec.h
INSTALL libavcodec/avdct.h
INSTALL libavcodec/avfft.h
INSTALL libavcodec/bsf.h
INSTALL libavcodec/codec.h
INSTALL libavcodec/codec_desc.h
INSTALL libavcodec/codec_id.h
INSTALL libavcodec/codec_par.h
INSTALL libavcodec/d3d11va.h
INSTALL libavcodec/defs.h
INSTALL libavcodec/dirac.h
INSTALL libavcodec/dv_profile.h
INSTALL libavcodec/dxva2.h
INSTALL libavcodec/jni.h
INSTALL libavcodec/mediacodec.h
INSTALL libavcodec/packet.h
INSTALL libavcodec/qsv.h
INSTALL libavcodec/vdpau.h
INSTALL libavcodec/version.h
INSTALL libavcodec/version_major.h
INSTALL libavcodec/videotoolbox.h
INSTALL libavcodec/vorbis_parser.h
INSTALL libavcodec/xvmc.h
INSTALL libavcodec/libavcodec.pc
INSTALL libswresample/swresample.h
INSTALL libswresample/version.h
INSTALL libswresample/version_major.h
INSTALL libswresample/libswresample.pc
INSTALL libswscale/swscale.h
INSTALL libswscale/version.h
INSTALL libswscale/version_major.h
INSTALL libswscale/libswscale.pc
INSTALL libavutil/adler32.h
INSTALL libavutil/aes.h
INSTALL libavutil/aes_ctr.h
INSTALL libavutil/ambient_viewing_environment.h
INSTALL libavutil/attributes.h
INSTALL libavutil/audio_fifo.h
INSTALL libavutil/avassert.h
INSTALL libavutil/avstring.h
INSTALL libavutil/avutil.h
INSTALL libavutil/base64.h
INSTALL libavutil/blowfish.h
INSTALL libavutil/bprint.h
INSTALL libavutil/bswap.h
INSTALL libavutil/buffer.h
INSTALL libavutil/cast5.h
INSTALL libavutil/camellia.h
INSTALL libavutil/channel_layout.h
INSTALL libavutil/common.h
INSTALL libavutil/cpu.h
INSTALL libavutil/crc.h
INSTALL libavutil/csp.h
INSTALL libavutil/des.h
INSTALL libavutil/detection_bbox.h
INSTALL libavutil/dict.h
INSTALL libavutil/display.h
INSTALL libavutil/dovi_meta.h
INSTALL libavutil/downmix_info.h
INSTALL libavutil/encryption_info.h
INSTALL libavutil/error.h
INSTALL libavutil/eval.h
INSTALL libavutil/fifo.h
INSTALL libavutil/file.h
INSTALL libavutil/frame.h
INSTALL libavutil/hash.h
INSTALL libavutil/hdr_dynamic_metadata.h
INSTALL libavutil/hdr_dynamic_vivid_metadata.h
INSTALL libavutil/hmac.h
INSTALL libavutil/hwcontext.h
INSTALL libavutil/hwcontext_cuda.h
INSTALL libavutil/hwcontext_d3d11va.h
INSTALL libavutil/hwcontext_drm.h
INSTALL libavutil/hwcontext_dxva2.h
INSTALL libavutil/hwcontext_qsv.h
INSTALL libavutil/hwcontext_mediacodec.h
INSTALL libavutil/hwcontext_opencl.h
INSTALL libavutil/hwcontext_vaapi.h
INSTALL libavutil/hwcontext_videotoolbox.h
INSTALL libavutil/hwcontext_vdpau.h
INSTALL libavutil/hwcontext_vulkan.h
INSTALL libavutil/imgutils.h
INSTALL libavutil/intfloat.h
INSTALL libavutil/intreadwrite.h
INSTALL libavutil/lfg.h
INSTALL libavutil/log.h
INSTALL libavutil/lzo.h
INSTALL libavutil/macros.h
INSTALL libavutil/mathematics.h
INSTALL libavutil/mastering_display_metadata.h
INSTALL libavutil/md5.h
INSTALL libavutil/mem.h
INSTALL libavutil/motion_vector.h
INSTALL libavutil/murmur3.h
INSTALL libavutil/opt.h
INSTALL libavutil/parseutils.h
INSTALL libavutil/pixdesc.h
INSTALL libavutil/pixelutils.h
INSTALL libavutil/pixfmt.h
INSTALL libavutil/random_seed.h
INSTALL libavutil/rc4.h
INSTALL libavutil/rational.h
INSTALL libavutil/replaygain.h
INSTALL libavutil/ripemd.h
INSTALL libavutil/samplefmt.h
INSTALL libavutil/sha.h
INSTALL libavutil/sha512.h
INSTALL libavutil/spherical.h
INSTALL libavutil/stereo3d.h
INSTALL libavutil/threadmessage.h
INSTALL libavutil/time.h
INSTALL libavutil/timecode.h
INSTALL libavutil/timestamp.h
INSTALL libavutil/tree.h
INSTALL libavutil/twofish.h
INSTALL libavutil/uuid.h
INSTALL libavutil/version.h
INSTALL libavutil/video_enc_params.h
INSTALL libavutil/xtea.h
INSTALL libavutil/tea.h
INSTALL libavutil/tx.h
INSTALL libavutil/film_grain_params.h
INSTALL libavutil/video_hint.h
INSTALL libavutil/avconfig.h
INSTALL libavutil/ffversion.h
INSTALL libavutil/libavutil.pc

lame 빌드 실패 이력

X
user@localhost:~

[user@localhost]$ export AR=lib.exe
[user@localhost]$ export LD=link.exe
[user@localhost]$ export MP3LAME_VERSION=3.100
[user@localhost]$ export MP3LAME_URL="https://sourceforge.net/projects/lame/files/lame/$MP3LAME_VERSION/lame-$MP3LAME_VERSION.tar.gz/download"
[user@localhost]$ export MP3LAME_SHA256=ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e
[user@localhost]$ wget -O lame.tar.gz "$MP3LAME_URL" && echo "$MP3LAME_SHA256 lame.tar.gz" | sha256sum --status -c -
[user@localhost]$ tar xfz lame.tar.gz
[user@localhost]$ cd lame-3.100/
[user@localhost]$ ./configure --prefix=/mingw64 --disable-shared --enable-static
[user@localhost]$ make
make  all-recursive
make[1]: Entering directory '/home/bluesanta/ffmpeg_sources/lame-3.100'
Making all in mpglib
make[2]: Entering directory '/home/bluesanta/ffmpeg_sources/lame-3.100/mpglib'
/bin/sh ../libtool  --tag=CC   --mode=link /home/bluesanta/ffmpeg_sources/lame-3.100/compile cl.exe     -o libmpgdecoder.la  common.lo dct64_i386.lo decode_i386.lo interface.lo layer1.lo layer2.lo layer3.lo tabinit.lo
libtool: link: lib.exe cru .libs/libmpgdecoder.a  common.obj dct64_i386.obj decode_i386.obj interface.obj layer1.obj layer2.obj layer3.obj tabinit.obj
Microsoft (R) Library Manager Version 14.36.32537.0
Copyright (C) Microsoft Corporation.  All rights reserved.
 
LINK : fatal error LNK1181: 'cru' 입력 파일을 열 수 없습니다.
make[2]: *** [Makefile:411: libmpgdecoder.la] Error 157
make[2]: Leaving directory '/home/bluesanta/ffmpeg_sources/lame-3.100/mpglib'
make[1]: *** [Makefile:452: all-recursive] Error 1
make[1]: Leaving directory '/home/bluesanta/ffmpeg_sources/lame-3.100'
make: *** [Makefile:381: all] Error 2

728x90
728x90

출처

SDL2 설치

X
user@localhost:~

[user@localhost]$ cd $LOCALBUILDDIR
[user@localhost]$ wget -c http://libsdl.org/release/SDL2-devel-2.0.9-mingw.tar.gz
[user@localhost]$ tar xzf SDL2-devel-2.0.9-mingw.tar.gz
[user@localhost]$ cd SDL2-2.0.9
[user@localhost]$ make native

728x90
728x90

출처

--enable-libfdk-aac

X
user@localhost:~

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

--enable-libaacplus (실패)

X
user@localhost:~

[user@localhost]$ wget http://tipok.org.ua/downloads/media/aacplus/libaacplus/libaacplus-2.0.2.tar.gz
[user@localhost]$ tar zxvf libaacplus-2.0.2.tar.gz
[user@localhost]$ cd libaacplus-2.0.2
[user@localhost]$ autoreconf -i
[user@localhost]$ ./configure --prefix=/usr/local --enable-shared --enable-static
[user@localhost]$ 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

X
user@localhost:~

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

--enable-libopenh264

X
user@localhost:~

[user@localhost]$ cp ar x86_64-w64-mingw32-ar
[user@localhost]$ git clone https://github.com/cisco/openh264.git
[user@localhost]$ cd openh264
[user@localhost]$ export "CFLAGS=-fno-stack-protector"
[user@localhost]$ export "LDFLAGS=-lssp"
[user@localhost]$ make
[user@localhost]$ 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

X
user@localhost:~

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

--enable-librtmp

X
user@localhost:~

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

ffmpeg 설치

X
user@localhost:~

[user@localhost]$ git config --global core.autocrlf false
[user@localhost]$ git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
[user@localhost]$ cd ffmpeg
[user@localhost]$ ./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
[user@localhost]$ make
[user@localhost]$ $ ./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

728x90
728x90

출처

msys 실행

D:\MinGW\msys\1.0\msys.bat

msys 실행

nasm 설치

http://www.nasm.us/pub/nasm/releasebuilds/ 사이트에서 파일 nasm.exe와 ndisasm.exe를 C:\MinGW\msys\1.0\bin 으로 복사

yasm 설치

http://yasm.tortall.net/Download.html 사이트에서 파일 yasm-1.3.0-win32.exe을 다운로드 받아서 yasm.exe로 변경하여 경로에 C:\MinGW\msys\1.0\bin 복사

pr.exe 설치 (설치 불필요)

FFMpeg 컴파일할 때, pr이 없어서 컴파일 에러가 떨어진다.

https://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2/download 압축 해제하고, /bin 폴더에 있는 pr.exe를 C:\MinGW\bin에 복사한다.

zlib 설치

X
user@localhost:~

[user@localhost]$ git clone https://github.com/madler/zlib.git
[user@localhost]$ cd zlib
[user@localhost]$ make -f win32/Makefile.gcc
[user@localhost]$ export "INCLUDE_PATH=/mingw/include"
[user@localhost]$ export "LIBRARY_PATH=/mingw/lib"
[user@localhost]$ export "BINARY_PATH=/mingw/bin"
[user@localhost]$ make install -f win32/Makefile.gcc
if [ "0" = "1" ]; then \
                mkdir -p '/mingw/bin'; \
                cp -fp zlib1.dll '/mingw/bin'; \
                cp -fp libz.dll.a '/mingw/lib'; \
        fi
cp -fp zlib.h '/mingw/include'
cp -fp zconf.h '/mingw/include'
cp -fp libz.a '/mingw/lib'
sed \
                -e 's|@prefix@|/usr/local|g' \
                -e 's|@exec_prefix@|/usr/local|g' \
                -e 's|@libdir@|/mingw/lib|g' \
                -e 's|@sharedlibdir@|/mingw/lib|g' \
                -e 's|@includedir@|/mingw/include|g' \
                -e 's|@VERSION@|'`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' zlib.h`'|g' \
                zlib.pc.in > '/mingw/lib'/pkgconfig/zlib.pc

libiconv (libiconv-1.15) 설치

X
user@localhost:~

[user@localhost]$ wget https://ftp.gnu.org/gnu/libiconv/libiconv-1.15.tar.gz
[user@localhost]$ tar xvf libiconv-1.15.tar.gz
[user@localhost]$ cd libiconv-1.15
[user@localhost]$ ./configure --prefix=/mingw
[user@localhost]$ make; make install

gettext (gettext-0.18.1.1) 설치

X
user@localhost:~

[user@localhost]$ https://ftp.gnu.org/gnu/gettext/gettext-0.18.1.1.tar.gz
[user@localhost]$ tar xvf gettext-0.18.1.1.tar.gz
[user@localhost]$ cd gettext-0.18.1.1
[user@localhost]$ ./configure --prefix=/mingw --disable-shared -with-libiconv-prefix=/mingw --enable-threads=win32 --enable-relocatable
[user@localhost]$ make; make install

glib 설치

X
user@localhost:~

[user@localhost]$ wget --no-check-certificate https://ftp.gnome.org/pub/gnome/sources/glib/2.28/glib-2.28.8.tar.xz
[user@localhost]$ tar xvf glib-2.28.8.tar.xz
[user@localhost]$ cd glib-2.28.8
[user@localhost]$ ./configure --prefix=/mingw
[user@localhost]$ make
[user@localhost]$ make install

pkg-config 설치

X
user@localhost:~

[user@localhost]$ tar xvf pkg-config-0.25.tar.gz
[user@localhost]$ cd pkg-config-0.25
[user@localhost]$ ./configure --prefix=/mingw
[user@localhost]$ make
[user@localhost]$ make install

x264 설치

X
user@localhost:~

[user@localhost]$ git clone http://git.videolan.org/git/x264.git
[user@localhost]$ cd x264
[user@localhost]$ export PATH=$PATH:/mingw/mingw32/i686-w64-mingw32/bin
[user@localhost]$ ./configure --prefix=/mingw --enable-shared --enable-static
platform:      X86
byte order:    little-endian
system:        WINDOWS
cli:           no
libx264:       internal
shared:        yes
static:        yes
asm:           yes
interlaced:    yes
avs:           no
lavf:          no
ffms:          no
mp4:           no
gpl:           yes
thread:        win32
opencl:        yes
filters:       crop select_every
lto:           no
debug:         no
gprof:         no
strip:         no
PIC:           no
bit depth:     all
chroma format: all
 
You can run 'make' or 'make fprofiled' now.
 
[user@localhost]$ make
[user@localhost]$ make install
install -d /mingw/bin
install x264.exe /mingw/bin
install -d /mingw/include /mingw/lib/pkgconfig
install -m 644 ./x264.h x264_config.h /mingw/include
install -m 644 x264.pc /mingw/lib/pkgconfig
install -d /mingw/lib
install -d /mingw/bin
install -m 755 libx264-157.dll /mingw/bin
install -m 644 libx264.dll.a /mingw/lib
install -d /mingw/lib
install -m 644 libx264.a /mingw/lib
ranlib /mingw/lib/libx264.a

faac 설치

X
user@localhost:~

[user@localhost]$ curl -#LO https://github.com/knik0/faac/archive/1_29_9_2.tar.gz
[user@localhost]$ tar xzvf 1_29_9_2.tar.gz
[user@localhost]$ cd faac-1_29_9_2
[user@localhost]$ autoreconf -i
[user@localhost]$ ./configure --prefix=/mingw --enable-shared --enable-static
[user@localhost]$ make
[user@localhost]$ make install

libpng설치

X
user@localhost:~

[user@localhost]$ git clone https://github.com/glennrp/libpng.git
[user@localhost]$ cd libpng/
[user@localhost]$ cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_ASM_COMPILER=gcc -DCMAKE_INSTALL_PREFIX=/mingw -G "MSYS Makefiles" .
[user@localhost]$ cp scripts/pnglibconf.h.prebuilt pnglibconf.h
[user@localhost]$ make -f scripts/makefile.gcc
[user@localhost]$ cp png.h pngconf.h pnglibconf.h /mingw/include
[user@localhost]$ cp libpng-config /mingw/bin

libfreetype 설치

X
user@localhost:~

[user@localhost]$ git clone https://github.com/ricardoquesada/libfreetype.git
[user@localhost]$ cd libfreetype
[user@localhost]$ export "CFLAGS=-I/usr/local/include"
[user@localhost]$ export "LDFLAGS=-L/usr/local/lib"
[user@localhost]$ sh autogen.sh
[user@localhost]$ ./configure --enable-shared --enable-static
[user@localhost]$ make
[user@localhost]$ make install

libfreetype2 설치

X
user@localhost:~

[user@localhost]$ git clone git://git.sv.nongnu.org/freetype/freetype2.git
[user@localhost]$ cd freetype2
[user@localhost]$ sh autogen.sh
[user@localhost]$ export "CFLAGS=-I/usr/local/include"
[user@localhost]$ export "LDFLAGS=-L/usr/local/lib"
[user@localhost]$ ./configure --prefix=/mingw
[user@localhost]$ make
[user@localhost]$ make install

fribidi 설치

X
user@localhost:~

[user@localhost]$ curl -#LO https://ftp.osuosl.org/pub/blfs/conglomeration/fribidi/fribidi-0.19.7.tar.bz2
[user@localhost]$ tar xvf fribidi-0.19.7.tar.bz2
[user@localhost]$ cd fribidi-0.19.7
[user@localhost]$ ./configure --prefix=/mingw --enable-shared --enable-static
[user@localhost]$ make -C charset
[user@localhost]$ make -C charset install
[user@localhost]$ make -C lib
[user@localhost]$ make -C lib install
[user@localhost]$ cp fribidi.pc /mingw/lib/pkgconfig

libass 설치

X
user@localhost:~

[user@localhost]$ git clone https://github.com/libass/libass.git
[user@localhost]$ cd libass
[user@localhost]$ autoreconf -iv
[user@localhost]$ export "CFLAGS=-I/usr/local/include -I/mingw/mingw32/i686-w64-mingw32/include"
[user@localhost]$ export "LDFLAGS=-L/usr/local/lib"
[user@localhost]$ ./configure --prefix=/mingw
[user@localhost]$ make
[user@localhost]$ make install

ffmpeg 설치

ffmpeg 컴파일 성공은 했지만, 너무 많은 라이브러리의 컴파일과 삭제를 많이 해서 위에 정리 내용이 일부 부정확할 수가 있습니다.

X
user@localhost:~

[user@localhost]$ git config --global core.autocrlf false
[user@localhost]$ git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
[user@localhost]$ cd ffmpeg
[user@localhost]$ PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/"
[user@localhost]$ ./configure --prefix=/usr/local --enable-gpl --enable-libx264 --enable-libfreetype --enable-libfribidi --enable-libass --enable-nonfree
[user@localhost]$ make
[user@localhost]$ ./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 --enable-gpl --enable-libx264 --enable-libfreetype --enable-libfribidi --enable-libass --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

728x90
728x90

출처 : WHEREIS :: cmd 창에서 usb 포맷하기 - LKlingling - Tistory

디스크 목록 조회

DISKPART> list disk

  디스크 ###  상태           크기     사용 가능     Dyn  Gpt
  ----------  -------------  -------  ------------  ---  ---
  디스크 0    온라인       3726 GB           0 B        *
  디스크 1    온라인       1863 GB           0 B
  디스크 2    온라인       7633 MB        127 MB        *

디스크 선택

DISKPART> select disk 3

3 디스크가 선택한 디스크입니다.

디스크 초기화

DISKPART> clean

DiskPart에서 디스크를 정리했습니다.

파티션 생성하고, 포맷

DISKPART> create partition primary
DISKPART> list partition
DISKPART> select partition 1
DISKPART> active
DISKPART> format fs=ntfs quick
728x90
728x90

출처 : 톰켓 로그 설정(catalina.<날짜>, catalina.out) : 네이버 블로그

PowerShell - Tomcat 날짜별 로그 보기

Windows 서비스로 등록한 Tomcat의 경우 로그 파일이 catalina.out 파일이 아니라 catalina<날짜>.out 파일로 생성이 되는데, 아래 스크립트를 사용하시면, 현재 표시 되는 로그를 UNIX의 tail 명령 처럼 로그를 확인 해보실 수 있습니다.

PowerShell 스크립트 소스(log.ps1)

$date = Get-Date -format "yyyy-MM-dd"
$logfile = "C:\usr\local\tomcat-archim\logs\catalina." + $date + ".log"

echo $logfile 

Get-Content -Path $logfile -Wait

실행

X
user@localhost:~

C:\Users\cmxcost> powershell ./log.ps1

728x90
728x90

출처 : Window 에서 특정 포트 확인방법

포트 확인

PID 찾기

프로세스 죽이기 (관리자 권한으로 실행)

728x90
728x90

1. UCA 기는 끄기

 시작 -> 제어판 -> 사용자계정
 사용자 계정 컨트롤 사용/사용 안함
 [사용자 계정 컨트롤을 사용하여 컴퓨터를 보다 안전하게 보호] 체크 제거 -> [확인] 버튼 선택
 
2. 창 애니메이션 기능 끄기

 시작 -> 제어판 -> 시스템
 고급 시스템 설정(A)
 [고급]템 -> [설정]버튼 -> [시간 효과]텝 -> [사용자 지정]라디오버튼
 -> [창을 최소화하거나 최대화할 때 애니메이션] 체크 제거 -> [적용]버튼
 
3. Windows Vista 탐색기 폴더 형식 자동화 기능 끄기



x. Administrator 계정 나타내기
 [윈도위]키 + [R] -> control userpasswords2 -> [고급]텝 -> [고급]버튼

728x90

+ Recent posts