-
Notifications
You must be signed in to change notification settings - Fork 57
136 lines (118 loc) · 4.47 KB
/
msys2_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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: MSYS2 FFmpeg Plugins
on:
schedule:
- cron: '0 22 * * 1-5'
env:
FFMPEG_PREFIX: /c/ffmpeg_mtl
permissions:
contents: read
jobs:
ffmpeg_build:
name: MSYS2 FFmpeg Build
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sys:
- mingw64
dpdk: [23.07]
defaults:
run:
shell: msys2 {0}
steps:
- name: Harden Runner
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: ffmpeg_compose
uses: OpenVisualCloud/Media-Transport-Library@3b6d52ef0ecbea0872b5b82f711a963728c144b4 # main
with:
sys: ${{matrix.sys}}
dpdk: ${{matrix.dpdk}}
tap: false
- name: Checkout mman-win32
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: 'alitrack/mman-win32'
ref: master
path: mman-win32
- name: Checkout Cisco H264
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: 'cisco/openh264'
ref: openh264v2.3.1
path: openh264
- name: Build IMTL app dependency
run: |
cd mman-win32
./configure --prefix=${MSYSTEM_PREFIX}
make -j$(nproc) && make install
- name: Build H264
run: |
cd openh264
meson build
ninja -C build install
# Fixes in https://sourceforge.net/p/mingw-w64/mailman/message/29053757/
- name: Fix mingw64 binutils
run: |
cp -f /mingw64/bin/ar.exe /mingw64/bin/x86_64-w64-mingw32-ar.exe
cp -f /mingw64/bin/dlltool.exe /mingw64/bin/x86_64-w64-mingw32-dlltool.exe
cp -f /mingw64/bin/nm.exe /mingw64/bin/x86_64-w64-mingw32-nm.exe
cp -f /mingw64/bin/strip.exe /mingw64/bin/x86_64-w64-mingw32-strip.exe
cp -f /mingw64/bin/windres.exe /mingw64/bin/x86_64-w64-mingw32-windres.exe
- name: Checkout FFmpeg v4.4.2 aa28df
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
git clone https://git.ffmpeg.org/ffmpeg.git
cd ffmpeg
git checkout release/4.4
git reset --hard aa28df74ab197c49a05fecc40c81e0f8ec4ad0c3
- name: Apply IMTL patches
run: |
pushd ffmpeg
cp -f ../ecosystem/ffmpeg_plugin/kahawai_common.c ./libavdevice/
cp -f ../ecosystem/ffmpeg_plugin/kahawai_common.h ./libavdevice/
cp -f ../ecosystem/ffmpeg_plugin/kahawai_dec.c ./libavdevice/
cp -f ../ecosystem/ffmpeg_plugin/kahawai_enc.c ./libavdevice/
git am --whitespace=fix ../ecosystem/ffmpeg_plugin/0001-avdevice-kahawai-Add-kahawai-input-output-devices.patch
- name: Setup FFmpeg enable MTL
run: >
cd ffmpeg &&
./configure --arch=x86_64
--target-os=${{matrix.sys}}
--cross-prefix=x86_64-w64-mingw32-
--prefix=${FFMPEG_PREFIX}
--enable-shared
--enable-nonfree
--enable-gpl
--disable-lto
--enable-pic
--disable-w32threads
--enable-mtl
--enable-libx264
--enable-libopenh264
--enable-encoder=libopenh264
- name: Build FFmpeg enable MTL
run: |
cd ffmpeg
make -j$(nproc)
make install
cat ffbuild/config.log
- name: Checks FFmpeg enable MTL
run: |
cd ${FFMPEG_PREFIX}/bin
./ffmpeg -version
- name: Zip archive FFmpeg enable mtl
run: |
zip -r libmtl-${{matrix.sys}}-dpdk-v${{matrix.dpdk}}.zip build/lib
zip -r ffmpeg-mtl-${{matrix.sys}}-dpdk-v${{matrix.dpdk}}.zip $FFMPEG_PREFIX/bin
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: Intel Media Transport Library (libmtl.dll) Built on MSYS2 ${{matrix.sys}} DPDK v${{matrix.dpdk}}
path: libmtl-${{matrix.sys}}-dpdk-v${{matrix.dpdk}}.zip
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: FFmpeg enable MTL MSYS2 Windows Release (non-free, GPL) Built on MSYS2 ${{matrix.sys}} DPDK v${{matrix.dpdk}}
path: ffmpeg-mtl-${{matrix.sys}}-dpdk-v${{matrix.dpdk}}.zip