447 Commits

Author SHA1 Message Date
72b1609469 Update ffmpeg2.yml 2022-03-27 16:41:47 +02:00
f3ee3cb50c Update ffmpeg2.yml 2022-03-27 16:17:37 +02:00
fc970ce5c9 Create ffmpeg2.yml 2022-03-27 16:10:37 +02:00
28fd5b70cd Update ffmpeg.yml 2022-03-27 16:04:34 +02:00
f0119c54c9 Update README.md 2022-03-26 09:14:57 +01:00
6871ab5572 Update ffmpeg.yml 2022-03-25 20:09:24 +01:00
69be189e3a Update ffmpeg.yml 2022-03-25 19:32:56 +01:00
31a8e39ab8 Update ffmpeg.yml 2022-03-25 18:15:02 +01:00
4b812a05a4 Update ffmpeg.yml 2022-03-25 17:15:02 +01:00
7a2c2d1297 Delete x265.yml 2022-03-25 17:09:16 +01:00
40ed5758e1 Delete test.yml 2022-03-25 17:09:09 +01:00
133280383e Delete libfdkaac.yml 2022-03-25 17:09:01 +01:00
d03e76320b Update ffmpeg.yml 2022-03-25 16:29:54 +01:00
93772c83b6 Update ffmpeg.yml 2022-03-25 16:00:42 +01:00
35ba7f701a Update ffmpeg.yml 2022-03-25 15:24:33 +01:00
f395ddff07 Update ffmpeg-static.yml 2022-03-25 15:02:21 +01:00
bdc83043ad Update ffmpeg-static.yml 2022-03-25 14:42:03 +01:00
b41416e745 Update ffmpeg-static.yml 2022-03-25 14:28:44 +01:00
f92671f85d Update ffmpeg-static.yml 2022-03-25 14:28:07 +01:00
3daa10a370 Update ffmpeg-static.yml 2022-03-25 14:20:26 +01:00
2556af1128 Update ffmpeg-static.yml 2022-03-25 14:18:53 +01:00
d601725d20 Update ffmpeg-static.yml 2022-03-25 14:17:35 +01:00
c5e092ec1e Create ffmpeg-static.yml 2022-03-25 14:16:42 +01:00
1a1a05ecd9 Update ffmpeg.yml 2022-03-25 13:37:54 +01:00
b2b694a10d Update ffmpeg.yml 2022-03-25 12:21:10 +01:00
06a2f9ee63 Update x265.yml 2022-03-25 11:54:04 +01:00
79d39d7a40 Update x265.yml 2022-03-25 11:39:40 +01:00
acf753a3c9 Update x265.yml 2022-03-25 11:18:53 +01:00
14a4ace9aa Update x265.yml 2022-03-25 10:52:09 +01:00
5160328d0e Update x265.yml 2022-03-25 10:28:16 +01:00
3de52bde87 Update x265.yml 2022-03-25 09:40:37 +01:00
8e0b5d08db Update x265.yml 2022-03-25 09:11:44 +01:00
caa2be03e7 Update test.yml 2022-03-25 09:06:06 +01:00
6759fcdaa6 Update test.yml 2022-03-25 09:05:05 +01:00
9243908055 Update test.yml 2022-03-25 09:02:20 +01:00
fc1ad0b7bb Update test.yml 2022-03-25 08:52:13 +01:00
d2f08199cc Update test.yml 2022-03-25 08:50:17 +01:00
edab11447a Update test.yml 2022-03-25 08:44:25 +01:00
9797be006b Create test.yml 2022-03-25 08:43:32 +01:00
a6244a53a8 Update x265.yml 2022-03-25 08:24:04 +01:00
cce69a7d92 Update x265.yml 2022-03-25 08:06:40 +01:00
adb6587fc9 Update ffmpeg.yml 2022-03-25 07:23:23 +01:00
a6c8b50752 Update x265.yml 2022-03-25 07:13:54 +01:00
9224e4d449 Update ffmpeg.yml 2022-03-24 22:34:46 +01:00
651a8a08d5 Update x265.yml 2022-03-24 22:25:08 +01:00
5dae8ce9cb Update ffmpeg.yml 2022-03-24 22:14:29 +01:00
9acba09e18 Update x265.yml 2022-03-24 19:49:34 +01:00
9ff171ccbd Update x265.yml 2022-03-24 19:36:20 +01:00
17a391bbb6 Update x265.yml 2022-03-24 19:24:59 +01:00
88891083ae Update x265.yml 2022-03-24 19:15:29 +01:00
642db20562 Update x265.yml 2022-03-24 19:11:35 +01:00
b9b8ff6353 Update x265.yml 2022-03-24 19:05:46 +01:00
2a314c642f Update x265.yml 2022-03-24 19:03:48 +01:00
6fc9da30b6 Update x265.yml 2022-03-24 18:52:21 +01:00
f6ed7d555b Update x265.yml 2022-03-24 18:40:24 +01:00
02ad29180a Update x265.yml 2022-03-24 17:50:06 +01:00
d8e3b40488 Update x265.yml 2022-03-24 17:44:38 +01:00
9b7983ba63 Update x265.yml 2022-03-24 15:35:43 +01:00
03903b4c4d Update x265.yml 2022-03-24 14:34:01 +01:00
dd516f8032 Update x265.yml 2022-03-24 12:54:27 +01:00
4d8606e96c Update x265.yml 2022-03-24 12:50:53 +01:00
4b4bec3029 Update x265.yml 2022-03-24 12:47:09 +01:00
996f25a956 Update x265.yml 2022-03-24 12:45:29 +01:00
b5a7196ba4 Update x265.yml 2022-03-24 11:43:37 +01:00
2eb9e69e45 Update x265.yml 2022-03-24 11:38:52 +01:00
42d0096596 Update x265.yml 2022-03-24 10:29:50 +01:00
d239d88abd Update x265.yml 2022-03-24 10:17:01 +01:00
0b5a35f7c3 Update x265.yml 2022-03-24 10:09:50 +01:00
f9ab50d7d8 Update x265.yml 2022-03-24 09:55:54 +01:00
593861c0b6 Update x265.yml 2022-03-24 09:54:25 +01:00
7c87375614 Update x265.yml 2022-03-24 09:39:17 +01:00
efd8c865fe Update ffmpeg.yml 2022-03-23 20:33:34 +01:00
0dd38a5b50 Update ffmpeg.yml 2022-03-23 19:57:03 +01:00
87b9012ccd Update ffmpeg.yml 2022-03-23 19:45:58 +01:00
b868eeb3f1 Update ffmpeg.yml 2022-03-23 19:44:14 +01:00
f7393f5861 Update ffmpeg.yml 2022-03-23 19:40:13 +01:00
4e6ccf6c56 Update ffmpeg.yml 2022-03-23 19:34:14 +01:00
d8d0d2e8eb Update ffmpeg.yml 2022-03-23 19:22:05 +01:00
2cc55e1cba Update ffmpeg.yml 2022-03-23 19:16:27 +01:00
2cb2a3bab4 Update ffmpeg.yml 2022-03-23 19:12:10 +01:00
d1172f8441 Update ffmpeg.yml 2022-03-23 18:59:13 +01:00
8d1f51d2c0 Update ffmpeg.yml 2022-03-23 18:51:04 +01:00
0c989075bb Update ffmpeg.yml 2022-03-23 17:43:50 +01:00
e725a0291e Update 0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch 2022-03-23 17:09:59 +01:00
de9323cb23 Update ffmpeg.yml 2022-03-23 15:57:02 +01:00
5a7523b534 Update ffmpeg.yml 2022-03-23 15:41:22 +01:00
33a831f9d4 Update ffmpeg.yml 2022-03-23 15:35:43 +01:00
67f7b7ec28 Update ffmpeg.yml 2022-03-23 15:32:19 +01:00
f0091d2f75 Update ffmpeg.yml 2022-03-23 14:12:21 +01:00
9405dd212b Update ffmpeg.yml 2022-03-23 13:42:01 +01:00
e9460972dd Update ffmpeg.yml 2022-03-23 12:59:27 +01:00
31f4a1ec6f Create 0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch 2022-03-23 12:57:58 +01:00
abb525a1d3 Update 0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch 2022-03-23 11:19:37 +01:00
95f11eb984 Update ffmpeg.yml 2022-03-23 10:43:50 +01:00
e9e46dd43a Update ffmpeg.yml 2022-03-23 10:13:20 +01:00
a9df5e9fd4 Update ffmpeg.yml 2022-03-23 09:37:42 +01:00
6d1f0b9507 Update ffmpeg.yml 2022-03-23 09:08:32 +01:00
2c08de2357 Update x265.yml 2022-03-23 08:50:43 +01:00
f468eefc97 Update x265.yml 2022-03-23 08:45:36 +01:00
e93fa0a7fd Update x265.yml 2022-03-23 08:32:44 +01:00
3dbfd7fa9c Create x265.yml 2022-03-23 08:27:34 +01:00
e8bbd70c56 Update ffmpeg.yml 2022-03-23 08:08:12 +01:00
32a6173004 Delete repos directory 2022-03-23 08:02:20 +01:00
02fcae1fa6 Update ffmpeg.yml 2022-03-22 22:43:44 +01:00
652fa4c037 Update libfdkaac.yml 2022-03-22 22:13:29 +01:00
a608d6fcf5 Update libfdkaac.yml 2022-03-22 21:42:39 +01:00
84439a368e Update libfdkaac.yml 2022-03-22 20:57:37 +01:00
491123bfbf Update libfdkaac.yml 2022-03-22 20:45:26 +01:00
e6fc6b82ea Update libfdkaac.yml 2022-03-22 20:33:23 +01:00
5090592ece Update ffmpeg.yml 2022-03-22 20:26:54 +01:00
b41f56e66b Update ffmpeg.yml 2022-03-22 19:39:22 +01:00
70f763dfd1 Update libfdkaac.yml 2022-03-22 19:24:30 +01:00
3e80e1b09e Update ffmpeg.yml 2022-03-22 19:01:50 +01:00
ba90fae02f Update ffmpeg.yml 2022-03-22 18:58:29 +01:00
17ed5c1f95 Update libfdkaac.yml 2022-03-22 18:46:54 +01:00
37498178d4 Update and rename build.yml to libfdkaac.yml 2022-03-22 18:46:22 +01:00
f2650e526d Update ffmpeg.yml 2022-03-22 18:39:59 +01:00
26bea9b7ba Update ffmpeg.yml 2022-03-22 17:20:01 +01:00
5515269387 Update ffmpeg.yml 2022-03-22 16:36:29 +01:00
c888450b19 Update ffmpeg.yml 2022-03-22 16:02:01 +01:00
f7903f59d8 Update ffmpeg.yml 2022-03-22 15:59:09 +01:00
e217d9ae97 Update ffmpeg.yml 2022-03-22 15:46:22 +01:00
2cd5353b0b Update ffmpeg.yml 2022-03-22 15:34:46 +01:00
0303cec0b5 Update ffmpeg.yml 2022-03-22 15:18:41 +01:00
f998889909 Update ffmpeg.yml 2022-03-22 15:03:00 +01:00
f9448e3906 Delete setupWSLcross.bat 2022-03-22 14:54:56 +01:00
a11e8c69f1 Update ffmpeg.yml 2022-03-22 14:42:18 +01:00
a321d474cb Update ffmpeg.yml 2022-03-22 14:35:51 +01:00
84f63524db Update ffmpeg.yml 2022-03-22 14:24:13 +01:00
664d9496ee Update ffmpeg.yml 2022-03-22 13:42:20 +01:00
28ae0b90f3 Update ffmpeg.yml 2022-03-22 13:37:32 +01:00
dd359a34c2 Update ffmpeg.yml 2022-03-22 13:29:09 +01:00
4db4403c3f Update ffmpeg.yml 2022-03-22 13:18:28 +01:00
e0e705c455 Update ffmpeg.yml 2022-03-22 13:12:26 +01:00
94cc7ac320 Update ffmpeg.yml 2022-03-22 13:02:33 +01:00
7e9b0ee660 Update ffmpeg.yml 2022-03-22 12:40:37 +01:00
12c7cf0b26 Update ffmpeg.yml 2022-03-22 12:39:57 +01:00
0589934b3f Update ffmpeg.yml 2022-03-22 12:11:13 +01:00
e6671fa416 Update ffmpeg.yml 2022-03-22 11:57:02 +01:00
75733a67ea Update ffmpeg.yml 2022-03-22 11:50:52 +01:00
96e212c554 Update ffmpeg.yml 2022-03-22 11:45:13 +01:00
08b3597377 Update ffmpeg.yml 2022-03-22 11:32:34 +01:00
e2cdac131c Update ffmpeg.yml 2022-03-22 11:22:09 +01:00
cbcba252f1 Update ffmpeg.yml 2022-03-22 11:17:01 +01:00
e5f2e27aef Update ffmpeg.yml 2022-03-22 10:56:26 +01:00
53155b3164 Update ffmpeg.yml 2022-03-22 10:47:19 +01:00
8bcc6956f5 Update ffmpeg.yml 2022-03-22 10:42:20 +01:00
d4037601d3 Update ffmpeg.yml 2022-03-22 10:38:59 +01:00
46547d09ff Update ffmpeg.yml 2022-03-22 10:33:44 +01:00
2ef26b9c22 Update ffmpeg.yml 2022-03-22 10:27:27 +01:00
0b356d3feb Update ffmpeg.yml 2022-03-22 10:12:20 +01:00
2c89db5816 Update ffmpeg.yml 2022-03-22 10:07:51 +01:00
e2d6124e40 Update ffmpeg.yml 2022-03-22 10:01:37 +01:00
def8638102 Update ffmpeg.yml 2022-03-22 09:38:28 +01:00
d474bdaf2b Update ffmpeg.yml 2022-03-22 09:22:06 +01:00
ae6f13027c Update ffmpeg.yml 2022-03-22 08:57:53 +01:00
edb7b34079 Update ffmpeg.yml 2022-03-21 22:12:31 +01:00
7fe2d31165 Update ffmpeg.yml 2022-03-21 21:49:45 +01:00
beb51219ed Update ffmpeg.yml 2022-03-21 21:44:46 +01:00
2e0bea186f Update ffmpeg.yml 2022-03-21 21:42:02 +01:00
a38fdfbee1 Update ffmpeg.yml 2022-03-21 20:36:36 +01:00
504e8288ee Update ffmpeg.yml 2022-03-21 20:31:46 +01:00
4030a24470 Update ffmpeg.yml 2022-03-21 20:31:11 +01:00
8e0e355762 Update ffmpeg.yml 2022-03-21 20:10:46 +01:00
4b60b9b19c Update ffmpeg.yml 2022-03-21 20:04:45 +01:00
d5e4c908d1 Update ffmpeg.yml 2022-03-21 19:55:56 +01:00
88676d0be9 Update ffmpeg.yml 2022-03-21 19:50:32 +01:00
bbc9b2233a Update ffmpeg.yml 2022-03-21 19:44:38 +01:00
3badc2ce20 Update ffmpeg.yml 2022-03-21 19:38:06 +01:00
e63d5a5a19 Update ffmpeg.yml 2022-03-21 19:35:01 +01:00
d90bf363bb Update ffmpeg.yml 2022-03-21 19:27:17 +01:00
9f3a20fb1e Update ffmpeg.yml 2022-03-21 19:23:07 +01:00
011d96337e Update ffmpeg.yml 2022-03-21 19:16:27 +01:00
be01219540 Update ffmpeg.yml 2022-03-21 19:09:25 +01:00
bfba420158 Update ffmpeg.yml 2022-03-21 18:48:54 +01:00
7b55091f9a Update ffmpeg.yml 2022-03-21 18:33:32 +01:00
ae8c11f6d0 Update ffmpeg.yml 2022-03-21 18:08:23 +01:00
fc15831f10 Update ffmpeg.yml 2022-03-21 16:00:57 +01:00
a24e6e9e1e Update ffmpeg.yml 2022-03-21 15:56:15 +01:00
8643245773 Update ffmpeg.yml 2022-03-21 15:54:44 +01:00
83f10810bb Update ffmpeg.yml 2022-03-21 15:53:02 +01:00
14a0934fda Update ffmpeg.yml 2022-03-21 15:49:59 +01:00
b29bb75259 Update ffmpeg.yml 2022-03-21 15:36:18 +01:00
c77e61ae8b Update ffmpeg.yml 2022-03-21 15:28:26 +01:00
b389ac1d9b Update ffmpeg.yml 2022-03-21 15:23:44 +01:00
288ec38050 Update ffmpeg.yml 2022-03-21 15:18:57 +01:00
bcbe50f12e Update ffmpeg.yml 2022-03-21 15:14:25 +01:00
5589bd05de Update ffmpeg.yml 2022-03-21 14:55:04 +01:00
bbf987a0a3 Update ffmpeg.yml 2022-03-21 14:52:00 +01:00
59b1ca51d3 Update ffmpeg.yml 2022-03-21 14:24:07 +01:00
ba1adb3f71 Update ffmpeg.yml 2022-03-21 14:06:16 +01:00
24be6f8054 Update ffmpeg.yml 2022-03-21 13:37:23 +01:00
66ff6f1516 Update ffmpeg.yml 2022-03-21 12:44:17 +01:00
c5f1e177aa Update ffmpeg.yml 2022-03-21 12:41:11 +01:00
3e9e11942a Update ffmpeg.yml 2022-03-21 12:38:38 +01:00
f030e626e3 Update ffmpeg.yml 2022-03-21 12:34:47 +01:00
12f45b19ba Update ffmpeg.yml 2022-03-21 12:34:16 +01:00
2818629b12 Update ffmpeg.yml 2022-03-21 12:29:54 +01:00
dace609a04 Update ffmpeg.yml 2022-03-21 12:29:07 +01:00
4df29d3ec1 Update ffmpeg.yml 2022-03-21 12:17:15 +01:00
7ccc3cbfaa Update ffmpeg.yml 2022-03-21 11:26:33 +01:00
1970b11e2d Update ffmpeg.yml 2022-03-21 11:16:05 +01:00
106f64d2f3 Update ffmpeg.yml 2022-03-21 10:40:14 +01:00
48f721831e Update ffmpeg.yml 2022-03-21 10:22:55 +01:00
e003c95221 Update ffmpeg.yml 2022-03-21 10:08:57 +01:00
3313bd3c65 Update ffmpeg.yml 2022-03-21 09:56:58 +01:00
38e83a336b Update ffmpeg.yml 2022-03-21 09:52:19 +01:00
a253c7f602 Update ffmpeg.yml 2022-03-21 09:47:53 +01:00
137e2e7786 Update ffmpeg.yml 2022-03-21 09:44:09 +01:00
4db3e3e146 Update ffmpeg.yml 2022-03-21 09:30:16 +01:00
5d2a19ce75 Update ffmpeg.yml 2022-03-21 09:25:27 +01:00
c1e5085b03 Update ffmpeg.yml 2022-03-21 09:17:03 +01:00
8069c65527 Update ffmpeg.yml 2022-03-21 09:06:19 +01:00
e6d2d7b090 Update ffmpeg.yml 2022-03-21 09:05:17 +01:00
dc3c3643c0 Update ffmpeg.yml 2022-03-21 09:04:08 +01:00
9d9efb7a4d Update build.yml 2022-03-21 08:56:33 +01:00
248e681b42 Update build.yml 2022-03-21 08:50:31 +01:00
003067f5d1 Update build.yml 2022-03-21 08:44:12 +01:00
814210745a Update build.yml 2022-03-21 08:40:32 +01:00
ecb1e01944 Update build.yml 2022-03-21 08:38:35 +01:00
1daf48dad2 Update build.yml 2022-03-21 08:06:58 +01:00
d1e080165b Update build.yml 2022-03-21 08:01:21 +01:00
8a6b8f0489 Update build.yml 2022-03-21 07:56:34 +01:00
2adee3dedd Update build.yml 2022-03-21 07:56:13 +01:00
f49f9618be Update build.yml 2022-03-21 07:50:52 +01:00
5082fe44c2 Update build.yml 2022-03-21 07:50:20 +01:00
71d7d9bb0f Update build.yml 2022-03-21 07:44:36 +01:00
16206b56df Update build.yml 2022-03-21 07:16:46 +01:00
e7007c57a0 Update build.yml 2022-03-21 07:09:03 +01:00
d36331543a Update build.yml 2022-03-21 07:04:16 +01:00
d610ba9cff Update build.yml 2022-03-21 06:56:21 +01:00
21dd6f02f7 Update build.yml 2022-03-21 06:48:11 +01:00
e7052f0218 Update build.yml 2022-03-21 06:36:35 +01:00
943d61793e Update build.yml 2022-03-21 06:27:28 +01:00
37beea4929 Update build.yml 2022-03-21 00:33:53 +01:00
2d34aa4ab7 Update build.yml 2022-03-21 00:26:16 +01:00
a23d3161d7 Update build.yml 2022-03-21 00:20:05 +01:00
7337becb65 Update build.yml 2022-03-21 00:13:11 +01:00
ecbbef4213 Update build.yml 2022-03-21 00:04:34 +01:00
7ec6e0861f Update build.yml 2022-03-20 23:59:46 +01:00
cd38453a1f Update build.yml 2022-03-20 23:52:57 +01:00
4591386b7c Update build.yml 2022-03-20 23:47:55 +01:00
654595ce44 Update build.yml 2022-03-20 19:16:34 +01:00
959a5f5cca Update build.yml 2022-03-20 19:12:55 +01:00
5b7b0fbae7 Update build.yml 2022-03-20 19:06:55 +01:00
86ca372f36 Update build.yml 2022-03-20 19:04:04 +01:00
e4effbe818 Update build.yml 2022-03-20 18:53:00 +01:00
7df59ab956 Update build.yml 2022-03-20 18:50:17 +01:00
1f5f951819 Update setupWSLcross.bat 2022-03-20 18:48:22 +01:00
9e64dcc10e Create setupWSLcross.bat 2022-03-20 18:46:37 +01:00
b88abef4ed Update build.yml 2022-03-20 18:37:19 +01:00
202c9b2294 Update build.yml 2022-03-20 18:33:55 +01:00
b182e710ce Update build.yml 2022-03-20 18:27:06 +01:00
321e5c624c Update build.yml 2022-03-20 18:23:46 +01:00
f964c48a87 Update build.yml 2022-03-20 18:19:31 +01:00
3462c4e846 Update build.yml 2022-03-20 18:15:55 +01:00
4b01e39b51 Update build.yml 2022-03-20 18:10:27 +01:00
a117053cf3 Update build.yml 2022-03-20 18:04:39 +01:00
85dea9be3a Update build.yml 2022-03-20 18:01:43 +01:00
4377d3fad3 Update build.yml 2022-03-20 17:49:33 +01:00
bf75d4367d Update build.yml 2022-03-20 17:42:57 +01:00
a80f7593b2 Update build.yml 2022-03-20 17:41:53 +01:00
a6e94019d8 Update build.yml 2022-03-20 17:33:54 +01:00
41394598ae Update build.yml 2022-03-20 17:30:27 +01:00
a7926be90b Update build.yml 2022-03-20 17:26:47 +01:00
bd19808ce8 Update build.yml 2022-03-20 17:24:51 +01:00
6e11023709 Update build.yml 2022-03-20 17:22:21 +01:00
c05b4d9fdd Update build.yml 2022-03-20 17:16:58 +01:00
9bc98342e3 Update build.yml 2022-03-20 17:13:29 +01:00
3f86a446f7 Update build.yml 2022-03-20 16:57:04 +01:00
ab3ffd82fb Update build.yml 2022-03-20 16:42:47 +01:00
bcd9da34e6 Update build.yml 2022-03-20 16:40:59 +01:00
772db57862 Update build.yml 2022-03-20 16:32:10 +01:00
97f7cf0387 Update build.yml 2022-03-20 16:31:04 +01:00
61817fd735 Update build.yml 2022-03-20 16:29:35 +01:00
eb9a8397db Update build.yml 2022-03-20 16:23:05 +01:00
31b970a569 Update build.yml 2022-03-20 16:20:53 +01:00
bf6ee242cd Update build.yml 2022-03-20 16:20:27 +01:00
d6c9edfcbc Update build.yml 2022-03-20 16:17:20 +01:00
9a7e0dbb75 Update build.yml 2022-03-20 16:15:59 +01:00
135c3a29e3 Update build.yml 2022-03-20 16:13:38 +01:00
bdb6b00e8c Update build.yml 2022-03-20 16:10:59 +01:00
8bc227b871 Update build.yml 2022-03-20 16:08:09 +01:00
b665f57aae Update build.yml 2022-03-20 16:05:55 +01:00
f2d42b4370 Update build.yml 2022-03-20 16:03:14 +01:00
66f982ab9e Update build.yml 2022-03-20 16:02:21 +01:00
fd722ae3e6 Update build.yml 2022-03-20 15:59:37 +01:00
2f7723b0ad Update build.yml 2022-03-20 15:59:19 +01:00
433d15421e Update build.yml 2022-03-20 15:55:56 +01:00
984a61f8fc Update build.yml 2022-03-20 15:52:40 +01:00
d841b3b298 Update ffmpeg.yml 2022-03-20 15:36:31 +01:00
ab84a17b1f Update ffmpeg.yml 2022-03-20 15:29:40 +01:00
e6e4729035 Update ffmpeg.yml 2022-03-20 15:20:00 +01:00
037bd785ad Update ffmpeg.yml 2022-03-20 15:11:31 +01:00
7d71b3f0bd Update ffmpeg.yml 2022-03-20 15:05:44 +01:00
113d4c0895 Update ffmpeg.yml 2022-03-20 15:02:51 +01:00
5f82e5c644 Update ffmpeg.yml 2022-03-20 14:45:19 +01:00
b0d30c27f7 Update ffmpeg.yml 2022-03-20 14:41:03 +01:00
b3e3a99b54 Update ffmpeg.yml 2022-03-20 14:35:35 +01:00
63de746255 Update ffmpeg.yml 2022-03-20 14:30:58 +01:00
a30f7acba3 Update ffmpeg.yml 2022-03-20 14:24:47 +01:00
856e6266bf Update ffmpeg.yml 2022-03-20 14:18:40 +01:00
029d3c3bed Update ffmpeg.yml 2022-03-20 14:06:15 +01:00
94f8891d71 Update ffmpeg.yml 2022-03-20 13:59:46 +01:00
3c6beadec5 Update ffmpeg.yml 2022-03-20 13:40:15 +01:00
ecbfca8f73 Update ffmpeg.yml 2022-03-20 13:29:06 +01:00
2d7c1b85a3 Update ffmpeg.yml 2022-03-20 13:23:59 +01:00
b8fee02976 Update ffmpeg.yml 2022-03-20 13:17:26 +01:00
1a3a22085f Update ffmpeg.yml 2022-03-20 13:07:21 +01:00
3bf8f44286 Update ffmpeg.yml 2022-03-20 13:03:31 +01:00
11a6566093 Update ffmpeg.yml 2022-03-20 12:56:18 +01:00
de24492a0b Create ffmpeg.yml 2022-03-20 12:52:06 +01:00
4b2ab5dc19 Update build.yml 2022-03-20 11:25:45 +01:00
d38c6f11df Update build.yml 2022-03-20 11:20:07 +01:00
51373a4998 Update build.yml 2022-03-20 11:17:26 +01:00
42f4912178 Update build.yml 2022-03-20 11:15:55 +01:00
000720e9dc Update build.yml 2022-03-20 11:10:49 +01:00
b64b0ebf02 Update build.yml 2022-03-20 11:04:26 +01:00
38fa5b2ff7 Update build.yml 2022-03-20 11:03:29 +01:00
2de1a9d686 Update build.yml 2022-03-20 10:57:31 +01:00
d9c8c2bc4d Update build.yml 2022-03-20 10:53:27 +01:00
67d0213c27 Update build.yml 2022-03-20 10:47:14 +01:00
62eedc0447 Update build.yml 2022-03-20 10:40:44 +01:00
e36e8e6b0f Update build.yml 2022-03-20 10:37:31 +01:00
cde24dec05 Update build.yml 2022-03-20 10:34:31 +01:00
551909adbd Update build.yml 2022-03-20 10:32:05 +01:00
5744c8a54a Update build.yml 2022-03-20 10:26:00 +01:00
f017fa549d Update build.yml 2022-03-20 10:22:37 +01:00
070b16cc10 Update build.yml 2022-03-20 10:14:44 +01:00
30a2be5bc9 Update build.yml 2022-03-20 09:55:10 +01:00
f0c94ccc0f Update build.yml 2022-03-20 09:42:07 +01:00
1850cec658 Update build.yml 2022-03-20 09:30:39 +01:00
1181c49e06 Update build.yml 2022-03-20 09:07:43 +01:00
6514b6475e Update build.yml 2022-03-20 08:58:53 +01:00
63a79dc7ec Update build.yml 2022-03-19 23:03:56 +01:00
714f8189e7 Update build.yml 2022-03-19 22:54:58 +01:00
bc301388cc . 2022-03-19 22:47:18 +01:00
1117fde8fd Update build.yml 2022-03-19 22:42:52 +01:00
af7c4292a4 Update build.sh 2022-03-18 19:57:43 +01:00
56419ce603 Update build.sh 2022-03-18 19:36:19 +01:00
029935ecc2 Update build.sh 2022-03-18 19:26:05 +01:00
bfd09062e4 Update build.sh 2022-03-18 19:24:19 +01:00
1203e68ec6 Update build.sh 2022-03-18 19:14:15 +01:00
d07e03c584 c 2022-03-18 18:53:06 +01:00
f749c55b91 Update build.sh 2022-03-18 12:25:21 +01:00
f5e1e84a75 Update build.sh 2022-03-18 12:22:50 +01:00
539139e46b Update build.sh 2022-03-18 12:19:23 +01:00
570981a779 Update build.sh 2022-03-18 12:07:26 +01:00
996221e57d Update build.sh 2022-03-18 11:43:13 +01:00
24158d40c9 Update build.sh 2022-03-18 11:38:58 +01:00
c7ef38f813 Update build.sh 2022-03-18 09:47:41 +01:00
4eafa791e3 Update build.sh 2022-03-18 08:58:54 +01:00
269240128b Update build.sh 2022-03-18 08:47:40 +01:00
ea715c4119 Update build.sh 2022-03-18 08:27:36 +01:00
bf99a09ccf Added repos as submodules 2022-03-18 08:08:53 +01:00
8974d80115 Update build2.sh 2022-03-16 06:57:36 +01:00
d750940807 Update build.sh 2022-03-16 06:56:43 +01:00
b49cadb30a Update build2.sh 2022-03-15 22:29:14 +01:00
5bce2f65af Update build.sh 2022-03-15 22:28:30 +01:00
4026ca277b Update build.sh 2022-01-19 09:59:08 +01:00
8d52059629 Update 0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch 2022-01-19 09:53:12 +01:00
966b931454 Update 0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch 2022-01-19 09:42:23 +01:00
987f4ec700 Update 0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch 2022-01-19 08:57:46 +01:00
cc32f9d618 Update build.sh 2022-01-19 08:50:16 +01:00
3a9c9cbf8d Update build.sh 2022-01-19 08:49:44 +01:00
b290815fbb Create 0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch 2022-01-19 08:48:58 +01:00
1e694ac58f Update build.sh 2022-01-19 08:42:24 +01:00
43e84a9660 Update build.sh 2022-01-19 06:18:52 +01:00
c82f2c2638 Update build.sh 2022-01-19 06:14:32 +01:00
b070b776f9 Update build.sh 2022-01-18 16:39:14 +01:00
4ae7792806 Update build2.sh 2022-01-18 08:50:06 +01:00
59082dc913 Update build.sh 2022-01-18 08:31:25 +01:00
8999f506a2 Update build.sh 2022-01-17 17:41:20 +01:00
c48d04776a Update build2.sh 2021-11-26 15:14:39 +01:00
da7cd05efb Update build2.sh 2021-11-21 09:59:00 +01:00
54f0dff608 Update build2.sh 2021-11-21 09:55:59 +01:00
4ae60ecc95 Update build2.sh 2021-11-21 09:44:52 +01:00
394f7e74ae Update build2.sh 2021-11-21 09:40:36 +01:00
d696d7f7f3 Create build2.sh 2021-11-21 09:19:12 +01:00
677f8e2a67 Update build.sh 2021-09-29 10:55:31 +02:00
91371bc17e Update build.sh 2021-09-05 20:14:03 +02:00
caff3eb800 Update build.sh 2021-09-02 17:50:22 +02:00
e643154f7b Update build.sh 2021-08-30 11:03:07 +02:00
91507cbb94 Update build.sh 2021-08-30 10:56:38 +02:00
5c3173a2f4 Update build.sh 2021-08-30 10:49:47 +02:00
a3209ea914 Update build.sh 2021-08-30 10:45:11 +02:00
3d252ffad3 Update build.sh 2021-08-30 10:35:25 +02:00
fd7c2762e3 Update build.sh 2021-08-30 10:29:32 +02:00
bb35c41a8d Update build.sh 2021-08-30 10:11:54 +02:00
873f23f0c8 Update build.sh 2021-08-30 10:04:33 +02:00
5a37931ae9 Update build.sh 2021-08-30 09:56:24 +02:00
3b191aeb51 Update build.sh 2021-08-30 09:48:38 +02:00
e65153c7f9 Update build.sh 2021-08-30 09:43:26 +02:00
512485741f Update build.sh 2021-08-30 09:39:44 +02:00
bab5f24e73 Update build.sh 2021-08-30 09:30:51 +02:00
cd44a35b9f Update build.sh 2021-08-29 17:16:12 +02:00
2288c79cf2 Update build.sh 2021-08-29 17:05:18 +02:00
2c2fb948cd Update build.sh 2021-08-29 16:58:09 +02:00
5a2a597ba1 Update build.sh 2021-08-29 16:53:52 +02:00
58f52f56ac Update build.sh 2021-08-29 16:49:18 +02:00
fea57bb55e Update build.sh 2021-08-29 16:27:51 +02:00
1ce4abf089 Update build.sh 2021-08-29 16:27:20 +02:00
9e4350759a Update build.sh 2021-08-29 16:16:43 +02:00
3f53de0b1e Update build.sh 2021-06-21 08:10:23 +02:00
fc05ed52b1 Create 0003-dynamic-loading-of-shared-fdk-aac-library-4.4.patch 2021-06-21 08:09:47 +02:00
a3ad9bbf1d Update build.sh 2021-06-20 19:11:59 +02:00
ac17b2aaa6 Update build.sh 2021-05-26 10:41:14 +02:00
3ecc062e96 Update build.sh 2021-05-26 10:36:55 +02:00
64a13744e4 Update build.sh 2021-05-26 10:27:54 +02:00
cb48f7766b Update build.sh 2021-05-26 09:36:17 +02:00
c41cfa07ad Update build.sh 2021-05-26 09:19:07 +02:00
b079974229 Update build.sh 2021-05-26 09:04:51 +02:00
861854a1b5 Update build.sh 2021-05-26 08:56:13 +02:00
ccacc1c830 Update build.sh 2021-05-26 08:46:10 +02:00
c326906198 Update build.sh 2021-05-26 08:43:09 +02:00
10559b3466 Update build.sh 2021-05-26 08:37:51 +02:00
b95f4fc3a3 Update build.sh 2021-05-26 08:37:12 +02:00
1906c9276c Update build.sh 2021-05-25 16:36:47 +02:00
4686b1c4b8 Delete 0002-set-matroska-timebase-to-one-microsecond.patch 2021-05-20 14:17:24 +02:00
5bca236c4e Delete 0002-patch-ffmpeg-to-new-fdk-api.patch 2021-05-20 14:17:16 +02:00
1d3d5b973c Delete 0001-dynamic-loading-of-shared-fdk-aac-library.patch 2021-05-20 14:16:39 +02:00
4713cffc89 Delete 0001-dynamic-loading-of-shared-fdk-aac-library-4.0.patch 2021-05-20 14:16:27 +02:00
4573f0a0a9 Update build.sh 2021-05-20 09:35:19 +02:00
bfddadff1f Update 0003-dynamic-loading-of-shared-fdk-aac-library.patch 2021-05-20 09:33:28 +02:00
e0c329869d Update build.sh 2021-05-20 08:50:51 +02:00
38241d8ad6 Create 0003-dynamic-loading-of-shared-fdk-aac-library.patch 2021-05-20 08:37:50 +02:00
dfd32fe55e Update build.sh 2021-05-09 10:27:42 +02:00
74138e59e9 Update build.sh 2021-03-14 14:31:33 +01:00
ddbeba9021 Update build.sh 2021-02-27 12:04:46 +01:00
5b0edc6888 Update build.sh 2021-02-22 09:52:30 +01:00
011ff20b96 Update build.sh 2021-02-22 09:46:30 +01:00
871a0c28aa Update build.sh 2021-02-22 09:41:07 +01:00
628bf84e42 Update build.sh 2021-02-22 09:28:36 +01:00
3cff1b4e85 Update build.sh 2021-02-22 09:19:41 +01:00
55531b02a5 Update build.sh 2021-02-22 09:15:50 +01:00
52fb49ed1c Update build.sh 2021-02-22 09:10:42 +01:00
d948ba4ffe Update build.sh 2021-02-22 09:04:43 +01:00
f5ddc9632e Update build.sh
Fixed SV1 build
2021-02-18 14:25:22 +01:00
5576d4a4ca Update build.sh 2021-01-06 09:17:29 +01:00
0a5eb81720 Added libass 2021-01-03 15:24:48 +01:00
78d4b35ede Update build.sh 2020-12-30 19:55:54 +01:00
ed7b3ce6e2 Update build.sh 2020-12-17 23:24:44 +01:00
a0eeef3ef8 Update build.sh 2020-12-17 22:54:01 +01:00
39db2912df Update README.md 2020-12-16 09:29:34 +01:00
b786a278f3 Update README.md 2020-12-12 10:06:28 +01:00
816eb3acab Update build.sh 2020-12-06 08:02:49 +01:00
d2efe9c7de Update build.sh 2020-09-08 09:00:11 +02:00
14 changed files with 2634 additions and 350 deletions

View File

@ -1,18 +0,0 @@
name: CI
on:
schedule:
- cron: "0 2 * * *"
jobs:
build:
runs-on: windows-latest
steps:
- name: Build it!
run:
choco install msys2
echo "::set-env name=CHERE_INVOKING::enabled_from_arguments"
echo "::set-env name=MODE::release"
echo "::set-env name=MSYS2_PATH_TYPE::inherit"
echo "::set-env name=MSYSTEM::MINGW64"
c:\tools\msys64\usr\bin\bash.exe -l -c "pacman -S base-devel binutils git make pkg-config"

504
.github/workflows/ffmpeg-static.yml vendored Normal file
View File

@ -0,0 +1,504 @@
name: FFmpeg-Static
on:
workflow_dispatch:
inputs:
config:
description: 'Configuration'
required: true
default: 'Debug'
env:
vsPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\
msysConfig: debug
winConfig: Debug
cFlags: -MDd
switches: "--enable-libvpl --enable-libsvtav1 --enable-libsnappy --enable-libvpx --enable-libmp3lame --enable-libzimg --enable-libopus --enable-libogg --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libfdk-aac"
NASM_EXECUTABLE: nasm
jobs:
libogg:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake
path-type: inherit
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout Ogg
uses: actions/checkout@v3.0.0
with:
repository: xiph/ogg
ref: master
path: ogg
- name: Build Ogg
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd ogg ; autoreconf -i ; CC=cl.exe CXX=cl.exe CXXFLAGS=${{ env.cFlags }} ./configure --prefix=$(realpath ../build) --disable-shared ; make -j ; make install'
libvorbis:
runs-on: windows-2019
needs: [libogg]
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake
path-type: inherit
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout Vorbis
uses: actions/checkout@v3.0.0
with:
repository: xiph/vorbis
ref: master
path: vorbis
- name: Build Vorbis
shell: cmd
run: |
dir /s build
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd vorbis ; autoreconf -i ; CC=cl.exe CXX=cl.exe CXXFLAGS=${{ env.cFlags }} ./configure --prefix=$(realpath ../build) --disable-shared ; make -j ; make install ; sed -i '/^Libs\.private.*/d' ../build/lib/pkgconfig/vorbis.pc'
libvpl:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake
path-type: inherit
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout oneVPL
uses: actions/checkout@v3.0.0
with:
repository: oneapi-src/oneVPL
ref: master
path: onevpl
- name: Build oneVPL
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md temp build
cd temp
cmake.exe -G "Visual Studio 16 2019" ..\onevpl -T host=x64 -A x64 -DBUILD_TOOLS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=..\build -DCMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD=ON
MSBuild.exe -t:VPL,INSTALL -p:Configuration=${{ env.winConfig }} -m oneVPL.sln
D:\a\_temp\setup-msys2\msys2.cmd -c 'rm -rf ../build/bin/cmake'
libsvtav1:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout SVT AV1
uses: actions/checkout@v3.0.0
with:
repository: AOMediaCodec/SVT-AV1
ref: master
path: svtav1
- name: Build SVT AV1
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd svtav1/Build/windows ; ./build.bat 2019 ${{ env.winConfig }} static ; cp -r ../../Source/API ../../../build/include/svt-av1 ; cp ../../Bin/${{ env.msysConfig }}/SvtAv1Enc.lib ../../../build/lib/ ; cp SvtAv1Enc.pc ../../../build/lib/pkgconfig/'
libsnappy:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout Snappy
uses: actions/checkout@v3.0.0
with:
repository: google/snappy
ref: "1.1.8"
path: snappy
- name: Build Snappy
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
cd snappy
md work
cd work
cmake -G "Visual Studio 16 2019" .. -DCMAKE_INSTALL_PREFIX=..\..\build -DBUILD_SHARED_LIBS=OFF -DSNAPPY_BUILD_TESTS=OFF
MSBuild.exe /property:Configuration="${{ env.winConfig }}" Snappy.sln
D:\a\_temp\setup-msys2\msys2.cmd -c 'cp ${{ env.winConfig }}/snappy.lib ../../build/lib/snappy.lib ; cp ../snappy.h ../snappy-c.h ../../build/include/'
libvpx:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout LibVpx
uses: actions/checkout@v3.0.0
with:
repository: webmproject/libvpx
ref: master
path: vpx
- name: Build LibVpx
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd vpx ; ./configure --prefix=../build --target=x86_64-win64-vs16 --enable-vp9-highbitdepth --disable-shared --disable-examples --disable-tools --disable-docs --disable-libyuv --disable-unit_tests --disable-postproc ; make -j ; make install ; mv ../build/lib/x64/vpxmd.lib ../build/lib/vpx.lib ; rm -rf ../build/lib/x64'
libmp3lame:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm svn
path-type: inherit
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Build LAME
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'svn co svn://svn.code.sf.net/p/lame/svn/trunk/lame@6474 lame ; cd lame ; autoreconf -i ; CC=cl.exe CXX=cl.exe CXXFLAGS=${{ env.cFlags }} ./configure --prefix=$(realpath ../build) --enable-nasm --disable-frontend --disable-shared --enable-static ; make -j ; make install'
libzimg:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout ZIMG
uses: actions/checkout@v3.0.0
with:
repository: sekrit-twc/zimg
ref: release-2.9.2
path: zimg
- name: Build ZIMG
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd zimg ; ./autogen.sh ; ./configure --prefix=$(realpath ../build) ; cd _msvc/zimg ; MSBuild.exe /property:Configuration="${{ env.winConfig }}" /property:ConfigurationType=StaticLibrary /property:WindowsTargetPlatformVersion=10.0.17134.0 /property:PlatformToolset=v142 /property:Platform=x64 /property:WholeProgramOptimization=false zimg.vcxproj ; cp x64/${{ env.winConfig }}/z.lib ../../../build/lib/zimg.lib ; cd ../.. ; cp src/zimg/api/zimg.h ../build/include/zimg.h ; cp zimg.pc ../build/lib/pkgconfig/zimg.pc'
libopus:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout OPUS
uses: actions/checkout@v3.0.0
with:
repository: xiph/opus
ref: master
path: opus
- name: Build OPUS
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
cd opus\win32\VS2015
MSBuild.exe /property:Configuration="${{ env.winConfig }}" /property:Platform=x64 /property:PlatformToolset=v142 opus.vcxproj
D:\a\_temp\setup-msys2\msys2.cmd -c 'cp x64/${{ env.winConfig }}/opus.lib ../../../build/lib/opus.lib ; cd ../../.. ; cp -r opus/include build/include/opus ; cp opus/opus.pc.in build/lib/pkgconfig/opus.pc ; sed -i "s#@prefix@#$BUILD#g" build/lib/pkgconfig/opus.pc ; sed -i "s/@exec_prefix@/\$\{prefix\}/g" build/lib/pkgconfig/opus.pc ; sed -i "s/@libdir@/\$\{prefix\}\/lib/g" build/lib/pkgconfig/opus.pc ; sed -i "s/@includedir@/\$\{prefix\}\/include/g" build/lib/pkgconfig/opus.pc ; sed -i "s/@LIBM@//g" build/lib/pkgconfig/opus.pc; sed -i "s/@VERSION@/2.0.0/g" build/lib/pkgconfig/opus.pc'
libx264:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout X264
uses: actions/checkout@v3.0.0
with:
repository: mirror/x264
ref: master
path: x264
- name: Build X264
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd x264 ; CC=cl ./configure --prefix=$(realpath ../build) --disable-cli --enable-static --enable-pic --libdir=../build/lib ; make -j ; make install-lib-static'
libfdkaac:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout FDK AAC
uses: actions/checkout@v3.0.0
with:
repository: mstorsjo/fdk-aac
ref: master
path: fdkaac
- name: Build FDK AAC
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd fdkaac ; autoreconf -fiv ; CC=cl.exe CXX=cl.exe CXXFLAGS=-MDd ./configure --prefix=$(realpath ../build) --disable-shared --disable-static ; make ; make install'
libx265-12:
runs-on: windows-2019
steps:
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.1
- name: Set up NASM
uses: ilammy/setup-nasm@v1.2.1
- name: Checkout X265
shell: cmd
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git clone -b Release_3.5 https://github.com/videolan/x265.git x265
- name: Build X265 (12 bit)
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
cd x265/build/vc15-x86_64
md work
cd work
cmake -G "Visual Studio 16 2019" ..\..\..\source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
MSBuild.exe /property:Configuration="${{ env.winConfig }}" x265-static.vcxproj
move ${{ env.winConfig }}\x265-static.lib ..\..\..\..\build\lib\x265_12bit.lib
libx265-10:
runs-on: windows-2019
steps:
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.1
- name: Set up NASM
uses: ilammy/setup-nasm@v1.2.1
- name: Checkout X265
shell: cmd
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git clone -b Release_3.5 https://github.com/videolan/x265.git x265
- name: Build X265 (10 bit)
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
cd x265/build/vc15-x86_64
md work
cd work
cmake -G "Visual Studio 16 2019" ..\..\..\source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
MSBuild.exe /property:Configuration="${{ env.winConfig }}" x265-static.vcxproj
move ${{ env.winConfig }}\x265-static.lib ..\..\..\..\build\lib\x265_10bit.lib
libx265:
runs-on: windows-2019
needs: [libx265-12,libx265-10]
steps:
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.1
- name: Set up NASM
uses: ilammy/setup-nasm@v1.2.1
- name: Checkout X265
shell: cmd
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git clone -b Release_3.5 https://github.com/videolan/x265.git x265
- name: Set up dependant libs
uses: actions/download-artifact@v3
with:
path: build
- name: Build X265
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md dist dist\include dist\lib dist\lib\pkgconfig
cd x265/build/vc15-x86_64
md work
cd work
cmake -G "Visual Studio 16 2019" ..\..\..\source -DCMAKE_INSTALL_PREFIX=..\..\..\..\build -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DEXTRA_LIB="libx265_10bit.lib;libx265_12bit.lib" -DLINKED_10BIT=ON -DLINKED_12BIT=ON
MSBuild.exe /property:Configuration="${{ env.winConfig }}" x265-static.vcxproj
cp x265.pc ..\..\..\..\dist\lib\pkgconfig\x265.pc
move ${{ env.winConfig }}\x265-static.lib ..\..\..\..\build\
move x265_config.h ..\..\..\..\dist\include\
cd ..\..\..\..\build\lib
"${{ env.vsPath }}VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\lib.exe" /ignore:4006 /ignore:4221 /OUT:x265.lib x265-static.lib x265_10bit.lib x265_12bit.lib
copy ..\..\x265\source\x265.h ..\..\dist\include\
rm build\lib\x265_10bit.lib build\lib\x265_12bit.lib
ffmpeg:
runs-on: windows-2019
needs: [libopus,libvpl,libsvtav1,libsnappy,libvpx,libmp3lame,libzimg,libvorbis,libx264,libx265,libfdkaac]
steps:
- name: Set up cache
uses: actions/cache@v1
with:
key: ffmpeg-build
path: build
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout patches
uses: actions/checkout@v3.0.0
- name: Checkout FFmpeg
uses: actions/checkout@v3.0.0
with:
repository: FFmpeg/FFmpeg.git
ref: release/5.0
path: ffmpeg
- name: Checkout NvEnc
uses: actions/checkout@v3.0.0
with:
repository: FFmpeg/nv-codec-headers
ref: sdk/9.1
path: nvenc
- name: Checkout AMF
uses: actions/checkout@v3.0.0
with:
repository: GPUOpen-LibrariesAndSDKs/AMF
ref: master
path: amf
- name: Set up artifacts
uses: actions/download-artifact@v3
with:
path: build_artifacts
- name: Build FFmpeg
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd ffmpeg ; git apply --ignore-whitespace --verbose ../patches/0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch ; cd ../build ; for file in `ls ../build_artifacts/**/*.tgz`; do tar -xzf $file; done ; rm -f bin/*.dll ; cd ../nvenc ; make PREFIX=../build install ; cp -a ../amf/amf/public/include ../build/include/AMF ; cd ../ffmpeg ; PKG_CONFIG_PATH=../build/lib/pkgconfig ./configure --toolchain=msvc --extra-cflags="${{ env.cFlags }} -I../build/include" --extra-ldflags="-LIBPATH:../build/lib" --prefix=../build --pkg-config-flags="--static" --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --disable-devices --disable-demuxers --disable-decoders --disable-network --enable-w32threads --enable-gpl ${{ env.switches }} ; make ; make install ; cd ../build/lib ; for file in *.a; do mv "$file" "`basename "$file" .a`.lib" ; done ; rm -rf fdk-aac.lib cmake pkgconfig *.la ../share ; cd .. ; tar czf ../dist/ffmpeg-win64-static-${{ env.msysConfig }}.tar.gz *'
- name: Publish FFmpeg artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.winConfig }} package build
path: dist/ffmpeg-win64-static-${{ env.msysConfig }}.tar.gz

559
.github/workflows/ffmpeg.yml vendored Normal file
View File

@ -0,0 +1,559 @@
name: FFmpeg (v142)
on:
workflow_dispatch:
inputs:
config:
type: choice
description: Configuration
options:
- Debug
- Release
env:
vsPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\
switches: "--enable-libsvtav1 --enable-libsnappy --enable-libvpx --enable-libmp3lame --enable-libzimg --enable-libopus --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libfdk-aac" #--enable-libvpl
NASM_EXECUTABLE: nasm
msysConfig: Debug
winConfig: debug
cFlags: -MDd
jobs:
liboggvorbis:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout Ogg
uses: actions/checkout@v3.0.0
with:
repository: xiph/ogg
ref: master
path: ogg
- name: Checkout Vorbis
uses: actions/checkout@v3.0.0
with:
repository: xiph/vorbis
ref: master
path: vorbis
- name: Build Ogg
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd ogg ; autoreconf -i ; CC=cl.exe CXX=cl.exe CXXFLAGS=${{ env.cFlags }} ./configure --prefix=$(realpath ../build) --disable-shared ; make -j ; make install'
- name: Build Vorbis
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd vorbis ; autoreconf -i ; CC=cl.exe CXX=cl.exe CXXFLAGS=${{ env.cFlags }} ./configure --prefix=$(realpath ../build) --disable-shared ; make -j ; make install ; sed -i '/^Libs\.private.*/d' ../build/lib/pkgconfig/vorbis.pc ; cd ../build ; tar czf ../dist/liboggvorbis.tgz *'
echo "switches=${{env.switches}} --enable-encoder=libopus --enable-encoder=libvorbis" >> $GITHUB_ENV
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: liboggvorbis
path: dist/liboggvorbis.tgz
libvpl:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout oneVPL
uses: actions/checkout@v3.0.0
with:
repository: oneapi-src/oneVPL
ref: master
path: onevpl
- name: Build oneVPL
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md temp build dist
cd temp
cmake.exe -G "Visual Studio 16 2019" ..\onevpl -T host=x64 -A x64 -DBUILD_TOOLS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=..\build -DCMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD=ON
MSBuild.exe -t:VPL,INSTALL -p:Configuration=${{ env.winConfig }} -m oneVPL.sln
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd ../build ; rm -rf bin/cmake ; tar czf ../dist/libvpl.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libvpl
path: dist/libvpl.tgz
libsvtav1:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout SVT AV1
uses: actions/checkout@v3.0.0
with:
repository: AOMediaCodec/SVT-AV1
ref: master
path: svtav1
- name: Build SVT AV1
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd svtav1/Build/windows ; ./build.bat 2019 ${{ env.winConfig }} static ; cp -r ../../Source/API ../../../build/include/svt-av1 ; cp ../../Bin/${{ env.msysConfig }}/SvtAv1Enc.lib ../../../build/lib/ ; cp SvtAv1Enc.pc ../../../build/lib/pkgconfig/ ; cd ../../../build ; tar czf ../dist/libsvtav1.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libsvtav1
path: dist/libsvtav1.tgz
libsnappy:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout Snappy
uses: actions/checkout@v3.0.0
with:
repository: google/snappy
ref: "1.1.8"
path: snappy
- name: Build Snappy
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
cd snappy
md work
cd work
cmake -G "Visual Studio 16 2019" .. -DCMAKE_INSTALL_PREFIX=..\..\build -DBUILD_SHARED_LIBS=OFF -DSNAPPY_BUILD_TESTS=OFF
MSBuild.exe /property:Configuration="${{ env.winConfig }}" Snappy.sln
D:\a\_temp\setup-msys2\msys2.cmd -c 'cp ${{ env.winConfig }}/snappy.lib ../../build/lib/snappy.lib ; cp ../snappy.h ../snappy-c.h ../../build/include/ ; cd ../../build ; tar czf ../dist/libsnappy.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libsnappy
path: dist/libsnappy.tgz
libvpx:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout LibVpx
uses: actions/checkout@v3.0.0
with:
repository: webmproject/libvpx
ref: master
path: vpx
- name: Build LibVpx
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd vpx ; ./configure --prefix=../build --target=x86_64-win64-vs16 --enable-vp9-highbitdepth --disable-shared --disable-examples --disable-tools --disable-docs --disable-libyuv --disable-unit_tests --disable-postproc ; make -j ; make install ; mv ../build/lib/x64/vpxmd.lib ../build/lib/vpx.lib ; rm -rf ../build/lib/x64 ; cd ../build ; tar czf ../dist/libvpx.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libvpx
path: dist/libvpx.tgz
libmp3lame:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm svn
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Build LAME
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'svn co svn://svn.code.sf.net/p/lame/svn/trunk/lame@6474 lame ; cd lame ; autoreconf -i ; CC=cl.exe CXX=cl.exe CXXFLAGS=${{ env.cFlags }} ./configure --prefix=$(realpath ../build) --enable-nasm --disable-frontend --disable-shared --enable-static ; make -j ; make install ; cd ../build ; tar czf ../dist/libmp3lame.tgz *
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libmp3lame
path: dist/libmp3lame.tgz
libzimg:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout ZIMG
uses: actions/checkout@v3.0.0
with:
repository: sekrit-twc/zimg
ref: release-2.9.2
path: zimg
- name: Build ZIMG
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd zimg ; ./autogen.sh ; ./configure --prefix=$(realpath ../build) ; cd _msvc/zimg ; MSBuild.exe /property:Configuration="${{ env.winConfig }}" /property:ConfigurationType=StaticLibrary /property:WindowsTargetPlatformVersion=10.0.17134.0 /property:PlatformToolset=v142 /property:Platform=x64 /property:WholeProgramOptimization=false zimg.vcxproj ; cp x64/${{ env.winConfig }}/z.lib ../../../build/lib/zimg.lib ; cd ../.. ; cp src/zimg/api/zimg.h ../build/include/zimg.h ; cp zimg.pc ../build/lib/pkgconfig/zimg.pc ; cd ../build ; tar czf ../dist/libzimg.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libzimg
path: dist/libzimg.tgz
libopus:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout OPUS
uses: actions/checkout@v3.0.0
with:
repository: xiph/opus
ref: master
path: opus
- name: Build OPUS
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
cd opus\win32\VS2015
MSBuild.exe /property:Configuration="${{ env.winConfig }}" /property:Platform=x64 /property:PlatformToolset=v142 opus.vcxproj
D:\a\_temp\setup-msys2\msys2.cmd -c 'cp x64/${{ env.winConfig }}/opus.lib ../../../build/lib/opus.lib ; cd ../../.. ; cp -r opus/include build/include/opus ; cp opus/opus.pc.in build/lib/pkgconfig/opus.pc ; sed -i "s#@prefix@#$(realpath ../../../build)#g" build/lib/pkgconfig/opus.pc ; sed -i "s/@exec_prefix@/\$\{prefix\}/g" build/lib/pkgconfig/opus.pc ; sed -i "s/@libdir@/\$\{prefix\}\/lib/g" build/lib/pkgconfig/opus.pc ; sed -i "s/@includedir@/\$\{prefix\}\/include/g" build/lib/pkgconfig/opus.pc ; sed -i "s/@LIBM@//g" build/lib/pkgconfig/opus.pc; sed -i "s/@VERSION@/2.0.0/g" build/lib/pkgconfig/opus.pc ; cd build ; tar czf ../dist/libopus.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libopus
path: dist/libopus.tgz
libx264:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout X264
uses: actions/checkout@v3.0.0
with:
repository: mirror/x264
ref: master
path: x264
- name: Build X264
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd x264 ; CC=cl ./configure --prefix=$(realpath ../build) --disable-cli --enable-static --enable-pic --libdir=../build/lib ; make -j ; make install-lib-static ; cd ../build ; tar czf ../dist/libx264.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libx264
path: dist/libx264.tgz
libfdkaac:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout FDK AAC
uses: actions/checkout@v3.0.0
with:
repository: mstorsjo/fdk-aac
ref: master
path: fdkaac
- name: Build FDK AAC
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd fdkaac ; autoreconf -fiv ; CC=cl.exe CXX=cl.exe CXXFLAGS=-MDd ./configure --prefix=$(realpath ../build) --disable-shared --disable-static ; make ; make install ; cd ../build ; tar czf ../dist/libfdkaac.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libfdkaac
path: dist/libfdkaac.tgz
libx265-12:
runs-on: windows-2019
steps:
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.1
- name: Set up NASM
uses: ilammy/setup-nasm@v1.2.1
- name: Checkout X265
shell: cmd
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git clone -b Release_3.5 https://github.com/videolan/x265.git x265
- name: Build X265 (12 bit)
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
cd x265/build/vc15-x86_64
md work
cd work
cmake -G "Visual Studio 16 2019" ..\..\..\source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
MSBuild.exe /property:Configuration="${{ env.winConfig }}" x265-static.vcxproj
move ${{ env.winConfig }}\x265-static.lib ..\..\..\..\dist\x265_12bit.lib
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: x265_12bit
path: dist/x265_12bit.lib
libx265-10:
runs-on: windows-2019
steps:
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.1
- name: Set up NASM
uses: ilammy/setup-nasm@v1.2.1
- name: Checkout X265
shell: cmd
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git clone -b Release_3.5 https://github.com/videolan/x265.git x265
- name: Build X265 (10 bit)
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
cd x265/build/vc15-x86_64
md work
cd work
cmake -G "Visual Studio 16 2019" ..\..\..\source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
MSBuild.exe /property:Configuration="${{ env.winConfig }}" x265-static.vcxproj
move ${{ env.winConfig }}\x265-static.lib ..\..\..\..\dist\x265_10bit.lib
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: x265_10bit
path: dist/x265_10bit.lib
libx265:
runs-on: windows-2019
needs: [libx265-12,libx265-10]
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake
path-type: inherit
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.1
- name: Set up NASM
uses: ilammy/setup-nasm@v1.2.1
- name: Checkout X265
shell: cmd
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git clone -b Release_3.5 https://github.com/videolan/x265.git x265
- name: Set up dependant libs
uses: actions/download-artifact@v3
with:
path: build
- name: Build X265
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md dist dist\include dist\lib dist\lib\pkgconfig
cd x265/build/vc15-x86_64
md work
cd work
cmake -G "Visual Studio 16 2019" ..\..\..\source -DCMAKE_INSTALL_PREFIX=..\..\..\..\build -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DEXTRA_LIB="libx265_10bit.lib;libx265_12bit.lib" -DLINKED_10BIT=ON -DLINKED_12BIT=ON
MSBuild.exe /property:Configuration="${{ env.winConfig }}" x265-static.vcxproj
cp x265.pc ..\..\..\..\dist\lib\pkgconfig\x265.pc
move ${{ env.winConfig }}\x265-static.lib ..\..\..\..\build\
move x265_config.h ..\..\..\..\dist\include\
cd ..\..\..\..
"${{ env.vsPath }}VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\lib.exe" /ignore:4006 /ignore:4221 /OUT:dist\lib\x265.lib build\x265-static.lib build\x265_10bit\x265_10bit.lib build\x265_12bit\x265_12bit.lib
copy x265\source\x265.h dist\include\
dir /s dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd dist ; tar czf ../libx265.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libx265
path: libx265.tgz
ffmpeg:
runs-on: windows-2019
needs: [libopus,libvpl,libsvtav1,libsnappy,libvpx,libmp3lame,libzimg,liboggvorbis,libx264,libx265,libfdkaac]
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout patches
uses: actions/checkout@v3.0.0
- name: Checkout FFmpeg
uses: actions/checkout@v3.0.0
with:
repository: FFmpeg/FFmpeg.git
ref: release/5.0
path: ffmpeg
- name: Checkout NvEnc
uses: actions/checkout@v3.0.0
with:
repository: FFmpeg/nv-codec-headers
ref: sdk/9.1
path: nvenc
- name: Checkout AMF
uses: actions/checkout@v3.0.0
with:
repository: GPUOpen-LibrariesAndSDKs/AMF
ref: master
path: amf
- name: Set up artifacts
uses: actions/download-artifact@v3
with:
path: build_artifacts
- name: Build FFmpeg
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd ffmpeg ; git apply --ignore-whitespace --verbose ../patches/0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch ; sed -i "s/#define X264_API_IMPORTS 1/\/\/#define X264_API_IMPORTS 1/g" libavcodec/libx264.c ; cd ../build ; for file in `ls ../build_artifacts/**/*.tgz`; do tar -xzf $file; done ; rm -f bin/*.dll ; cd ../nvenc ; make PREFIX=../build install ; cp -a ../amf/amf/public/include ../build/include/AMF ; cd ../ffmpeg ; PKG_CONFIG_PATH=../build/lib/pkgconfig ./configure --toolchain=msvc --extra-cflags="${{ env.cFlags }} -I../build/include" --extra-ldflags="-LIBPATH:../build/lib" --prefix=../build --pkg-config-flags="--static" --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --disable-devices --disable-demuxers --disable-decoders --disable-network --enable-w32threads --enable-gpl ${{ env.switches }} ; make ; make install ; cd ../build/lib ; for file in *.a; do mv "$file" "`basename "$file" .a`.lib" ; done ; rm -rf fdk-aac.lib cmake pkgconfig *.la ../share ; cd .. ; tar czf ../dist/ffmpeg-win64-static-${{ env.msysConfig }}.tar.gz *'
- name: Publish FFmpeg artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.winConfig }} package build
path: dist/ffmpeg-win64-static-${{ env.msysConfig }}.tar.gz

559
.github/workflows/ffmpeg2.yml vendored Normal file
View File

@ -0,0 +1,559 @@
name: FFmpeg (v143)
on:
workflow_dispatch:
inputs:
config:
type: choice
description: Configuration
options:
- Debug
- Release
env:
vsPath: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\
switches: "--enable-libsvtav1 --enable-libsnappy --enable-libvpx --enable-libmp3lame --enable-libzimg --enable-libopus --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libfdk-aac" #--enable-libvpl
NASM_EXECUTABLE: nasm
msysConfig: Release
winConfig: release
cFlags: -MD
jobs:
liboggvorbis:
runs-on: windows-2022
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout Ogg
uses: actions/checkout@v3.0.0
with:
repository: xiph/ogg
ref: master
path: ogg
- name: Checkout Vorbis
uses: actions/checkout@v3.0.0
with:
repository: xiph/vorbis
ref: master
path: vorbis
- name: Build Ogg
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd ogg ; autoreconf -i ; CC=cl.exe CXX=cl.exe CXXFLAGS=${{ env.cFlags }} ./configure --prefix=$(realpath ../build) --disable-shared ; make -j ; make install'
- name: Build Vorbis
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd vorbis ; autoreconf -i ; CC=cl.exe CXX=cl.exe CXXFLAGS=${{ env.cFlags }} ./configure --prefix=$(realpath ../build) --disable-shared ; make -j ; make install ; sed -i '/^Libs\.private.*/d' ../build/lib/pkgconfig/vorbis.pc ; cd ../build ; tar czf ../dist/liboggvorbis.tgz *'
echo "switches=${{env.switches}} --enable-encoder=libopus --enable-encoder=libvorbis" >> $GITHUB_ENV
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: liboggvorbis
path: dist/liboggvorbis.tgz
libvpl:
runs-on: windows-2022
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout oneVPL
uses: actions/checkout@v3.0.0
with:
repository: oneapi-src/oneVPL
ref: master
path: onevpl
- name: Build oneVPL
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md temp build dist
cd temp
cmake.exe -G "Visual Studio 17 2022" ..\onevpl -T host=x64 -A x64 -DBUILD_TOOLS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=..\build -DCMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD=ON
MSBuild.exe -t:VPL,INSTALL -p:Configuration=${{ env.winConfig }} -m oneVPL.sln
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd ../build ; rm -rf bin/cmake ; tar czf ../dist/libvpl.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libvpl
path: dist/libvpl.tgz
libsvtav1:
runs-on: windows-2022
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout SVT AV1
uses: actions/checkout@v3.0.0
with:
repository: AOMediaCodec/SVT-AV1
ref: master
path: svtav1
- name: Build SVT AV1
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd svtav1/Build/windows ; ./build.bat 2022 ${{ env.winConfig }} static ; cp -r ../../Source/API ../../../build/include/svt-av1 ; cp ../../Bin/${{ env.msysConfig }}/SvtAv1Enc.lib ../../../build/lib/ ; cp SvtAv1Enc.pc ../../../build/lib/pkgconfig/ ; cd ../../../build ; tar czf ../dist/libsvtav1.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libsvtav1
path: dist/libsvtav1.tgz
libsnappy:
runs-on: windows-2022
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout Snappy
uses: actions/checkout@v3.0.0
with:
repository: google/snappy
ref: "1.1.8"
path: snappy
- name: Build Snappy
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
cd snappy
md work
cd work
cmake -G "Visual Studio 17 2022" .. -DCMAKE_INSTALL_PREFIX=..\..\build -DBUILD_SHARED_LIBS=OFF -DSNAPPY_BUILD_TESTS=OFF
MSBuild.exe /property:Configuration="${{ env.winConfig }}" Snappy.sln
D:\a\_temp\setup-msys2\msys2.cmd -c 'cp ${{ env.winConfig }}/snappy.lib ../../build/lib/snappy.lib ; cp ../snappy.h ../snappy-c.h ../../build/include/ ; cd ../../build ; tar czf ../dist/libsnappy.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libsnappy
path: dist/libsnappy.tgz
libvpx:
runs-on: windows-2022
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout LibVpx
uses: actions/checkout@v3.0.0
with:
repository: webmproject/libvpx
ref: master
path: vpx
- name: Build LibVpx
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd vpx ; ./configure --prefix=../build --target=x86_64-win64-vs16 --enable-vp9-highbitdepth --disable-shared --disable-examples --disable-tools --disable-docs --disable-libyuv --disable-unit_tests --disable-postproc ; make -j ; make install ; mv ../build/lib/x64/vpxmd.lib ../build/lib/vpx.lib ; rm -rf ../build/lib/x64 ; cd ../build ; tar czf ../dist/libvpx.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libvpx
path: dist/libvpx.tgz
libmp3lame:
runs-on: windows-2022
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm svn
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Build LAME
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'svn co svn://svn.code.sf.net/p/lame/svn/trunk/lame@6474 lame ; cd lame ; autoreconf -i ; CC=cl.exe CXX=cl.exe CXXFLAGS=${{ env.cFlags }} ./configure --prefix=$(realpath ../build) --enable-nasm --disable-frontend --disable-shared --enable-static ; make -j ; make install ; cd ../build ; tar czf ../dist/libmp3lame.tgz *
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libmp3lame
path: dist/libmp3lame.tgz
libzimg:
runs-on: windows-2022
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout ZIMG
uses: actions/checkout@v3.0.0
with:
repository: sekrit-twc/zimg
ref: release-2.9.2
path: zimg
- name: Build ZIMG
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd zimg ; ./autogen.sh ; ./configure --prefix=$(realpath ../build) ; cd _msvc/zimg ; MSBuild.exe /property:Configuration="${{ env.winConfig }}" /property:ConfigurationType=StaticLibrary /property:PlatformToolset=v143 /property:Platform=x64 /property:WholeProgramOptimization=false zimg.vcxproj ; cp x64/${{ env.winConfig }}/z.lib ../../../build/lib/zimg.lib ; cd ../.. ; cp src/zimg/api/zimg.h ../build/include/zimg.h ; cp zimg.pc ../build/lib/pkgconfig/zimg.pc ; cd ../build ; tar czf ../dist/libzimg.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libzimg
path: dist/libzimg.tgz
libopus:
runs-on: windows-2022
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout OPUS
uses: actions/checkout@v3.0.0
with:
repository: xiph/opus
ref: master
path: opus
- name: Build OPUS
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
cd opus\win32\VS2015
MSBuild.exe /property:Configuration="${{ env.winConfig }}" /property:Platform=x64 /property:PlatformToolset=v143 opus.vcxproj
D:\a\_temp\setup-msys2\msys2.cmd -c 'cp x64/${{ env.winConfig }}/opus.lib ../../../build/lib/opus.lib ; cd ../../.. ; cp -r opus/include build/include/opus ; cp opus/opus.pc.in build/lib/pkgconfig/opus.pc ; sed -i "s#@prefix@#$(realpath ../../../build)#g" build/lib/pkgconfig/opus.pc ; sed -i "s/@exec_prefix@/\$\{prefix\}/g" build/lib/pkgconfig/opus.pc ; sed -i "s/@libdir@/\$\{prefix\}\/lib/g" build/lib/pkgconfig/opus.pc ; sed -i "s/@includedir@/\$\{prefix\}\/include/g" build/lib/pkgconfig/opus.pc ; sed -i "s/@LIBM@//g" build/lib/pkgconfig/opus.pc; sed -i "s/@VERSION@/2.0.0/g" build/lib/pkgconfig/opus.pc ; cd build ; tar czf ../dist/libopus.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libopus
path: dist/libopus.tgz
libx264:
runs-on: windows-2022
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout X264
uses: actions/checkout@v3.0.0
with:
repository: mirror/x264
ref: master
path: x264
- name: Build X264
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build build\include build\lib build\lib\pkgconfig dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd x264 ; CC=cl ./configure --prefix=$(realpath ../build) --disable-cli --enable-static --enable-pic --libdir=../build/lib ; make -j ; make install-lib-static ; cd ../build ; tar czf ../dist/libx264.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libx264
path: dist/libx264.tgz
libfdkaac:
runs-on: windows-2022
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout FDK AAC
uses: actions/checkout@v3.0.0
with:
repository: mstorsjo/fdk-aac
ref: master
path: fdkaac
- name: Build FDK AAC
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd fdkaac ; autoreconf -fiv ; CC=cl.exe CXX=cl.exe CXXFLAGS=-MDd ./configure --prefix=$(realpath ../build) --disable-shared --disable-static ; make ; make install ; cd ../build ; tar czf ../dist/libfdkaac.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libfdkaac
path: dist/libfdkaac.tgz
libx265-12:
runs-on: windows-2022
steps:
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.1
- name: Set up NASM
uses: ilammy/setup-nasm@v1.2.1
- name: Checkout X265
shell: cmd
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git clone -b Release_3.5 https://github.com/videolan/x265.git x265
- name: Build X265 (12 bit)
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
cd x265/build/vc15-x86_64
md work
cd work
cmake -G "Visual Studio 17 2022" ..\..\..\source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
MSBuild.exe /property:Configuration="${{ env.winConfig }}" x265-static.vcxproj
move ${{ env.winConfig }}\x265-static.lib ..\..\..\..\dist\x265_12bit.lib
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: x265_12bit
path: dist/x265_12bit.lib
libx265-10:
runs-on: windows-2022
steps:
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.1
- name: Set up NASM
uses: ilammy/setup-nasm@v1.2.1
- name: Checkout X265
shell: cmd
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git clone -b Release_3.5 https://github.com/videolan/x265.git x265
- name: Build X265 (10 bit)
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
cd x265/build/vc15-x86_64
md work
cd work
cmake -G "Visual Studio 17 2022" ..\..\..\source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
MSBuild.exe /property:Configuration="${{ env.winConfig }}" x265-static.vcxproj
move ${{ env.winConfig }}\x265-static.lib ..\..\..\..\dist\x265_10bit.lib
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: x265_10bit
path: dist/x265_10bit.lib
libx265:
runs-on: windows-2022
needs: [libx265-12,libx265-10]
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake
path-type: inherit
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v1.1
- name: Set up NASM
uses: ilammy/setup-nasm@v1.2.1
- name: Checkout X265
shell: cmd
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git clone -b Release_3.5 https://github.com/videolan/x265.git x265
- name: Set up dependant libs
uses: actions/download-artifact@v3
with:
path: build
- name: Build X265
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md dist dist\include dist\lib dist\lib\pkgconfig
cd x265/build/vc15-x86_64
md work
cd work
cmake -G "Visual Studio 17 2022" ..\..\..\source -DCMAKE_INSTALL_PREFIX=..\..\..\..\build -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DEXTRA_LIB="libx265_10bit.lib;libx265_12bit.lib" -DLINKED_10BIT=ON -DLINKED_12BIT=ON
MSBuild.exe /property:Configuration="${{ env.winConfig }}" x265-static.vcxproj
cp x265.pc ..\..\..\..\dist\lib\pkgconfig\x265.pc
move ${{ env.winConfig }}\x265-static.lib ..\..\..\..\build\
move x265_config.h ..\..\..\..\dist\include\
cd ..\..\..\..
"${{ env.vsPath }}VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\lib.exe" /ignore:4006 /ignore:4221 /OUT:dist\lib\x265.lib build\x265-static.lib build\x265_10bit\x265_10bit.lib build\x265_12bit\x265_12bit.lib
copy x265\source\x265.h dist\include\
dir /s dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd dist ; tar czf ../libx265.tgz *'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libx265
path: libx265.tgz
ffmpeg:
runs-on: windows-2022
needs: [libopus,libvpl,libsvtav1,libsnappy,libvpx,libmp3lame,libzimg,liboggvorbis,libx264,libx265,libfdkaac]
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout patches
uses: actions/checkout@v3.0.0
- name: Checkout FFmpeg
uses: actions/checkout@v3.0.0
with:
repository: FFmpeg/FFmpeg.git
ref: release/5.0
path: ffmpeg
- name: Checkout NvEnc
uses: actions/checkout@v3.0.0
with:
repository: FFmpeg/nv-codec-headers
ref: sdk/9.1
path: nvenc
- name: Checkout AMF
uses: actions/checkout@v3.0.0
with:
repository: GPUOpen-LibrariesAndSDKs/AMF
ref: master
path: amf
- name: Set up artifacts
uses: actions/download-artifact@v3
with:
path: build_artifacts
- name: Build FFmpeg
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd ffmpeg ; git apply --ignore-whitespace --verbose ../patches/0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch ; sed -i "s/#define X264_API_IMPORTS 1/\/\/#define X264_API_IMPORTS 1/g" libavcodec/libx264.c ; cd ../build ; for file in `ls ../build_artifacts/**/*.tgz`; do tar -xzf $file; done ; rm -f bin/*.dll ; cd ../nvenc ; make PREFIX=../build install ; cp -a ../amf/amf/public/include ../build/include/AMF ; cd ../ffmpeg ; PKG_CONFIG_PATH=../build/lib/pkgconfig ./configure --toolchain=msvc --extra-cflags="${{ env.cFlags }} -I../build/include" --extra-ldflags="-LIBPATH:../build/lib" --prefix=../build --pkg-config-flags="--static" --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --disable-devices --disable-demuxers --disable-decoders --disable-network --enable-w32threads --enable-gpl ${{ env.switches }} ; make ; make install ; cd ../build/lib ; for file in *.a; do mv "$file" "`basename "$file" .a`.lib" ; done ; rm -rf fdk-aac.lib cmake pkgconfig *.la ../share ; cd .. ; tar czf ../dist/ffmpeg-win64-static-${{ env.msysConfig }}.tar.gz *'
- name: Publish FFmpeg artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.winConfig }} package build
path: dist/ffmpeg-win64-static-${{ env.msysConfig }}.tar.gz

44
.gitmodules vendored Normal file
View File

@ -0,0 +1,44 @@
[submodule "repos/ffnvcodec"]
path = repos/ffnvcodec
url = https://github.com/FFmpeg/nv-codec-headers.git
branch = sdk/9.1
[submodule "repos/amf"]
path = repos/amf
url = https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git
[submodule "repos/svt-av1"]
path = repos/svt-av1
url = https://github.com/AOMediaCodec/SVT-AV1
[submodule "repos/libogg"]
path = repos/libogg
url = https://github.com/xiph/ogg.git
[submodule "repos/libvorbis"]
path = repos/libvorbis
url = https://github.com/xiph/vorbis.git
[submodule "repos/snappy"]
path = repos/snappy
url = https://github.com/google/snappy.git
[submodule "repos/libvpx"]
path = repos/libvpx
url = https://github.com/webmproject/libvpx.git
[submodule "repos/fdk-aac"]
path = repos/fdk-aac
url = https://github.com/mstorsjo/fdk-aac.git
[submodule "repos/zimg"]
path = repos/zimg
url = https://github.com/sekrit-twc/zimg.git
[submodule "repos/x264"]
path = repos/x264
url = https://code.videolan.org/videolan/x264.git
[submodule "repos/opus"]
path = repos/opus
url = https://github.com/xiph/opus.git
[submodule "repos/x265"]
path = repos/x265
url = https://github.com/videolan/x265.git
[submodule "repos/ffmpeg"]
path = repos/ffmpeg
url = https://github.com/FFmpeg/FFmpeg.git
branch = release/5.0
[submodule "repos/oneVPL"]
path = repos/oneVPL
url = https://github.com/oneapi-src/oneVPL.git

View File

@ -1,71 +1,103 @@
From 3429a813b77a7658d2ee59be7c9228e306d86d14 Mon Sep 17 00:00:00 2001
From: sherpya <sherpya@netfarm.it>
Date: Sun, 4 Dec 2016 01:28:51 +0100
Subject: [PATCH 1/6] dynamic loading of shared fdk-aac library
---
configure | 6 ++--
libavcodec/libfdk-aacdec.c | 73 ++++++++++++++++++++++++++++++++++++++++++++--
libavcodec/libfdk-aacenc.c | 59 +++++++++++++++++++++++++++++++++++--
3 files changed, 129 insertions(+), 9 deletions(-)
diff --git a/configure b/configure diff --git a/configure b/configure
index 0b01a221c7..9dae091033 100755 index 7a62f0c248..73078ffa60 100755
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -1563,7 +1563,6 @@ EXTERNAL_LIBRARY_GPL_LIST=" @@ -1783,7 +1783,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
EXTERNAL_LIBRARY_NONFREE_LIST=" EXTERNAL_LIBRARY_NONFREE_LIST="
decklink decklink
libndi_newtek
- libfdk_aac - libfdk_aac
openssl
libtls libtls
" "
@@ -1597,6 +1596,7 @@ EXTERNAL_LIBRARY_LIST="
libcaca @@ -1880,6 +1879,7 @@ EXTERNAL_LIBRARY_LIST="
libcelt openssl
libdc1394 pocketsphinx
vapoursynth
+ libfdk_aac + libfdk_aac
libdrm "
libflite
libfontconfig HWACCEL_AUTODETECT_LIBRARY_LIST="
@@ -5841,9 +5841,7 @@ enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 && @@ -6532,9 +6532,7 @@ enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.5.0" "dav1d
enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
-enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen || -enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
- { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac && - { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
- warn "using libfdk without pkg-config"; } } - warn "using libfdk without pkg-config"; } }
+enabled libfdk_aac && { check_header fdk-aac/aacenc_lib.h || die "ERROR: aacenc_lib.h not found"; } +enabled libfdk_aac && require_headers fdk-aac/aacenc_lib.h
flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite" flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs
enabled fontconfig && enable libfontconfig enabled fontconfig && enable libfontconfig
diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c diff --git a/libavcodec/libfdk-aac_internal.h b/libavcodec/libfdk-aac_internal.h
index 677b11088b..d191133ae0 100644 new file mode 100644
--- a/libavcodec/libfdk-aacdec.c index 0000000000..cd1e6e3340
+++ b/libavcodec/libfdk-aacdec.c --- /dev/null
@@ -17,6 +17,17 @@ +++ b/libavcodec/libfdk-aac_internal.h
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @@ -0,0 +1,84 @@
*/ +/*
+ * Copyright (c) 2018 Gianluigi Tiesi
+#ifndef _WIN32 + *
+#include <dlfcn.h> + * This file is part of FFmpeg.
+#define LIBNAME "libfdk-aac.so.1" + *
+#else + * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_LIBFDK_AAC_INTERNAL_H
+#define AVCODEC_LIBFDK_AAC_INTERNAL_H
+
+#ifdef _WIN32
+#include <windows.h> +#include <windows.h>
+#define LIBNAME "libfdk-aac-1.dll" +#define LIBNAME "libfdk-aac-2.dll"
+#define dlopen(fname, f) ((void *) LoadLibraryA(fname)) +#define dlopen(fname, f) ((void *) LoadLibraryA(fname))
+#define dlclose(handle) FreeLibrary((HMODULE) handle) +#define dlclose(handle) FreeLibrary((HMODULE) handle)
+#define dlsym(handle, name) GetProcAddress((HMODULE) handle, name) +#define dlsym(handle, name) GetProcAddress((HMODULE) handle, name)
+#else
+#include <dlfcn.h>
+#define LIBNAME "libfdk-aac.so.2"
+#endif +#endif
+ +
#include <fdk-aac/aacdecoder_lib.h> +#define DLSYM(x) \
+ do \
#include "libavutil/channel_layout.h" + { \
@@ -25,6 +36,37 @@ + s->pfn.x = ( imp_##x ) dlsym(s->hLib, AV_STRINGIFY(x)); \
#include "avcodec.h" + if (!s->pfn.x ) \
#include "internal.h" + { \
+ av_log(avctx, AV_LOG_ERROR, "Unable to find symbol " AV_STRINGIFY(x) " in dynamic " LIBNAME "\n"); \
+ return -1; \
+ } \
+ } while (0)
+
+
+#include <fdk-aac/aacenc_lib.h>
+#include <fdk-aac/aacdecoder_lib.h>
+
+typedef AACENC_ERROR (*imp_aacEncOpen)(HANDLE_AACENCODER *phAacEncoder, const UINT encModules, const UINT maxChannels);
+typedef AACENC_ERROR (*imp_aacEncClose)(HANDLE_AACENCODER *phAacEncoder);
+typedef AACENC_ERROR (*imp_aacEncEncode)(const HANDLE_AACENCODER hAacEncoder, const AACENC_BufDesc *inBufDesc, const AACENC_BufDesc *outBufDesc, const AACENC_InArgs *inargs, AACENC_OutArgs *outargs);
+typedef AACENC_ERROR (*imp_aacEncInfo)(const HANDLE_AACENCODER hAacEncoder, AACENC_InfoStruct *pInfo);
+typedef AACENC_ERROR (*imp_aacEncoder_SetParam)(const HANDLE_AACENCODER hAacEncoder, const AACENC_PARAM param, const UINT value);
+
+typedef struct _aacEncLib {
+ imp_aacEncOpen aacEncOpen;
+ imp_aacEncClose aacEncClose;
+ imp_aacEncEncode aacEncEncode;
+ imp_aacEncInfo aacEncInfo;
+ imp_aacEncoder_SetParam aacEncoder_SetParam;
+} aacEncLib;
+
+typedef LINKSPEC_H HANDLE_AACDECODER (*imp_aacDecoder_Open)(TRANSPORT_TYPE transportFmt, UINT nrOfLayers); +typedef LINKSPEC_H HANDLE_AACDECODER (*imp_aacDecoder_Open)(TRANSPORT_TYPE transportFmt, UINT nrOfLayers);
+typedef LINKSPEC_H void (*imp_aacDecoder_Close)(HANDLE_AACDECODER self); +typedef LINKSPEC_H void (*imp_aacDecoder_Close)(HANDLE_AACDECODER self);
+typedef LINKSPEC_H AAC_DECODER_ERROR (*imp_aacDecoder_Fill)(HANDLE_AACDECODER self, UCHAR *pBuffer[], const UINT bufferSize[], UINT *bytesValid); +typedef LINKSPEC_H AAC_DECODER_ERROR (*imp_aacDecoder_Fill)(HANDLE_AACDECODER self, UCHAR *pBuffer[], const UINT bufferSize[], UINT *bytesValid);
@ -86,21 +118,20 @@ index 677b11088b..d191133ae0 100644
+ imp_aacDecoder_AncDataInit aacDecoder_AncDataInit; + imp_aacDecoder_AncDataInit aacDecoder_AncDataInit;
+} aacDecLib; +} aacDecLib;
+ +
+#define DLSYM(x) \ +#endif /* AVCODEC_LIBFDK_AAC_INTERNAL_H */
+ do \ diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
+ { \ index ffa1fdcce3..b3ee1248ed 100644
+ s->pfn.x = ( imp_##x ) dlsym(s->hLib, AV_STRINGIFY(x)); \ --- a/libavcodec/libfdk-aacdec.c
+ if (!s->pfn.x ) \ +++ b/libavcodec/libfdk-aacdec.c
+ { \ @@ -24,6 +24,7 @@
+ av_log(avctx, AV_LOG_ERROR, "Unable to find symbol " AV_STRINGIFY(x) " in dynamic " LIBNAME "\n"); \ #include "libavutil/opt.h"
+ return -1; \ #include "avcodec.h"
+ } \ #include "internal.h"
+ } while (0) +#include "libfdk-aac_internal.h"
+
/* The version macro is introduced the same time as the setting enum was #ifdef AACDECODER_LIB_VL0
* changed, so this check should suffice. */ #define FDKDEC_VER_AT_LEAST(vl0, vl1) \
#ifndef AACDECODER_LIB_VL0 @@ -47,6 +48,8 @@ enum ConcealMethod {
@@ -41,6 +83,8 @@ enum ConcealMethod {
typedef struct FDKAACDecContext { typedef struct FDKAACDecContext {
const AVClass *class; const AVClass *class;
HANDLE_AACDECODER handle; HANDLE_AACDECODER handle;
@ -109,7 +140,7 @@ index 677b11088b..d191133ae0 100644
uint8_t *decoder_buffer; uint8_t *decoder_buffer;
int decoder_buffer_size; int decoder_buffer_size;
uint8_t *anc_buffer; uint8_t *anc_buffer;
@@ -88,7 +132,7 @@ static const AVClass fdk_aac_dec_class = { @@ -101,7 +104,7 @@ static const AVClass fdk_aac_dec_class = {
static int get_stream_info(AVCodecContext *avctx) static int get_stream_info(AVCodecContext *avctx)
{ {
FDKAACDecContext *s = avctx->priv_data; FDKAACDecContext *s = avctx->priv_data;
@ -118,7 +149,7 @@ index 677b11088b..d191133ae0 100644
int channel_counts[0x24] = { 0 }; int channel_counts[0x24] = { 0 };
int i, ch_error = 0; int i, ch_error = 0;
uint64_t ch_layout = 0; uint64_t ch_layout = 0;
@@ -200,8 +244,10 @@ static av_cold int fdk_aac_decode_close(AVCodecContext *avctx) @@ -216,8 +219,10 @@ static av_cold int fdk_aac_decode_close(AVCodecContext *avctx)
{ {
FDKAACDecContext *s = avctx->priv_data; FDKAACDecContext *s = avctx->priv_data;
@ -131,7 +162,7 @@ index 677b11088b..d191133ae0 100644
av_freep(&s->decoder_buffer); av_freep(&s->decoder_buffer);
av_freep(&s->anc_buffer); av_freep(&s->anc_buffer);
@@ -213,6 +259,27 @@ static av_cold int fdk_aac_decode_init(AVCodecContext *avctx) @@ -229,6 +234,27 @@ static av_cold int fdk_aac_decode_init(AVCodecContext *avctx)
FDKAACDecContext *s = avctx->priv_data; FDKAACDecContext *s = avctx->priv_data;
AAC_DECODER_ERROR err; AAC_DECODER_ERROR err;
@ -160,60 +191,18 @@ index 677b11088b..d191133ae0 100644
if (!s->handle) { if (!s->handle) {
av_log(avctx, AV_LOG_ERROR, "Error opening decoder\n"); av_log(avctx, AV_LOG_ERROR, "Error opening decoder\n");
diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index d47137b227..6295af3858 100644 index 7ee2f13ac7..2a91d02c7f 100644
--- a/libavcodec/libfdk-aacenc.c --- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c +++ b/libavcodec/libfdk-aacenc.c
@@ -17,6 +17,17 @@ @@ -26,6 +26,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifndef _WIN32
+#include <dlfcn.h>
+#define LIBNAME "libfdk-aac.so.1"
+#else
+#include <windows.h>
+#define LIBNAME "libfdk-aac-1.dll"
+#define dlopen(fname, f) ((void *) LoadLibraryA(fname))
+#define dlclose(handle) FreeLibrary((HMODULE) handle)
+#define dlsym(handle, name) GetProcAddress((HMODULE) handle, name)
+#endif
+
#include <fdk-aac/aacenc_lib.h>
#include "libavutil/channel_layout.h"
@@ -26,6 +37,31 @@
#include "audio_frame_queue.h" #include "audio_frame_queue.h"
#include "encode.h"
#include "internal.h" #include "internal.h"
+#include "libfdk-aac_internal.h"
#include "profiles.h"
+typedef AACENC_ERROR (*imp_aacEncOpen)(HANDLE_AACENCODER *phAacEncoder, const UINT encModules, const UINT maxChannels); #ifdef AACENCODER_LIB_VL0
+typedef AACENC_ERROR (*imp_aacEncClose)(HANDLE_AACENCODER *phAacEncoder); @@ -47,6 +48,8 @@ typedef struct AACContext {
+typedef AACENC_ERROR (*imp_aacEncEncode)(const HANDLE_AACENCODER hAacEncoder, const AACENC_BufDesc *inBufDesc, const AACENC_BufDesc *outBufDesc, const AACENC_InArgs *inargs, AACENC_OutArgs *outargs);
+typedef AACENC_ERROR (*imp_aacEncInfo)(const HANDLE_AACENCODER hAacEncoder, AACENC_InfoStruct *pInfo);
+typedef AACENC_ERROR (*imp_aacEncoder_SetParam)(const HANDLE_AACENCODER hAacEncoder, const AACENC_PARAM param, const UINT value);
+
+typedef struct _aacEncLib {
+ imp_aacEncOpen aacEncOpen;
+ imp_aacEncClose aacEncClose;
+ imp_aacEncEncode aacEncEncode;
+ imp_aacEncInfo aacEncInfo;
+ imp_aacEncoder_SetParam aacEncoder_SetParam;
+} aacEncLib;
+
+#define DLSYM(x) \
+ do \
+ { \
+ s->pfn.x = ( imp_##x ) dlsym(s->hLib, AV_STRINGIFY(x)); \
+ if (!s->pfn.x ) \
+ { \
+ av_log(avctx, AV_LOG_ERROR, "Unable to find symbol " AV_STRINGIFY(x) " in dynamic " LIBNAME "\n"); \
+ return -1; \
+ } \
+ } while (0)
+
typedef struct AACContext {
const AVClass *class;
HANDLE_AACENCODER handle;
@@ -36,6 +72,8 @@ typedef struct AACContext {
int header_period; int header_period;
int vbr; int vbr;
@ -222,7 +211,7 @@ index d47137b227..6295af3858 100644
AudioFrameQueue afq; AudioFrameQueue afq;
} AACContext; } AACContext;
@@ -96,8 +134,10 @@ static int aac_encode_close(AVCodecContext *avctx) @@ -111,8 +114,10 @@ static int aac_encode_close(AVCodecContext *avctx)
{ {
AACContext *s = avctx->priv_data; AACContext *s = avctx->priv_data;
@ -232,10 +221,10 @@ index d47137b227..6295af3858 100644
+ s->pfn.aacEncClose(&s->handle); + s->pfn.aacEncClose(&s->handle);
+ dlclose(s->hLib); + dlclose(s->hLib);
+ } + }
av_freep(&avctx->extradata);
ff_af_queue_close(&s->afq); ff_af_queue_close(&s->afq);
@@ -114,6 +154,21 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) return 0;
@@ -128,6 +133,21 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
int aot = FF_PROFILE_AAC_LOW + 1; int aot = FF_PROFILE_AAC_LOW + 1;
int sce = 0, cpe = 0; int sce = 0, cpe = 0;
@ -257,5 +246,3 @@ index d47137b227..6295af3858 100644
if ((err = aacEncOpen(&s->handle, 0, avctx->channels)) != AACENC_OK) { if ((err = aacEncOpen(&s->handle, 0, avctx->channels)) != AACENC_OK) {
av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n", av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n",
aac_get_error(err)); aac_get_error(err));
--
2.15.1

View File

@ -1,23 +1,3 @@
# voukoder-ffmpeg-buildscript # voukoder-ffmpeg
Builds static libraries of ffmeg and external libraries (x264 8bit, x265 8,10 and 12bit) to be used in the voukoder project. Provides a FFmpeg static libs to be used with Voukoder. They are being built using a GitHub action worflow.
## Install msys2
- Get the 64bit version of msys2 from msys2.org
- Install it
## Start msys2
- Open a command prompt
- Run "vcvarsall.bat amd64" in "c:\program files (x86)\microsoft visual studio\2017\community\VC\Auxiliary\Build"
- Run msys2 with "msys2_shell.cmd -mingw64 -full-path"
## Install development tools
- Install CMakeGui in Windows to have the VisualStudio templates ready
- Install "pacman -S base-devel binutils git make pkg-config" in msys2
- Install nasm to /usr/bin/nasm.exe
- Install cmake gui
- Add cmake path to path variable
## Starting the build
- Have the build.sh file at i.e. "/home/daniel/ffmpeg/build.sh"
- Start the build by either "./build.sh debug" or "./build.sh release"

218
build.sh
View File

@ -14,110 +14,106 @@ else
fi fi
function build { function build {
cd $SRC/$1 cd $repos/$1
if [ -f autogen.sh ]; then #if [ -f autogen.sh ]; then
./autogen.sh # ./autogen.sh
fi #fi
CC=cl CXXFLAGS=$CFLAGS ./configure --prefix=$BUILD $2 autoreconf -i
CC=cl CXX=cl CXXFLAGS=$CFLAGS ./configure --prefix=$BUILD $2
make -j $NUMBER_OF_PROCESSORS make -j $NUMBER_OF_PROCESSORS
make install make install
} }
function build_nvenc { function build_nvenc {
git clone git://github.com/FFmpeg/nv-codec-headers.git $SRC/ffnvcodec echo "################################################################################"
# git checkout sdk/9.0 echo "## NVENC ##"
cd $SRC/ffnvcodec echo "################################################################################"
cd $repos/ffnvcodec
make PREFIX=$BUILD install make PREFIX=$BUILD install
add_comp nvenc add_comp nvenc
} }
function build_amf { function build_amf {
git clone git://github.com/GPUOpen-LibrariesAndSDKs/AMF.git $SRC/amf echo "################################################################################"
cp -a $SRC/amf/amf/public/include $BUILD/include/AMF echo "## AMF ##"
echo "################################################################################"
cp -a $repos/amf/amf/public/include $BUILD/include/AMF
add_comp amf add_comp amf
} }
function build_mfx { function build_mfx {
git clone https://github.com/lu-zero/mfx_dispatch.git $SRC/libmfx echo "################################################################################"
cd $SRC/libmfx echo "## LIBMFX ##"
#git checkout c200d833e25a91e3e49d69890dac1ffa3486cbe9 echo "################################################################################"
if [[ ! -f "configure" ]]; then cp -r "C:\Program Files (x86)\IntelSWTools\Intel(R) Media SDK 2021 R1\Software Development Kit\include" $BUILD/include/mfx
autoreconf -fiv || exit 1 cp "C:\Program Files (x86)\IntelSWTools\Intel(R) Media SDK 2021 R1\Software Development Kit\lib\x64\libmfx_vs2015.lib" $BUILD/lib/libmfx.lib
fi printf "prefix=$BUILD\nexec_prefix=\${prefix}\nincludedir=\${prefix}/include\nlibdir=\${exec_prefix}/lib\nName: libmfx\nDescription: Intel Media SDK Dispatched static library\nVersion: 1.34\nLibs: -L\${libdir} -llibmfx -ladvapi32 -lole32 -luuid\nCflags: -I\${includedir}\n" > $BUILD/lib/pkgconfig/libmfx.pc
build libmfx
sed -i 's/-lstdc++/-ladvapi32/g' $BUILD/lib/pkgconfig/libmfx.pc #git clone -q https://github.com/lu-zero/mfx_dispatch.git $SRC/libmfx
#cd $SRC/libmfx
#if [[ ! -f "configure" ]]; then
# autoreconf -fiv || exit 1
#fi
#build libmfx
#sed -i 's/-lstdc++/-ladvapi32/g' $BUILD/lib/pkgconfig/libmfx.pc
add_comp libmfx add_comp libmfx
} }
function build_aom {
git clone https://aomedia.googlesource.com/aom $SRC/libaom
cd $SRC/libaom
rm -rf work
mkdir work
cd work
cmake -G "Visual Studio 15 2017" .. -A x64 -DENABLE_{DOCS,TOOLS,TESTS}=off -DAOM_TARGET_CPU=x86_64 -DCMAKE_INSTALL_PREFIX=$BUILD
MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" AOM.sln
cp $MSBUILD_CONFIG/aom.lib $BUILD/lib/aom.lib
cp -r ../aom $BUILD/include/aom
cmake -DAOM_CONFIG_DIR=. -DAOM_ROOT=.. -DCMAKE_INSTALL_PREFIX=@prefix@ -DCMAKE_PROJECT_NAME=aom -DCONFIG_MULTITHREAD=true -DHAVE_PTHREAD_H=false -P "../build/cmake/pkg_config.cmake"
sed -i "s#@prefix@#$BUILD#g" aom.pc
sed -i '/^Libs\.private.*/d' aom.pc
sed -i 's/-lm//' aom.pc
cp aom.pc $BUILD/lib/pkgconfig/aom.pc
add_comp libaom
}
function build_svt { function build_svt {
echo "################################################################################"
echo "## LIBSVTAV1 ##"
echo "################################################################################"
# HEVC # HEVC
#git clone https://github.com/OpenVisualCloud/SVT-HEVC.git $SRC/svt-hevc #git clone -q https://github.com/OpenVisualCloud/SVT-HEVC.git $SRC/svt-hevc
#cd $SRC/svt-hevc/Build #cd $SRC/svt-hevc/Build/windows
#cmake .. -G"Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=$BUILD -DCMAKE_CONFIGURATION_TYPES=$MSBUILD_CONFIG #cmake .. -G"Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=$BUILD -DCMAKE_CONFIGURATION_TYPES=$MSBUILD_CONFIG
#MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration=$MSBUILD_CONFIG /property:ConfigurationType=StaticLibrary /property:TargetExt=.lib svt-hevc.sln #MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration=$MSBUILD_CONFIG /property:ConfigurationType=StaticLibrary /property:TargetExt=.lib svt-hevc.sln
#cp -r ../Source/API $BUILD/include/svt-hevc ; cp ../Bin/$MSBUILD_CONFIG/SvtHevcEnc.lib $BUILD/lib/ ; cp SvtHevcEnc.pc $BUILD/lib/pkgconfig/ #cp -r ../Source/API $BUILD/include/svt-hevc ; cp ../Bin/$MSBUILD_CONFIG/SvtHevcEnc.lib $BUILD/lib/ ; cp SvtHevcEnc.pc $BUILD/lib/pkgconfig/
#add_comp libsvthevc #add_comp libsvthevc
# #
# AV1 (patch needed for FFmpeg 4.3) # AV1
git clone --depth 1 --branch v0.8.4 https://github.com/OpenVisualCloud/SVT-AV1.git $SRC/svt-av1 #git clone -q --depth 1 https://github.com/AOMediaCodec/SVT-AV1 $SRC/svt-av1
cd $SRC/svt-av1/Build cd $repos/svt-av1/Build/windows
cmake .. -G"Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=$BUILD -DCMAKE_CONFIGURATION_TYPES=$MSBUILD_CONFIG ./build.bat 2017 $MODE static
MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration=$MSBUILD_CONFIG /property:ConfigurationType=StaticLibrary /property:TargetExt=.lib Source/Lib/Encoder/SvtAv1Enc.vcxproj cp -r ../../Source/API $BUILD/include/svt-av1 ; cp ../../Bin/$MSBUILD_CONFIG/SvtAv1Enc.lib $BUILD/lib/ ; cp SvtAv1Enc.pc $BUILD/lib/pkgconfig/
cp -r ../Source/API $BUILD/include/svt-av1 ; cp ../Bin/$MSBUILD_CONFIG/SvtAv1Enc.lib $BUILD/lib/ ; cp SvtAv1Enc.pc $BUILD/lib/pkgconfig/
add_comp libsvtav1 add_comp libsvtav1
cd ../../../..
# #
# VP9 # VP9
#git clone https://github.com/OpenVisualCloud/SVT-VP9.git $SRC/svt-vp9 #git clone -q https://github.com/OpenVisualCloud/SVT-VP9.git $SRC/svt-vp9
#cd $SRC/svt-vp9/Build #cd $SRC/svt-vp9/Build/windows
#cmake .. -G"Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=$BUILD -DCMAKE_CONFIGURATION_TYPES=$MSBUILD_CONFIG #cmake .. -G"Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=$BUILD -DCMAKE_CONFIGURATION_TYPES=$MSBUILD_CONFIG
#MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration=$MSBUILD_CONFIG /property:ConfigurationType=StaticLibrary /property:TargetExt=".lib" svt-vp9.sln #MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration=$MSBUILD_CONFIG /property:ConfigurationType=StaticLibrary /property:TargetExt=".lib" svt-vp9.sln
#cp -r ../Source/API $BUILD/include/svt-vp9 ; cp ../Bin/$MSBUILD_CONFIG/SvtVp9Enc.lib $BUILD/lib/ ; cp SvtVp9Enc.pc $BUILD/lib/pkgconfig/ #cp -r ../Source/API $BUILD/include/svt-vp9 ; cp ../Bin/$MSBUILD_CONFIG/SvtVp9Enc.lib $BUILD/lib/ ; cp SvtVp9Enc.pc $BUILD/lib/pkgconfig/
#sed -i 's/ -lpthread//g' $BUILD/lib/pkgconfig/SvtVp9Enc.pc #sed -i 's/ -lpthread//g' $BUILD/lib/pkgconfig/SvtVp9Enc.pc
#sed -i 's/ -lm//g' $BUILD/lib/pkgconfig/SvtVp9Enc.pc #sed -i 's/ -lm//g' $BUILD/lib/pkgconfig/SvtVp9Enc.pc
#add_comp libsvtvp9 #add_comp libsvtvp9
cd $SRC/ffmpeg
#git apply $SRC/svt-hevc/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch
#git apply $SRC/svt-av1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch
#git apply $SRC/svt-vp9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9-with-hevc-av1.patch
#git am $SRC/svt-hevc/ffmpeg_plugin/0001*.patch
git apply $SRC/svt-av1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch
} }
function build_ogg { function build_ogg {
git clone https://github.com/xiph/ogg.git $SRC/libogg echo "################################################################################"
cd $SRC/libogg echo "## LIBOGG ##"
echo "################################################################################"
cd $repos/libogg
build libogg "--disable-shared" build libogg "--disable-shared"
} }
function build_vorbis { function build_vorbis {
git clone https://github.com/xiph/vorbis.git $SRC/libvorbis echo "################################################################################"
cd $SRC/libvorbis echo "## LIBVORBIS ##"
echo "################################################################################"
cd $repos/libvorbis
build libvorbis "--disable-shared" build libvorbis "--disable-shared"
sed -i '/^Libs\.private.*/d' $BUILD/lib/pkgconfig/vorbis.pc # don't need m.lib on windows sed -i '/^Libs\.private.*/d' $BUILD/lib/pkgconfig/vorbis.pc # don't need m.lib on windows
add_comp libvorbis add_comp libvorbis
} }
function build_snappy { function build_snappy {
git clone https://github.com/google/snappy.git $SRC/snappy echo "################################################################################"
cd $SRC/snappy echo "## LIBSNAPPY ##"
echo "################################################################################"
#git clone -q -b 1.1.8 https://github.com/google/snappy.git $SRC/snappy
cd $repos/snappy
rm -rf work rm -rf work
mkdir work mkdir work
cd work cd work
@ -129,8 +125,10 @@ function build_snappy {
} }
function build_libvpx { function build_libvpx {
git clone https://github.com/webmproject/libvpx.git $SRC/libvpx echo "################################################################################"
cd $SRC/libvpx echo "## LIBVPX ##"
echo "################################################################################"
cd $repos/libvpx
./configure --prefix=$BUILD --target=x86_64-win64-vs15 --enable-vp9-highbitdepth --disable-shared --disable-examples --disable-tools --disable-docs --disable-libyuv --disable-unit_tests --disable-postproc ./configure --prefix=$BUILD --target=x86_64-win64-vs15 --enable-vp9-highbitdepth --disable-shared --disable-examples --disable-tools --disable-docs --disable-libyuv --disable-unit_tests --disable-postproc
make -j $NUMBER_OF_PROCESSORS make -j $NUMBER_OF_PROCESSORS
make install make install
@ -140,40 +138,49 @@ function build_libvpx {
} }
function build_libfdkaac { function build_libfdkaac {
git clone git://github.com/mstorsjo/fdk-aac.git $SRC/fdk-aac echo "################################################################################"
cd $SRC/fdk-aac echo "## LIBFDK_AAC ##"
echo "################################################################################"
cd $repos/fdk-aac
build fdk-aac "--disable-static --disable-shared" build fdk-aac "--disable-static --disable-shared"
add_comp libfdk-aac add_comp libfdk-aac
cd $SRC/ffmpeg cd $repos/ffmpeg
patch -N -p1 -i ../../patches/0001-dynamic-loading-of-shared-fdk-aac-library.patch patch -N -p1 -i ../../patches/0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch
} }
function build_lame { function build_lame {
svn co svn://svn.code.sf.net/p/lame/svn/trunk/lame $SRC/lame echo "################################################################################"
cd $SRC/lame echo "## LIBLAME ##"
echo "################################################################################"
svn co svn://svn.code.sf.net/p/lame/svn/trunk/lame@6474 $repos/lame
cd $repos/lame
build lame "--enable-nasm --disable-frontend --disable-shared --enable-static" build lame "--enable-nasm --disable-frontend --disable-shared --enable-static"
add_comp libmp3lame add_comp libmp3lame
} }
function build_zimg { function build_zimg {
git clone https://github.com/sekrit-twc/zimg.git $SRC/zimg echo "################################################################################"
cd $SRC/zimg echo "## ZIMG ##"
git checkout release-2.9.2 echo "################################################################################"
cd $repos/zimg
./autogen.sh ./autogen.sh
./configure --prefix=$BUILD ./configure --prefix=$BUILD
cd _msvc/zimg cd _msvc/zimg
MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" /property:ConfigurationType=StaticLibrary /property:WindowsTargetPlatformVersion=10.0.17134.0 /property:PlatformToolset=v141 /property:Platform=x64 /property:WholeProgramOptimization=false zimg.vcxproj MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" /property:ConfigurationType=StaticLibrary /property:WindowsTargetPlatformVersion=10.0.17134.0 /property:PlatformToolset=v141 /property:Platform=x64 /property:WholeProgramOptimization=false zimg.vcxproj
cp x64/$MSBUILD_CONFIG/z.lib $BUILD/lib/zimg.lib cp x64/$MSBUILD_CONFIG/z.lib $BUILD/lib/zimg.lib
cd ../.. cd ../..
cp $SRC/zimg/src/zimg/api/zimg.h $BUILD/include/zimg.h cp $repos/zimg/src/zimg/api/zimg.h $BUILD/include/zimg.h
cp zimg.pc $BUILD/lib/pkgconfig/zimg.pc cp zimg.pc $BUILD/lib/pkgconfig/zimg.pc
add_comp libzimg add_comp libzimg
} }
function build_x264 { function build_x264 {
git clone https://code.videolan.org/videolan/x264.git $SRC/x264 echo "################################################################################"
cd $SRC/x264 echo "## LIBX264 ##"
git checkout b5bc5d69c580429ff716bafcd43655e855c31b02 echo "################################################################################"
cd $repos/x264
sed -i 's/#define X264_API_IMPORTS 1/\/\/#define X264_API_IMPORTS 1/g' ../ffmpeg/libavcodec/libx264.c
#git checkout b5bc5d69c580429ff716bafcd43655e855c31b02
#f9af2a0f71d0fca7c1cafa7657f03a302da0ca1c #f9af2a0f71d0fca7c1cafa7657f03a302da0ca1c
CC=cl ./configure --prefix=$BUILD --disable-cli --enable-static --enable-pic --libdir=$BUILD/lib CC=cl ./configure --prefix=$BUILD --disable-cli --enable-static --enable-pic --libdir=$BUILD/lib
make -j $NUMBER_OF_PROCESSORS make -j $NUMBER_OF_PROCESSORS
@ -182,16 +189,18 @@ function build_x264 {
} }
function build_opus { function build_opus {
git clone https://github.com/xiph/opus.git $SRC/opus echo "################################################################################"
cd $SRC/opus/win32/VS2015 echo "## LIBOPUS ##"
echo "################################################################################"
cd $repos/opus/win32/VS2015
echo \nConverting project file ... echo \nConverting project file ...
sed -i 's/v140/v141/g' opus.vcxproj sed -i 's/v140/v141/g' opus.vcxproj
echo Building project 'opus' ... echo Building project 'opus' ...
MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" /property:Platform=x64 opus.vcxproj MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" /property:Platform=x64 opus.vcxproj
echo Done. echo Done.
cp x64/$MSBUILD_CONFIG/opus.lib $BUILD/lib/opus.lib cp x64/$MSBUILD_CONFIG/opus.lib $BUILD/lib/opus.lib
cp -r $SRC/opus/include $BUILD/include/opus cp -r $repos/opus/include $BUILD/include/opus
cp $SRC/opus/opus.pc.in $BUILD/lib/pkgconfig/opus.pc cp $repos/opus/opus.pc.in $BUILD/lib/pkgconfig/opus.pc
sed -i "s#@prefix@#$BUILD#g" $BUILD/lib/pkgconfig/opus.pc sed -i "s#@prefix@#$BUILD#g" $BUILD/lib/pkgconfig/opus.pc
sed -i "s/@exec_prefix@/\$\{prefix\}/g" $BUILD/lib/pkgconfig/opus.pc sed -i "s/@exec_prefix@/\$\{prefix\}/g" $BUILD/lib/pkgconfig/opus.pc
sed -i "s/@libdir@/\$\{prefix\}\/lib/g" $BUILD/lib/pkgconfig/opus.pc sed -i "s/@libdir@/\$\{prefix\}\/lib/g" $BUILD/lib/pkgconfig/opus.pc
@ -202,21 +211,26 @@ function build_opus {
} }
function build_x265 { function build_x265 {
git clone https://github.com/videolan/x265.git --branch stable $SRC/x265 echo "################################################################################"
cd $SRC/x265/build/vc15-x86_64 echo "## LIBX265 ##"
echo "################################################################################"
cd $repos/x265/build/vc15-x86_64
rm -rf work* rm -rf work*
mkdir work work10 work12 mkdir work work10 work12
# 12bit # 12bit
cd work12 cd work12
echo "## 12 BIT"
cmake -G "Visual Studio 15 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON cmake -G "Visual Studio 15 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" x265-static.vcxproj MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" x265-static.vcxproj
cp $MSBUILD_CONFIG/x265-static.lib ../work/x265_12bit.lib cp $MSBUILD_CONFIG/x265-static.lib ../work/x265_12bit.lib
# 10bit # 10bit
echo "## 10 BIT"
cd ../work10 cd ../work10
cmake -G "Visual Studio 15 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF cmake -G "Visual Studio 15 Win64" ../../../source -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" x265-static.vcxproj MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" x265-static.vcxproj
cp $MSBUILD_CONFIG/x265-static.lib ../work/x265_10bit.lib cp $MSBUILD_CONFIG/x265-static.lib ../work/x265_10bit.lib
# 8bit - main # 8bit - main
echo "## 8 BIT"
cd ../work cd ../work
cmake -G "Visual Studio 15 Win64" ../../../source -DCMAKE_INSTALL_PREFIX=$BUILD -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DEXTRA_LIB="x265_10bit.lib;x265_12bit.lib" -DLINKED_10BIT=ON -DLINKED_12BIT=ON cmake -G "Visual Studio 15 Win64" ../../../source -DCMAKE_INSTALL_PREFIX=$BUILD -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DEXTRA_LIB="x265_10bit.lib;x265_12bit.lib" -DLINKED_10BIT=ON -DLINKED_12BIT=ON
#-DSTATIC_LINK_CRT=ON #-DSTATIC_LINK_CRT=ON
@ -230,6 +244,8 @@ function build_x265 {
add_comp libx265 add_comp libx265
} }
export -f build_nvenc && export -f build_amf && export -f build_mfx && export -f build_svt && export -f build_ogg && export -f build_vorbis && export -f build_snappy && export -f build_libvpx && export -f build_libfdkaac && export -f build_lame && export -f build_zimg && export -f build_x264 && export -f build_x265
function add_comp { function add_comp {
COMPONENTS="$COMPONENTS --enable-$1" COMPONENTS="$COMPONENTS --enable-$1"
} }
@ -239,30 +255,34 @@ mkdir src build build/include build/lib build/lib/pkgconfig
BUILD=`realpath build` BUILD=`realpath build`
SRC=`realpath src` SRC=`realpath src`
repos=$(realpath repos)
git clone -b release/4.3 git://source.ffmpeg.org/ffmpeg.git $SRC/ffmpeg parallel -j3 ::: build_nvenc build_amf build_svt build_ogg
build_nvenc #build_nvenc
build_amf #build_amf
build_mfx #build_mfx
build_svt #build_svt
build_ogg #build_ogg
build_vorbis #build_opus
build_snappy #build_vorbis
build_libvpx #build_snappy
build_libfdkaac #build_libvpx
build_lame #build_libfdkaac
build_zimg #build_lame
build_x264 #build_zimg
build_opus #build_x264
build_x265 #build_x265
#build_aom
cd $SRC/ffmpeg echo "################################################################################"
echo "## FFMPEG ##"
echo "################################################################################"
cd $repos/ffmpeg
PKG_CONFIG_PATH=$BUILD/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --toolchain=msvc --extra-cflags="$CFLAGS -I$BUILD/include" --extra-ldflags="-LIBPATH:$BUILD/lib" --prefix=$BUILD --pkg-config-flags="--static" --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --disable-devices --disable-demuxers --disable-decoders --disable-network --enable-w32threads --enable-gpl $COMPONENTS PKG_CONFIG_PATH=$BUILD/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --toolchain=msvc --extra-cflags="$CFLAGS -I$BUILD/include" --extra-ldflags="-LIBPATH:$BUILD/lib" --prefix=$BUILD --pkg-config-flags="--static" --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --disable-devices --disable-demuxers --disable-decoders --disable-network --enable-w32threads --enable-gpl $COMPONENTS
sed -i 's/\x81/ue/g' config.h sed -i 's/\x81/ue/g' config.h
make -j $NUMBER_OF_PROCESSORS make -j $NUMBER_OF_PROCESSORS
make install make install
cd -
# rename *.a to *.lib # rename *.a to *.lib
cd $BUILD/lib cd $BUILD/lib
@ -271,12 +291,12 @@ for file in *.a; do
done done
# clean up # clean up
rm -rf $BUILD/lib/pkgconfig $BUILD/lib/fdk-aac.lib $BUILD/lib/*.la rm -rf $BUILD/lib/fdk-aac.lib $BUILD/lib/*.la
# Create archives # Create archives
cd $BUILD cd - ; cd $BUILD
mkdir ../dist 2>/dev/null mkdir ../dist 2>/dev/null
tar czf ../dist/ffmpeg-win64-static-$MODE.tar.gz * tar czf ../dist/ffmpeg-win64-static-$MODE.tar.gz *
cd $SRC/ffmpeg cd - ; cd repos/ffmpeg
tar czf ../../dist/ffmpeg-win64-static-src-$MODE.tar.gz * tar czf ../../dist/ffmpeg-win64-static-src-$MODE.tar.gz *

220
build2.sh Normal file
View File

@ -0,0 +1,220 @@
#!/bin/bash
COMPONENTS=""
if [ "$MODE" == "debug" ]; then
MSBUILD_CONFIG=Debug
CFLAGS=-MDd
elif [ "$MODE" == "release" ]; then
MSBUILD_CONFIG=Release
CFLAGS=-MD
else
echo "Please supply build mode [debug|release]!"
exit 1
fi
function build {
cd $SRC/$1
if [ -f autogen.sh ]; then
./autogen.sh
fi
CC=cl CXXFLAGS=$CFLAGS ./configure --prefix=$BUILD $2
make -j $NUMBER_OF_PROCESSORS
make install
}
function build_nvenc {
git clone -q -b sdk/11.0 https://github.com/FFmpeg/nv-codec-headers.git $SRC/ffnvcodec
cd $SRC/ffnvcodec
make PREFIX=$BUILD install
add_comp nvenc
}
function build_amf {
git clone -q https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git $SRC/amf
cp -a $SRC/amf/amf/public/include $BUILD/include/AMF
add_comp amf
}
function build_mfx {
cp -r "C:\Program Files (x86)\IntelSWTools\Intel(R) Media SDK 2021 R1\Software Development Kit\include" $BUILD/include/mfx
cp "C:\Program Files (x86)\IntelSWTools\Intel(R) Media SDK 2021 R1\Software Development Kit\lib\x64\libmfx_vs2015.lib" $BUILD/lib/libmfx.lib
printf "prefix=$BUILD\nexec_prefix=\${prefix}\nincludedir=\${prefix}/include\nlibdir=\${exec_prefix}/lib\nName: libmfx\nDescription: Intel Media SDK Dispatched static library\nVersion: 1.34\nLibs: -L\${libdir} -llibmfx -ladvapi32 -lole32 -luuid\nCflags: -I\${includedir}\n" > $BUILD/lib/pkgconfig/libmfx.pc
#git clone -q https://github.com/lu-zero/mfx_dispatch.git $SRC/libmfx
#cd $SRC/libmfx
#if [[ ! -f "configure" ]]; then
# autoreconf -fiv || exit 1
#fi
#build libmfx
#sed -i 's/-lstdc++/-ladvapi32/g' $BUILD/lib/pkgconfig/libmfx.pc
add_comp libmfx
}
function build_aom {
git clone -q -b v3.1.2 https://aomedia.googlesource.com/aom $SRC/libaom
cd $SRC/libaom
rm -rf work
mkdir work
cd work
cmake -G "Visual Studio 15 2017" .. -T host=x64 -A x64 -DCONFIG_AV1_DECODER=0 -DENABLE_{DOCS,TOOLS,TESTS,EXAMPLES}=OFF -DCMAKE_INSTALL_PREFIX=$BUILD
MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" AOM.sln
cp $MSBUILD_CONFIG/aom.lib $BUILD/lib/aom.lib
cp -r ../aom $BUILD/include/aom
printf "prefix=$BUILD\nexec_prefix=\${prefix}\nincludedir=\${prefix}/include\nlibdir=\${exec_prefix}/lib\nName: aom\nDescription: Alliance for Open Media AV1 codec library v3.1.2\nVersion: 3.1.2\nRequires:\nConflicts:\nLibs: -L\${libdir} -laom\nCflags: -I\${includedir}\n" > $BUILD/lib/pkgconfig/aom.pc
#cmake -DAOM_CONFIG_DIR=. -DAOM_ROOT=.. -DCMAKE_INSTALL_PREFIX=@prefix@ -DCMAKE_PROJECT_NAME=aom -DCONFIG_MULTITHREAD=true -DHAVE_PTHREAD_H=false -P "../build/cmake/pkg_config.cmake"
#sed -i "s#@prefix@#$BUILD#g" aom.pc
#sed -i '/^Libs\.private.*/d' aom.pc
#sed -i 's/-lm//' aom.pc
#cp aom.pc $BUILD/lib/pkgconfig/aom.pc
add_comp libaom
}
function build_svt {
# HEVC
#git clone -q https://github.com/OpenVisualCloud/SVT-HEVC.git $SRC/svt-hevc
#cd $SRC/svt-hevc/Build/windows
#cmake .. -G"Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=$BUILD -DCMAKE_CONFIGURATION_TYPES=$MSBUILD_CONFIG
#MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration=$MSBUILD_CONFIG /property:ConfigurationType=StaticLibrary /property:TargetExt=.lib svt-hevc.sln
#cp -r ../Source/API $BUILD/include/svt-hevc ; cp ../Bin/$MSBUILD_CONFIG/SvtHevcEnc.lib $BUILD/lib/ ; cp SvtHevcEnc.pc $BUILD/lib/pkgconfig/
#add_comp libsvthevc
#
# AV1
git clone -q --depth 1 https://github.com/AOMediaCodec/SVT-AV1 $SRC/svt-av1
cd $SRC/svt-av1/Build/windows
./build.bat 2017 $MODE static
cp -r ../../Source/API $BUILD/include/svt-av1 ; cp ../../Bin/$MSBUILD_CONFIG/SvtAv1Enc.lib $BUILD/lib/ ; cp SvtAv1Enc.pc $BUILD/lib/pkgconfig/
add_comp libsvtav1
#
# VP9
#git clone -q https://github.com/OpenVisualCloud/SVT-VP9.git $SRC/svt-vp9
#cd $SRC/svt-vp9/Build/windows
#cmake .. -G"Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=$BUILD -DCMAKE_CONFIGURATION_TYPES=$MSBUILD_CONFIG
#MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration=$MSBUILD_CONFIG /property:ConfigurationType=StaticLibrary /property:TargetExt=".lib" svt-vp9.sln
#cp -r ../Source/API $BUILD/include/svt-vp9 ; cp ../Bin/$MSBUILD_CONFIG/SvtVp9Enc.lib $BUILD/lib/ ; cp SvtVp9Enc.pc $BUILD/lib/pkgconfig/
#sed -i 's/ -lpthread//g' $BUILD/lib/pkgconfig/SvtVp9Enc.pc
#sed -i 's/ -lm//g' $BUILD/lib/pkgconfig/SvtVp9Enc.pc
#add_comp libsvtvp9
}
function build_ogg {
git clone -q https://github.com/xiph/ogg.git $SRC/libogg
cd $SRC/libogg
build libogg "--disable-shared"
}
function build_vorbis {
git clone -q https://github.com/xiph/vorbis.git $SRC/libvorbis
cd $SRC/libvorbis
build libvorbis "--disable-shared"
sed -i '/^Libs\.private.*/d' $BUILD/lib/pkgconfig/vorbis.pc # don't need m.lib on windows
add_comp libvorbis
}
function build_snappy {
git clone -q -b 1.1.8 https://github.com/google/snappy.git $SRC/snappy
cd $SRC/snappy
rm -rf work
mkdir work
cd work
cmake -G "Visual Studio 15 Win64" .. -DCMAKE_INSTALL_PREFIX=$BUILD -DBUILD_SHARED_LIBS=OFF -DSNAPPY_BUILD_TESTS=OFF
MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" Snappy.sln
cp $MSBUILD_CONFIG/snappy.lib $BUILD/lib/snappy.lib
cp ../snappy.h ../snappy-c.h $BUILD/include/
add_comp libsnappy
}
function build_libvpx {
git clone -q https://github.com/webmproject/libvpx.git $SRC/libvpx
cd $SRC/libvpx
./configure --prefix=$BUILD --target=x86_64-win64-vs15 --enable-vp9-highbitdepth --disable-shared --disable-examples --disable-tools --disable-docs --disable-libyuv --disable-unit_tests --disable-postproc
make -j $NUMBER_OF_PROCESSORS
make install
mv $BUILD/lib/x64/vpxmd.lib $BUILD/lib/vpx.lib
rm -rf $BUILD/lib/x64
add_comp libvpx
}
function build_lame {
svn co svn://svn.code.sf.net/p/lame/svn/trunk/lame@6474 $SRC/lame
cd $SRC/lame
build lame "--enable-nasm --disable-frontend --disable-shared --enable-static"
add_comp libmp3lame
}
function build_zimg {
git clone -q https://github.com/sekrit-twc/zimg.git $SRC/zimg
cd $SRC/zimg
git checkout release-2.9.2
./autogen.sh
./configure --prefix=$BUILD
cd _msvc/zimg
MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" /property:ConfigurationType=StaticLibrary /property:WindowsTargetPlatformVersion=10.0.17134.0 /property:PlatformToolset=v141 /property:Platform=x64 /property:WholeProgramOptimization=false zimg.vcxproj
cp x64/$MSBUILD_CONFIG/z.lib $BUILD/lib/zimg.lib
cd ../..
cp $SRC/zimg/src/zimg/api/zimg.h $BUILD/include/zimg.h
cp zimg.pc $BUILD/lib/pkgconfig/zimg.pc
add_comp libzimg
}
function build_opus {
git clone -q https://github.com/xiph/opus.git $SRC/opus
cd $SRC/opus/win32/VS2015
echo \nConverting project file ...
sed -i 's/v140/v141/g' opus.vcxproj
echo Building project 'opus' ...
MSBuild.exe /maxcpucount:$NUMBER_OF_PROCESSORS /property:Configuration="$MSBUILD_CONFIG" /property:Platform=x64 opus.vcxproj
echo Done.
cp x64/$MSBUILD_CONFIG/opus.lib $BUILD/lib/opus.lib
cp -r $SRC/opus/include $BUILD/include/opus
cp $SRC/opus/opus.pc.in $BUILD/lib/pkgconfig/opus.pc
sed -i "s#@prefix@#$BUILD#g" $BUILD/lib/pkgconfig/opus.pc
sed -i "s/@exec_prefix@/\$\{prefix\}/g" $BUILD/lib/pkgconfig/opus.pc
sed -i "s/@libdir@/\$\{prefix\}\/lib/g" $BUILD/lib/pkgconfig/opus.pc
sed -i "s/@includedir@/\$\{prefix\}\/include/g" $BUILD/lib/pkgconfig/opus.pc
sed -i "s/@LIBM@//g" $BUILD/lib/pkgconfig/opus.pc
sed -i "s/@VERSION@/2.0.0/g" $BUILD/lib/pkgconfig/opus.pc
add_comp libopus
}
function add_comp {
COMPONENTS="$COMPONENTS --enable-$1"
}
rm -rf src build
mkdir src build build/include build/lib build/lib/pkgconfig
BUILD=`realpath build`
SRC=`realpath src`
git clone -q -b release/5.0 https://github.com/FFmpeg/FFmpeg.git $SRC/ffmpeg
#build_aom
build_nvenc
build_amf
build_mfx
#build_svt
#build_ogg
#build_vorbis
#build_snappy
#build_libvpx
#build_lame
#build_zimg
#build_opus
cd $SRC/ffmpeg
PKG_CONFIG_PATH=$BUILD/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --toolchain=msvc --extra-cflags="$CFLAGS -I$BUILD/include" --extra-ldflags="-LIBPATH:$BUILD/lib" --prefix=$BUILD --enable-shared --disable-static --arch=x86_64 --disable-doc --enable-runtime-cpudetect --enable-w32threads --build-suffix=-voukoderpro $COMPONENTS
sed -i 's/\x81/ue/g' config.h
make -j$(nproc)
make install
# clean up
rm -rf $BUILD/lib/fdk-aac.lib $BUILD/lib/*.la
# Create archives
cd $BUILD
mkdir ../dist 2>/dev/null
tar czf ../dist/ffmpeg-win64-static-$MODE.tar.gz *
cd $SRC/ffmpeg
tar czf ../../dist/ffmpeg-win64-static-src-$MODE.tar.gz *

View File

@ -1,57 +0,0 @@
--- libavcodec/libfdk-aacenc.c.orig 2018-09-04 17:31:43.145385000 +0200
+++ libavcodec/libfdk-aacenc.c 2018-09-04 17:39:10.786071200 +0200
@@ -289,7 +289,7 @@
}
avctx->frame_size = info.frameLength;
- avctx->initial_padding = info.encoderDelay;
+ avctx->initial_padding = info.nDelay;
ff_af_queue_init(avctx, &s->afq);
if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
@@ -322,28 +322,35 @@
int out_buffer_size, out_buffer_element_size;
void *in_ptr, *out_ptr;
int ret;
+ uint8_t dummy_buf[1];
AACENC_ERROR err;
/* handle end-of-stream small frame and flushing */
if (!frame) {
+ /* Must be a non-null pointer, even if it's a dummy. We could use
+ * the address of anything else on the stack as well. */
+ in_ptr = dummy_buf;
+ in_buffer_size = 0;
+
in_args.numInSamples = -1;
} else {
- in_ptr = frame->data[0];
- in_buffer_size = 2 * avctx->channels * frame->nb_samples;
- in_buffer_element_size = 2;
-
- in_args.numInSamples = avctx->channels * frame->nb_samples;
- in_buf.numBufs = 1;
- in_buf.bufs = &in_ptr;
- in_buf.bufferIdentifiers = &in_buffer_identifier;
- in_buf.bufSizes = &in_buffer_size;
- in_buf.bufElSizes = &in_buffer_element_size;
+ in_ptr = frame->data[0];
+ in_buffer_size = 2 * avctx->channels * frame->nb_samples;
+
+ in_args.numInSamples = avctx->channels * frame->nb_samples;
/* add current frame to the queue */
if ((ret = ff_af_queue_add(&s->afq, frame)) < 0)
return ret;
}
+ in_buffer_element_size = 2;
+ in_buf.numBufs = 1;
+ in_buf.bufs = &in_ptr;
+ in_buf.bufferIdentifiers = &in_buffer_identifier;
+ in_buf.bufSizes = &in_buffer_size;
+ in_buf.bufElSizes = &in_buffer_element_size;
+
/* The maximum packet size is 6144 bits aka 768 bytes per channel. */
if ((ret = ff_alloc_packet2(avctx, avpkt, FFMAX(8192, 768 * avctx->channels), 0)) < 0)
return ret;

View File

@ -1,13 +0,0 @@
--- libavformat/matroskaenc.c 2018-08-10 22:18:59.051659000 +0200
+++ libavformat/matroskaenc2.c 2018-08-10 22:18:31.932030400 +0200
@@ -2671,8 +2671,8 @@
}
for (i = 0; i < s->nb_streams; i++) {
- // ms precision is the de-facto standard timescale for mkv files
- avpriv_set_pts_info(s->streams[i], 64, 1, 1000);
+ // ms precision is the de-facto standard timescale for mkv files (Patched: We're using microseconds!!)
+ avpriv_set_pts_info(s->streams[i], 64, 1, 1000000);
}
return 0;

View File

@ -1,7 +1,7 @@
From 099b9eaee7cc6dae0ace4d8ce83cbb65449eb901 Mon Sep 17 00:00:00 2001 From de345e50f1b2d8b79c72db747c66a6bdcc646914 Mon Sep 17 00:00:00 2001
From: sherpya <sherpya@netfarm.it> From: Gianluigi Tiesi <sherpya@netfarm.it>
Date: Sun, 4 Dec 2016 01:28:51 +0100 Date: Sun, 4 Dec 2016 01:28:51 +0100
Subject: [PATCH 1/6] dynamic loading of shared fdk-aac library Subject: [PATCH 3/8] dynamic loading of shared fdk-aac library
--- ---
configure | 6 +-- configure | 6 +--
@ -12,26 +12,27 @@ Subject: [PATCH 1/6] dynamic loading of shared fdk-aac library
create mode 100644 libavcodec/libfdk-aac_internal.h create mode 100644 libavcodec/libfdk-aac_internal.h
diff --git a/configure b/configure diff --git a/configure b/configure
index 25120337de..36e8d99f00 100755 index 69fc11fcba..d381419123 100755
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -1675,6 +1675,5 @@ EXTERNAL_LIBRARY_GPL_LIST=" @@ -1726,7 +1726,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
EXTERNAL_LIBRARY_NONFREE_LIST=" EXTERNAL_LIBRARY_NONFREE_LIST="
decklink decklink
- libfdk_aac - libfdk_aac
openssl openssl
libtls libtls
" "
@@ -1713,6 +1712,7 @@ EXTERNAL_LIBRARY_LIST=" @@ -1816,6 +1815,7 @@ EXTERNAL_LIBRARY_LIST="
libcelt opengl
libcodec2 pocketsphinx
libdc1394 vapoursynth
+ libfdk_aac + libfdk_aac
libdrm "
libflite
libfontconfig HWACCEL_AUTODETECT_LIBRARY_LIST="
@@ -6064,9 +6064,7 @@ enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create -lc @@ -6246,9 +6246,7 @@ enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.4.0" "dav1d
enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.5.115" davs2.h davs2_decoder_open enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
-enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen || -enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
@ -260,4 +261,4 @@ index 5620bb5951..c4519b6b74 100644
av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n", av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n",
aac_get_error(err)); aac_get_error(err));
-- --
2.19.0 2.24.0

View File

@ -0,0 +1,249 @@
diff --git a/configure b/configure
index 7a62f0c248..e4b5dae609 100755
--- a/configure
+++ b/configure
@@ -1783,7 +1783,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
EXTERNAL_LIBRARY_NONFREE_LIST="
decklink
- libfdk_aac
libtls
"
@@ -1880,6 +1879,7 @@ EXTERNAL_LIBRARY_LIST="
openssl
pocketsphinx
vapoursynth
+ libfdk_aac
"
HWACCEL_AUTODETECT_LIBRARY_LIST="
@@ -6532,9 +6532,7 @@ enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.5.0" "dav1d
enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
-enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
- { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
- warn "using libfdk without pkg-config"; } }
+enabled libfdk_aac && require_headers fdk-aac/aacenc_lib.h
flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs
enabled fontconfig && enable libfontconfig
diff --git a/libavcodec/libfdk-aac_internal.h b/libavcodec/libfdk-aac_internal.h
new file mode 100644
index 0000000000..9bcfdb9aba
--- /dev/null
+++ b/libavcodec/libfdk-aac_internal.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2018 Gianluigi Tiesi
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_LIBFDK_AAC_INTERNAL_H
+#define AVCODEC_LIBFDK_AAC_INTERNAL_H
+
+#ifdef _WIN32
+#include <windows.h>
+#define LIBNAME "libfdk-aac-2.dll"
+#define dlopen(fname, f) ((void *) LoadLibraryA(fname))
+#define dlclose(handle) FreeLibrary((HMODULE) handle)
+#define dlsym(handle, name) GetProcAddress((HMODULE) handle, name)
+#else
+#include <dlfcn.h>
+#define LIBNAME "libfdk-aac.so.2"
+#endif
+
+#define DLSYM(x) \
+ do \
+ { \
+ s->pfn.x = ( imp_##x ) dlsym(s->hLib, AV_STRINGIFY(x)); \
+ if (!s->pfn.x ) \
+ { \
+ av_log(avctx, AV_LOG_ERROR, "Unable to find symbol " AV_STRINGIFY(x) " in dynamic " LIBNAME "\n"); \
+ return -1; \
+ } \
+ } while (0)
+
+
+#include <fdk-aac/aacenc_lib.h>
+#include <fdk-aac/aacdecoder_lib.h>
+
+typedef AACENC_ERROR (*imp_aacEncOpen)(HANDLE_AACENCODER *phAacEncoder, const UINT encModules, const UINT maxChannels);
+typedef AACENC_ERROR (*imp_aacEncClose)(HANDLE_AACENCODER *phAacEncoder);
+typedef AACENC_ERROR (*imp_aacEncEncode)(const HANDLE_AACENCODER hAacEncoder, const AACENC_BufDesc *inBufDesc, const AACENC_BufDesc *outBufDesc, const AACENC_InArgs *inargs, AACENC_OutArgs *outargs);
+typedef AACENC_ERROR (*imp_aacEncInfo)(const HANDLE_AACENCODER hAacEncoder, AACENC_InfoStruct *pInfo);
+typedef AACENC_ERROR (*imp_aacEncoder_SetParam)(const HANDLE_AACENCODER hAacEncoder, const AACENC_PARAM param, const UINT value);
+
+typedef struct _aacEncLib {
+ imp_aacEncOpen aacEncOpen;
+ imp_aacEncClose aacEncClose;
+ imp_aacEncEncode aacEncEncode;
+ imp_aacEncInfo aacEncInfo;
+ imp_aacEncoder_SetParam aacEncoder_SetParam;
+} aacEncLib;
+
+typedef LINKSPEC_H HANDLE_AACDECODER (*imp_aacDecoder_Open)(TRANSPORT_TYPE transportFmt, UINT nrOfLayers);
+typedef LINKSPEC_H void (*imp_aacDecoder_Close)(HANDLE_AACDECODER self);
+typedef LINKSPEC_H AAC_DECODER_ERROR (*imp_aacDecoder_Fill)(HANDLE_AACDECODER self, UCHAR *pBuffer[], const UINT bufferSize[], UINT *bytesValid);
+typedef LINKSPEC_H AAC_DECODER_ERROR (*imp_aacDecoder_DecodeFrame)(HANDLE_AACDECODER self, INT_PCM *pTimeData, const INT timeDataSize, const UINT flags);
+typedef LINKSPEC_H CStreamInfo* (*imp_aacDecoder_GetStreamInfo)(HANDLE_AACDECODER self);
+typedef LINKSPEC_H AAC_DECODER_ERROR (*imp_aacDecoder_ConfigRaw)(HANDLE_AACDECODER self, UCHAR *conf[], const UINT length[]);
+typedef LINKSPEC_H AAC_DECODER_ERROR (*imp_aacDecoder_SetParam)(const HANDLE_AACDECODER self, const AACDEC_PARAM param, const INT value);
+typedef LINKSPEC_H AAC_DECODER_ERROR (*imp_aacDecoder_AncDataInit)(HANDLE_AACDECODER self, UCHAR *buffer, int size);
+
+typedef struct _aacDecLib {
+ imp_aacDecoder_Open aacDecoder_Open;
+ imp_aacDecoder_Close aacDecoder_Close;
+ imp_aacDecoder_Fill aacDecoder_Fill;
+ imp_aacDecoder_DecodeFrame aacDecoder_DecodeFrame;
+ imp_aacDecoder_ConfigRaw aacDecoder_ConfigRaw;
+ imp_aacDecoder_GetStreamInfo aacDecoder_GetStreamInfo;
+ imp_aacDecoder_SetParam aacDecoder_SetParam;
+ imp_aacDecoder_AncDataInit aacDecoder_AncDataInit;
+} aacDecLib;
+
+#endif /* AVCODEC_LIBFDK_AAC_INTERNAL_H */
\ No newline at end of file
diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
index ffa1fdcce3..ebf6350b41 100644
--- a/libavcodec/libfdk-aacdec.c
+++ b/libavcodec/libfdk-aacdec.c
@@ -24,6 +24,7 @@
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
+#include "libfdk-aac_internal.h"
#ifdef AACDECODER_LIB_VL0
#define FDKDEC_VER_AT_LEAST(vl0, vl1) \
@@ -47,6 +48,8 @@ enum ConcealMethod {
typedef struct FDKAACDecContext {
const AVClass *class;
HANDLE_AACDECODER handle;
+ void *hLib;
+ aacDecLib pfn;
uint8_t *decoder_buffer;
int decoder_buffer_size;
uint8_t *anc_buffer;
@@ -101,7 +104,7 @@ static const AVClass fdk_aac_dec_class = {
static int get_stream_info(AVCodecContext *avctx)
{
FDKAACDecContext *s = avctx->priv_data;
- CStreamInfo *info = aacDecoder_GetStreamInfo(s->handle);
+ CStreamInfo *info = s->pfn.aacDecoder_GetStreamInfo(s->handle);
int channel_counts[0x24] = { 0 };
int i, ch_error = 0;
uint64_t ch_layout = 0;
@@ -216,8 +219,10 @@ static av_cold int fdk_aac_decode_close(AVCodecContext *avctx)
{
FDKAACDecContext *s = avctx->priv_data;
- if (s->handle)
- aacDecoder_Close(s->handle);
+ if (s->hLib && s->handle) {
+ s->pfn.aacDecoder_Close(s->handle);
+ dlclose(s->hLib);
+ }
av_freep(&s->decoder_buffer);
av_freep(&s->anc_buffer);
@@ -229,6 +234,27 @@ static av_cold int fdk_aac_decode_init(AVCodecContext *avctx)
FDKAACDecContext *s = avctx->priv_data;
AAC_DECODER_ERROR err;
+ if (!(s->hLib = dlopen(LIBNAME, RTLD_NOW))) {
+ av_log(avctx, AV_LOG_ERROR, "Unable to load " LIBNAME "\n");
+ return -1;
+ }
+
+ DLSYM(aacDecoder_Open);
+#define aacDecoder_Open s->pfn.aacDecoder_Open
+ DLSYM(aacDecoder_Close);
+ DLSYM(aacDecoder_Fill);
+#define aacDecoder_Fill s->pfn.aacDecoder_Fill
+ DLSYM(aacDecoder_DecodeFrame);
+#define aacDecoder_DecodeFrame s->pfn.aacDecoder_DecodeFrame
+ DLSYM(aacDecoder_GetStreamInfo);
+#define aacDecoder_GetStreamInfo s->pfn.aacDecoder_GetStreamInfo
+ DLSYM(aacDecoder_ConfigRaw);
+#define aacDecoder_ConfigRaw s->pfn.aacDecoder_ConfigRaw
+ DLSYM(aacDecoder_SetParam);
+#define aacDecoder_SetParam s->pfn.aacDecoder_SetParam
+ DLSYM(aacDecoder_AncDataInit);
+#define aacDecoder_AncDataInit s->pfn.aacDecoder_AncDataInit
+
s->handle = aacDecoder_Open(avctx->extradata_size ? TT_MP4_RAW : TT_MP4_ADTS, 1);
if (!s->handle) {
av_log(avctx, AV_LOG_ERROR, "Error opening decoder\n");
diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index 7ee2f13ac7..ff604671a6 100644
--- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c
@@ -26,6 +26,7 @@
#include "audio_frame_queue.h"
#include "encode.h"
#include "internal.h"
+#include "libfdk-aac_internal.h"
#include "profiles.h"
#ifdef AACENCODER_LIB_VL0
@@ -47,6 +48,8 @@ typedef struct AACContext {
int header_period;
int vbr;
+ void *hLib;
+ aacEncLib pfn;
AudioFrameQueue afq;
} AACContext;
@@ -111,8 +114,10 @@ static int aac_encode_close(AVCodecContext *avctx)
{
AACContext *s = avctx->priv_data;
- if (s->handle)
- aacEncClose(&s->handle);
+ if (s->hLib && s->handle) {
+ s->pfn.aacEncClose(&s->handle);
+ dlclose(s->hLib);
+ }
ff_af_queue_close(&s->afq);
return 0;
@@ -128,6 +133,21 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
int aot = FF_PROFILE_AAC_LOW + 1;
int sce = 0, cpe = 0;
+ if (!(s->hLib = dlopen(LIBNAME, RTLD_NOW))) {
+ av_log(avctx, AV_LOG_ERROR, "Unable to load " LIBNAME "\n");
+ return -1;
+ }
+
+ DLSYM(aacEncOpen);
+#define aacEncOpen s->pfn.aacEncOpen
+ DLSYM(aacEncClose);
+ DLSYM(aacEncEncode);
+#define aacEncEncode s->pfn.aacEncEncode
+ DLSYM(aacEncInfo);
+#define aacEncInfo s->pfn.aacEncInfo
+ DLSYM(aacEncoder_SetParam);
+#define aacEncoder_SetParam s->pfn.aacEncoder_SetParam
+
if ((err = aacEncOpen(&s->handle, 0, avctx->channels)) != AACENC_OK) {
av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n",
aac_get_error(err));

View File

@ -0,0 +1,249 @@
diff --git a/configure b/configure
index 82367fd30d..a67cb46861 100755
--- a/configure
+++ b/configure
@@ -1762,7 +1762,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
EXTERNAL_LIBRARY_NONFREE_LIST="
decklink
- libfdk_aac
openssl
libtls
"
@@ -1857,6 +1856,7 @@ EXTERNAL_LIBRARY_LIST="
opengl
pocketsphinx
vapoursynth
+ libfdk_aac
"
HWACCEL_AUTODETECT_LIBRARY_LIST="
@@ -6386,9 +6386,7 @@ enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.5.0" "dav1d
enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open
enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new
enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion
-enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen ||
- { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac &&
- warn "using libfdk without pkg-config"; } }
+enabled libfdk_aac && require_headers fdk-aac/aacenc_lib.h
flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs
enabled fontconfig && enable libfontconfig
diff --git a/libavcodec/libfdk-aac_internal.h b/libavcodec/libfdk-aac_internal.h
new file mode 100644
index 0000000000..cd1e6e3340
--- /dev/null
+++ b/libavcodec/libfdk-aac_internal.h
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2018 Gianluigi Tiesi
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_LIBFDK_AAC_INTERNAL_H
+#define AVCODEC_LIBFDK_AAC_INTERNAL_H
+
+#ifdef _WIN32
+#include <windows.h>
+#define LIBNAME "libfdk-aac-2.dll"
+#define dlopen(fname, f) ((void *) LoadLibraryA(fname))
+#define dlclose(handle) FreeLibrary((HMODULE) handle)
+#define dlsym(handle, name) GetProcAddress((HMODULE) handle, name)
+#else
+#include <dlfcn.h>
+#define LIBNAME "libfdk-aac.so.2"
+#endif
+
+#define DLSYM(x) \
+ do \
+ { \
+ s->pfn.x = ( imp_##x ) dlsym(s->hLib, AV_STRINGIFY(x)); \
+ if (!s->pfn.x ) \
+ { \
+ av_log(avctx, AV_LOG_ERROR, "Unable to find symbol " AV_STRINGIFY(x) " in dynamic " LIBNAME "\n"); \
+ return -1; \
+ } \
+ } while (0)
+
+
+#include <fdk-aac/aacenc_lib.h>
+#include <fdk-aac/aacdecoder_lib.h>
+
+typedef AACENC_ERROR (*imp_aacEncOpen)(HANDLE_AACENCODER *phAacEncoder, const UINT encModules, const UINT maxChannels);
+typedef AACENC_ERROR (*imp_aacEncClose)(HANDLE_AACENCODER *phAacEncoder);
+typedef AACENC_ERROR (*imp_aacEncEncode)(const HANDLE_AACENCODER hAacEncoder, const AACENC_BufDesc *inBufDesc, const AACENC_BufDesc *outBufDesc, const AACENC_InArgs *inargs, AACENC_OutArgs *outargs);
+typedef AACENC_ERROR (*imp_aacEncInfo)(const HANDLE_AACENCODER hAacEncoder, AACENC_InfoStruct *pInfo);
+typedef AACENC_ERROR (*imp_aacEncoder_SetParam)(const HANDLE_AACENCODER hAacEncoder, const AACENC_PARAM param, const UINT value);
+
+typedef struct _aacEncLib {
+ imp_aacEncOpen aacEncOpen;
+ imp_aacEncClose aacEncClose;
+ imp_aacEncEncode aacEncEncode;
+ imp_aacEncInfo aacEncInfo;
+ imp_aacEncoder_SetParam aacEncoder_SetParam;
+} aacEncLib;
+
+typedef LINKSPEC_H HANDLE_AACDECODER (*imp_aacDecoder_Open)(TRANSPORT_TYPE transportFmt, UINT nrOfLayers);
+typedef LINKSPEC_H void (*imp_aacDecoder_Close)(HANDLE_AACDECODER self);
+typedef LINKSPEC_H AAC_DECODER_ERROR (*imp_aacDecoder_Fill)(HANDLE_AACDECODER self, UCHAR *pBuffer[], const UINT bufferSize[], UINT *bytesValid);
+typedef LINKSPEC_H AAC_DECODER_ERROR (*imp_aacDecoder_DecodeFrame)(HANDLE_AACDECODER self, INT_PCM *pTimeData, const INT timeDataSize, const UINT flags);
+typedef LINKSPEC_H CStreamInfo* (*imp_aacDecoder_GetStreamInfo)(HANDLE_AACDECODER self);
+typedef LINKSPEC_H AAC_DECODER_ERROR (*imp_aacDecoder_ConfigRaw)(HANDLE_AACDECODER self, UCHAR *conf[], const UINT length[]);
+typedef LINKSPEC_H AAC_DECODER_ERROR (*imp_aacDecoder_SetParam)(const HANDLE_AACDECODER self, const AACDEC_PARAM param, const INT value);
+typedef LINKSPEC_H AAC_DECODER_ERROR (*imp_aacDecoder_AncDataInit)(HANDLE_AACDECODER self, UCHAR *buffer, int size);
+
+typedef struct _aacDecLib {
+ imp_aacDecoder_Open aacDecoder_Open;
+ imp_aacDecoder_Close aacDecoder_Close;
+ imp_aacDecoder_Fill aacDecoder_Fill;
+ imp_aacDecoder_DecodeFrame aacDecoder_DecodeFrame;
+ imp_aacDecoder_ConfigRaw aacDecoder_ConfigRaw;
+ imp_aacDecoder_GetStreamInfo aacDecoder_GetStreamInfo;
+ imp_aacDecoder_SetParam aacDecoder_SetParam;
+ imp_aacDecoder_AncDataInit aacDecoder_AncDataInit;
+} aacDecLib;
+
+#endif /* AVCODEC_LIBFDK_AAC_INTERNAL_H */
diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c
index ffa1fdcce3..b3ee1248ed 100644
--- a/libavcodec/libfdk-aacdec.c
+++ b/libavcodec/libfdk-aacdec.c
@@ -24,6 +24,7 @@
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
+#include "libfdk-aac_internal.h"
#ifdef AACDECODER_LIB_VL0
#define FDKDEC_VER_AT_LEAST(vl0, vl1) \
@@ -47,6 +48,8 @@ enum ConcealMethod {
typedef struct FDKAACDecContext {
const AVClass *class;
HANDLE_AACDECODER handle;
+ void *hLib;
+ aacDecLib pfn;
uint8_t *decoder_buffer;
int decoder_buffer_size;
uint8_t *anc_buffer;
@@ -101,7 +104,7 @@ static const AVClass fdk_aac_dec_class = {
static int get_stream_info(AVCodecContext *avctx)
{
FDKAACDecContext *s = avctx->priv_data;
- CStreamInfo *info = aacDecoder_GetStreamInfo(s->handle);
+ CStreamInfo *info = s->pfn.aacDecoder_GetStreamInfo(s->handle);
int channel_counts[0x24] = { 0 };
int i, ch_error = 0;
uint64_t ch_layout = 0;
@@ -216,8 +219,10 @@ static av_cold int fdk_aac_decode_close(AVCodecContext *avctx)
{
FDKAACDecContext *s = avctx->priv_data;
- if (s->handle)
- aacDecoder_Close(s->handle);
+ if (s->hLib && s->handle) {
+ s->pfn.aacDecoder_Close(s->handle);
+ dlclose(s->hLib);
+ }
av_freep(&s->decoder_buffer);
av_freep(&s->anc_buffer);
@@ -229,6 +234,27 @@ static av_cold int fdk_aac_decode_init(AVCodecContext *avctx)
FDKAACDecContext *s = avctx->priv_data;
AAC_DECODER_ERROR err;
+ if (!(s->hLib = dlopen(LIBNAME, RTLD_NOW))) {
+ av_log(avctx, AV_LOG_ERROR, "Unable to load " LIBNAME "\n");
+ return -1;
+ }
+
+ DLSYM(aacDecoder_Open);
+#define aacDecoder_Open s->pfn.aacDecoder_Open
+ DLSYM(aacDecoder_Close);
+ DLSYM(aacDecoder_Fill);
+#define aacDecoder_Fill s->pfn.aacDecoder_Fill
+ DLSYM(aacDecoder_DecodeFrame);
+#define aacDecoder_DecodeFrame s->pfn.aacDecoder_DecodeFrame
+ DLSYM(aacDecoder_GetStreamInfo);
+#define aacDecoder_GetStreamInfo s->pfn.aacDecoder_GetStreamInfo
+ DLSYM(aacDecoder_ConfigRaw);
+#define aacDecoder_ConfigRaw s->pfn.aacDecoder_ConfigRaw
+ DLSYM(aacDecoder_SetParam);
+#define aacDecoder_SetParam s->pfn.aacDecoder_SetParam
+ DLSYM(aacDecoder_AncDataInit);
+#define aacDecoder_AncDataInit s->pfn.aacDecoder_AncDataInit
+
s->handle = aacDecoder_Open(avctx->extradata_size ? TT_MP4_RAW : TT_MP4_ADTS, 1);
if (!s->handle) {
av_log(avctx, AV_LOG_ERROR, "Error opening decoder\n");
diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index a7144e95dd..cfbfdea417 100644
--- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c
@@ -27,6 +27,8 @@
#include "internal.h"
#include "profiles.h"
+#include "libfdk-aac_internal.h"
+
#ifdef AACENCODER_LIB_VL0
#define FDKENC_VER_AT_LEAST(vl0, vl1) \
((AACENCODER_LIB_VL0 > vl0) || \
@@ -46,6 +48,8 @@ typedef struct AACContext {
int header_period;
int vbr;
+ void *hLib;
+ aacEncLib pfn;
AudioFrameQueue afq;
} AACContext;
@@ -110,8 +114,10 @@ static int aac_encode_close(AVCodecContext *avctx)
{
AACContext *s = avctx->priv_data;
- if (s->handle)
- aacEncClose(&s->handle);
+ if (s->hLib && s->handle) {
+ s->pfn.aacEncClose(&s->handle);
+ dlclose(s->hLib);
+ }
ff_af_queue_close(&s->afq);
return 0;
@@ -127,6 +133,21 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
int aot = FF_PROFILE_AAC_LOW + 1;
int sce = 0, cpe = 0;
+ if (!(s->hLib = dlopen(LIBNAME, RTLD_NOW))) {
+ av_log(avctx, AV_LOG_ERROR, "Unable to load " LIBNAME "\n");
+ return -1;
+ }
+
+ DLSYM(aacEncOpen);
+#define aacEncOpen s->pfn.aacEncOpen
+ DLSYM(aacEncClose);
+ DLSYM(aacEncEncode);
+#define aacEncEncode s->pfn.aacEncEncode
+ DLSYM(aacEncInfo);
+#define aacEncInfo s->pfn.aacEncInfo
+ DLSYM(aacEncoder_SetParam);
+#define aacEncoder_SetParam s->pfn.aacEncoder_SetParam
+
if ((err = aacEncOpen(&s->handle, 0, avctx->channels)) != AACENC_OK) {
av_log(avctx, AV_LOG_ERROR, "Unable to open the encoder: %s\n",
aac_get_error(err));