-
Notifications
You must be signed in to change notification settings - Fork 758
69 lines (67 loc) · 2.21 KB
/
ffmpeg.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: ffmpeg
on:
push:
pull_request:
env:
DEBIAN_FRONTEND: noninteractive
LD_LIBRARY_PATH: /usr/local/lib/x86_64-linux-gnu
jobs:
ffmpeg:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
CC: gcc
CXX: g++
- os: macos-latest
CC: clang
CXX: clang++
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
steps:
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install meson and ninja
run: |
python -m pip install --upgrade pip
pip install meson
- name: Install dependencies (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo -E apt-get -yq install ninja-build gcc nasm
- name: Install dependencies (mac)
if: matrix.os == 'macos-latest'
run: |
brew install -q ninja nasm
- uses: actions/checkout@v4
- name: Build vmaf
run: |
meson setup libvmaf libvmaf/build --buildtype release
sudo ninja -vC libvmaf/build install
- name: Prepare FFmpeg
run: |
git clone -q --branch master --depth=1 "https://github.com/FFmpeg/FFmpeg" ffmpeg
cd ffmpeg
./configure --enable-version3 --enable-libvmaf --cc="$CC" --cxx="$CXX" || { less ffbuild/config.log; exit 1; }
- name: Make FFmpeg
run: |
sudo make -C ffmpeg --quiet -j $(getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu) install
- name: Test ffmpeg
run: |
curl "https://gist.githubusercontent.com/1480c1/0c4575da638ef6e8203feffd0597de16/raw/akiyo_cif.tar.xz.base64" | base64 -d | tar xJ
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)
echo "$vmaf_score"
if [[ $vmaf_score != "93.663925" ]]; then
echo "vmaf score doesn't match 93.663925"
exit 1
else
echo "vmaf score matches"
exit 0
fi
continue-on-error: true