ビルドには、下記のものが必要です。
- Visual Studio 2019
- Avisynth SDK
- VapourSynth SDK
- Intel OpenCL SDK
- Intel Metric Framework SDK (Intel Platform Analysis Libraryに同梱)
Avisynth+とVapourSynthは、SDKがインストールされるよう設定してインストールします。
Avisynth+ SDKの"avisynth_c.h"とVapourSynth SDKの"VapourSynth.h", "VSScript.h"がVisual Studioのincludeパスに含まれるよう設定します。
includeパスは環境変数 "AVISYNTH_SDK" / "VAPOURSYNTH_SDK" で渡すことができます。
Avisynth+ / VapourSynthインストーラのデフォルトの場所にインストールした場合、下記のように設定することになります。
setx AVISYNTH_SDK "C:\Program Files (x86)\AviSynth+\FilterSDK"
setx VAPOURSYNTH_SDK "C:\Program Files (x86)\VapourSynth\sdk"
ビルドに必要なOpenCLのヘッダをcloneし、環境変数 "OPENCL_HEADERS" を設定します。
git clone https://github.com/KhronosGroup/OpenCL-Headers.git <path-to-clone>
setx OPENCL_HEADERS <path-to-clone>
git clone https://github.com/rigaya/VCEEnc --recursive
cd VCEEnc
curl -s -o ffmpeg_lgpl.7z -L https://github.com/rigaya/ffmpeg_dlls_for_hwenc/releases/download/20231123/ffmpeg_dlls_for_hwenc_20231123.7z
7z x -offmpeg_lgpl -y ffmpeg_lgpl.7z
VCEEnc.slnを開きます。
ビルドしたいものに合わせて、構成を選択してください。
Debug用構成 | Release用構成 | |
---|---|---|
VCEEnc.auo (win32のみ) | Debug | Release |
VCEEncC(64).exe | DebugStatic | RelStatic |
- C++17 Compiler
- Intel Driver
- git
- libraries
- libva, libdrm, libmfx
- ffmpeg 4.x libs (libavcodec58, libavformat58, libavfilter7, libavutil56, libswresample3, libavdevice58)
- libass9
- [Optional] VapourSynth
sudo apt install build-essential libtool git
AMDのWebページからUbuntu 20.04向けのドライバをダウンロードします。
その後、パッケージを展開し、amdgpu-pro-installを下記のように実行してドライバをインストールします。
cd ~/Downloads
tar -xf amdgpu-pro-*.tar.xz
cd amdgpu-pro-*
sudo ./amdgpu-pro-install --pro --opencl=rocr,legacy --no-32
sudo apt install \
amf-amdgpu-pro \
opencl-headers \
libvulkan-dev \
libx11-dev
sudo apt install ffmpeg \
libavcodec-extra libavcodec-dev libavutil-dev libavformat-dev libswresample-dev libavfilter-dev libavdevice-dev \
libass9 libass-dev
VapourSynthのインストールは必須ではありませんが、インストールしておくとvpyを読み込めるようになります。
必要のない場合は 5. VCEEncCのビルド に進んでください。
VapourSynthのビルドの詳細はこちら
sudo apt install python3-pip autoconf automake libtool meson
git clone https://github.com/sekrit-twc/zimg.git
cd zimg
./autogen.sh
./configure
sudo make install -j16
cd ..
sudo pip3 install Cython
git clone https://github.com/vapoursynth/vapoursynth.git
cd vapoursynth
./autogen.sh
./configure
make -j16
sudo make install
# vapoursynthが自動的にロードされるようにする
# "python3.x" は環境に応じて変えてください。これを書いた時点ではpython3.7でした
sudo ln -s /usr/local/lib/python3.x/site-packages/vapoursynth.so /usr/lib/python3.x/lib-dynload/vapoursynth.so
sudo ldconfig
エラーが出ずにバージョンが表示されればOK。
vspipe --version
# lsmashのビルド
git clone https://github.com/l-smash/l-smash.git
cd l-smash
./configure --enable-shared
sudo make install -j16
cd ..
# vslsmashsourceのビルド
git clone https://github.com/HolyWu/L-SMASH-Works.git
# ffmpegのバージョンが合わないので、下記バージョンを取得する
cd L-SMASH-Works
git checkout -b 20200531 refs/tags/20200531
cd VapourSynth
meson build
cd build
sudo ninja install
cd ../../../
# OpenCL
sudo gpasswd -a ${USER} render
git clone https://github.com/rigaya/VCEEnc --recursive
cd VCEEnc
./configure
make -j8
動作するか確認します。
./vceencc --check-hw
- C++17 Compiler
- Intel Driver
- git
- libraries
- libva, libdrm, libmfx
- ffmpeg 4.x libs (libavcodec58, libavformat58, libavfilter7, libavutil56, libswresample3, libavdevice58)
- libass9
- [Optional] VapourSynth
sudo dnf install @development-tools
AMDのWebページからCentOS 8向けのドライバをダウンロードします。
その後、パッケージを展開し、amdgpu-pro-installを下記のように実行してドライバをインストールします。
cd ~/Downloads
tar -xf amdgpu-pro-*.tar.xz
cd amdgpu-pro-*
sudo ./amdgpu-pro-install --pro --opencl=rocr,legacy --no-32
sudo dnf install 'dnf-command(config-manager)'
sudo dnf config-manager --set-enabled powertools
sudo dnf install https://download.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
sudo dnf install opencl-headers libX11-devel vulkan-loader-devel
sudo dnf install ffmpeg ffmpeg-devel
VapourSynthのインストールは必須ではありませんが、インストールしておくとvpyを読み込めるようになります。
必要のない場合は 5. VCEEncCのビルド に進んでください。
VapourSynthのビルドの詳細はこちら
sudo apt install python3-pip autoconf automake libtool meson
git clone https://github.com/sekrit-twc/zimg.git
cd zimg
./autogen.sh
./configure
sudo make install -j16
cd ..
sudo pip3 install Cython
git clone https://github.com/vapoursynth/vapoursynth.git
cd vapoursynth
./autogen.sh
./configure
make -j16
sudo make install
# vapoursynthが自動的にロードされるようにする
# "python3.x" は環境に応じて変えてください。これを書いた時点ではpython3.7でした
sudo ln -s /usr/local/lib/python3.x/site-packages/vapoursynth.so /usr/lib/python3.x/lib-dynload/vapoursynth.so
sudo ldconfig
エラーが出ずにバージョンが表示されればOK。
vspipe --version
# lsmashのビルド
git clone https://github.com/l-smash/l-smash.git
cd l-smash
./configure --enable-shared
sudo make install -j16
cd ..
# vslsmashsourceのビルド
git clone https://github.com/HolyWu/L-SMASH-Works.git
# ffmpegのバージョンが合わないので、下記バージョンを取得する
cd L-SMASH-Works
git checkout -b 20200531 refs/tags/20200531
cd VapourSynth
meson build
cd build
sudo ninja install
cd ../../../
# OpenCL
sudo gpasswd -a ${USER} render
git clone https://github.com/rigaya/VCEEnc --recursive
cd VCEEnc
./configure
make -j8
動作するか確認します。
./vceencc --check-hw