1616 - os : ubuntu-latest
1717 CC : gcc
1818 CXX : g++
19+ ffmpeg_build : autotools
1920 - os : macos-latest
2021 CC : clang
2122 CXX : clang++
23+ ffmpeg_build : autotools
24+ - os : windows-latest
25+ CC : cl
26+ CXX : cl
27+ ffmpeg_build : meson
2228 runs-on : ${{ matrix.os }}
2329 env :
2430 CC : ${{ matrix.CC }}
3137 - name : Install meson and ninja
3238 run : |
3339 python -m pip install --upgrade pip
34- pip install meson
40+ pip install meson ninja
3541 - name : Install dependencies (ubuntu)
3642 if : matrix.os == 'ubuntu-latest'
3743 run : |
@@ -41,20 +47,41 @@ jobs:
4147 if : matrix.os == 'macos-latest'
4248 run : |
4349 brew install -q ninja nasm
50+ - name : Setup MSVC
51+ if : matrix.os == 'windows-latest'
52+ uses : ilammy/msvc-dev-cmd@v1
4453 - uses : actions/checkout@v6
4554 - name : Build vmaf
4655 run : |
4756 meson setup libvmaf libvmaf/build --buildtype release
48- sudo ninja -vC libvmaf/build install
49- - name : Prepare FFmpeg
57+ meson compile -C libvmaf/build
58+ meson install -C libvmaf/build
59+ - name : Prepare FFmpeg (autotools)
60+ if : matrix.ffmpeg_build == 'autotools'
5061 run : |
5162 git clone -q --branch master --depth=1 "https://github.com/FFmpeg/FFmpeg" ffmpeg
5263 cd ffmpeg
5364 ./configure --enable-version3 --enable-libvmaf --disable-indevs --cc="$CC" --cxx="$CXX" || { less ffbuild/config.log; exit 1; }
54- - name : Make FFmpeg
65+ - name : Make FFmpeg (autotools)
66+ if : matrix.ffmpeg_build == 'autotools'
5567 run : |
5668 sudo make -C ffmpeg --quiet -j $(getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu) install
69+ - name : Clone FFmpeg Meson port
70+ if : matrix.ffmpeg_build == 'meson'
71+ run : |
72+ git clone --depth=1 https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg.git ffmpeg-meson
73+ - name : Configure FFmpeg (Meson)
74+ if : matrix.ffmpeg_build == 'meson'
75+ run : |
76+ cd ffmpeg-meson
77+ meson setup build --buildtype release
78+ - name : Build FFmpeg (Meson)
79+ if : matrix.ffmpeg_build == 'meson'
80+ run : |
81+ meson compile -C ffmpeg-meson/build
82+ meson install -C ffmpeg-meson/build
5783 - name : Test ffmpeg
84+ if : matrix.ffmpeg_build == 'autotools'
5885 run : |
5986 curl "https://gist.githubusercontent.com/1480c1/0c4575da638ef6e8203feffd0597de16/raw/akiyo_cif.tar.xz.base64" | base64 -d | tar xJ
6087 vmaf_score=$(ffmpeg -hide_banner -nostats -i encoded.mkv -i orig.mkv -filter_complex libvmaf -f null - 2>&1 | grep 'VMAF score' | tr ' ' '\n' | tail -n1)
6693 echo "vmaf score matches"
6794 exit 0
6895 fi
69- continue-on-error : true
96+ - name : Test ffmpeg (MSVC)
97+ if : matrix.ffmpeg_build == 'meson'
98+ run : |
99+ curl "https://gist.githubusercontent.com/1480c1/0c4575da638ef6e8203feffd0597de16/raw/akiyo_cif.tar.xz.base64" | base64 -d | tar xJ
100+ vmaf_score=$("C:\Program Files\ffmpeg\bin\ffmpeg.exe" -hide_banner -nostats -i encoded.mkv -i orig.mkv -filter_complex libvmaf -f null - 2>&1 | Select-String "VMAF score" | ForEach-Object { $_.ToString().Split()[-1] })
101+ echo $vmaf_score
102+ if ($vmaf_score -ne "93.663925") {
103+ echo "vmaf score doesn't match 93.663925"
104+ exit 1
105+ } else {
106+ echo "vmaf score matches"
107+ exit 0
108+ }
109+ continue-on-error : true
0 commit comments