Skip to content

Cvanwink/arm 3 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 73 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
72f0c4a
Fix definition for metadata property
scriptorian Feb 3, 2021
f383adf
Remove unneeded import
scriptorian Feb 3, 2021
375e05e
Stop input and output links sorting by name
scriptorian Feb 3, 2021
d79139d
Ensure decoder is created from codec_id if available
scriptorian Feb 3, 2021
01e431c
v0.6.11
scriptorian Feb 3, 2021
227fd1d
build with debug symbols (temporary)
srubin Mar 13, 2021
9016768
chore: upgrade dependencies to FFmpeg 4.4 - fixes broken build
sparkpunkd Apr 15, 2021
1ea5dca
chore: version bump for publish
sparkpunkd Apr 15, 2021
e9fea00
Improved handling of FFmpeg minor version changes
scriptorian Apr 15, 2021
4817866
Remove redundant setter leading to channel layout warning message
scriptorian Jun 14, 2021
d5cde6d
Bump path-parse from 1.0.6 to 1.0.7
dependabot[bot] Aug 10, 2021
d53ea24
Merge pull request #77 from Streampunk/dependabot/npm_and_yarn/path-p…
scriptorian Aug 18, 2021
b98c158
Add support for hardware accelerated decoding
scriptorian Nov 1, 2021
5a31b05
Merge branch 'master' of https://github.com/Streampunk/beamcoder
scriptorian Nov 1, 2021
17a36d8
Fix zero size frame, update version
scriptorian Nov 1, 2021
5f29e9d
Update CircleCI test image
scriptorian Nov 1, 2021
2fe39ef
Merge branch 'master' of https://github.com/Streampunk/beamcoder
scriptorian Nov 1, 2021
9954641
Update cache tag
scriptorian Nov 1, 2021
11b7c06
Build info for CircleCI test image
scriptorian Nov 1, 2021
5504d7b
Simplify decoder hwaccel flag
scriptorian Nov 4, 2021
ffb4b56
Merge pull request #8 from Streampunk/master
cvanwinkle Nov 10, 2021
c90aaa8
better stab at versioning
cvanwinkle Nov 11, 2021
03c6e20
bump version
cvanwinkle Nov 11, 2021
e5aef41
one more version
cvanwinkle Nov 11, 2021
3278d45
hack for missing definitions in latest ffmpeg?
cvanwinkle Nov 11, 2021
79d7d51
Download proper build of ffmpeg from our repo for arm64
cvanwinkle Nov 15, 2021
52d7852
Add arm64 paths for building beamcoder
cvanwinkle Nov 15, 2021
ee71e9f
update node version to run as a native arm64 process when building be…
cvanwinkle Nov 15, 2021
7a56967
fix const vs let usage
cvanwinkle Nov 15, 2021
55a17b9
Bump package version to pick up new arm64 build of ffmpeg
cvanwinkle Dec 4, 2021
40cce35
Fix getting ffmpeg build on x86_64 vs x64
cvanwinkle Dec 5, 2021
b4d6a9d
Add new package-lock
cvanwinkle Dec 5, 2021
ef5dd43
Build release for both x86_64 and arm64
cvanwinkle Dec 6, 2021
1069cfc
Build beamcoder based off of target_arch and not host_arch
cvanwinkle Dec 6, 2021
078a279
Try to get both ffmpeg versions downloaded on macOS
cvanwinkle Dec 6, 2021
6152f11
Try to clean build directory in-between x64 and arm64
cvanwinkle Dec 6, 2021
40d8188
Try verbose output to see why CI can't build arm64
cvanwinkle Dec 6, 2021
5d16865
fix position of --verbose flag
cvanwinkle Dec 6, 2021
bbefb7d
bump node version to 17.0.1 so it can maybe cross-compile
cvanwinkle Dec 6, 2021
66e172a
Try CI node version 16.13.0 since that matches what is on the GitHub …
cvanwinkle Dec 6, 2021
5516e58
Don't clean build directory
cvanwinkle Dec 6, 2021
46ef61c
Fix node packaging for x64 on macOS
cvanwinkle Dec 6, 2021
737d1ae
Update to latest FFmpeg build
cvanwinkle Dec 7, 2021
e2c3d5f
Fix version string to not have extra 'v'
cvanwinkle Dec 7, 2021
139d1e6
Update Beamcoder to 1.33rc3
cvanwinkle Dec 13, 2021
e092caa
v0.6.10-rc.41
cvanwinkle Dec 13, 2021
1073fb2
Update Windows ffmpeg to 4.4
cvanwinkle Dec 13, 2021
002ad96
v0.6.10-rc.42
cvanwinkle Dec 13, 2021
36e8f1a
Revert "Update Windows ffmpeg to 4.4"
cvanwinkle Dec 13, 2021
3ce6d94
Merge remote-tracking branch 'origin/master' into cvanwink/arm-3
cvanwinkle Dec 13, 2021
20935c3
fix bad merge
cvanwinkle Dec 13, 2021
4cabedb
Fix another merge error
cvanwinkle Dec 13, 2021
4de42ef
Fix ffmpeg extraction on windows
cvanwinkle Dec 13, 2021
de51dd1
add verbose tag for windows
cvanwinkle Dec 13, 2021
d5784ae
try prebuild on windows without bash
cvanwinkle Dec 13, 2021
318f64a
v0.6.15-rc.2
cvanwinkle Dec 13, 2021
4bad3b7
Revert "try prebuild on windows without bash"
cvanwinkle Dec 14, 2021
9a995dc
try git-bash instead of bash
cvanwinkle Dec 14, 2021
4af0d26
try specific bash
cvanwinkle Dec 14, 2021
44309fc
quote the temp path
cvanwinkle Dec 14, 2021
f435663
no quote and no escape for temp path
cvanwinkle Dec 14, 2021
6f933e6
go back to using bash on windows
cvanwinkle Dec 14, 2021
298d36b
temporarily comment out ffprobe which doesn't seem to be available
cvanwinkle Dec 14, 2021
c7406fe
restore ffmpeg copies
cvanwinkle Dec 14, 2021
a73b42c
Fix regex on windows
cvanwinkle Dec 14, 2021
a56bd60
v0.6.15-rc.3
cvanwinkle Dec 14, 2021
d65b8a6
0.6.15-rc.4
cvanwinkle Dec 14, 2021
721001f
Try using FFmpeg shared instead of static on Windows
cvanwinkle Dec 14, 2021
cdbf2c4
Revert "Try using FFmpeg shared instead of static on Windows"
cvanwinkle Dec 15, 2021
c0558e0
Update ffmpeg-ffprobe-static to 4.4.0-rc.11
cvanwinkle Dec 15, 2021
fa09190
v0.6.15-rc.6
cvanwinkle Dec 15, 2021
1c196de
#85 Add arm64 to supported linux platforms
scriptorian Feb 28, 2022
2b4a14f
add linux arm64 prebuild
srubin Oct 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ jobs:
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
UV_THREADPOOL_SIZE: 16
docker:
- image: streampunkmedia/testbeam:10-4.1
- image: streampunkmedia/testbeam:16-4.4
steps:
- checkout
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- restore_cache:
keys:
# This branch if available
- v1-dep-{{ .Branch }}-
- v2-dep-{{ .Branch }}-
# Default branch if not
- v1-dep-master-
- v2-dep-master-
# Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
- v1-dep-
- v2-dep-
- run: npm install tap-xunit
- run: npm install --unsafe-perm
- save_cache:
key: v1-dep-{{ .Branch }}-{{ epoch }}
key: v2-dep-{{ .Branch }}-{{ epoch }}
paths:
- ./node_modules
- run: echo 'export PATH="~/Streampunk/beamcoder/node_modules/.bin:$PATH"' >> $BASH_ENV
Expand Down
13 changes: 13 additions & 0 deletions .circleci/test_image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM cimg/node:16.13

# install FFmpeg
RUN sudo apt-get update \
&& sudo apt-get install software-properties-common \
&& sudo add-apt-repository ppa:savoury1/ffmpeg4 \
&& sudo apt-get update \
&& sudo apt-get upgrade && sudo apt-get dist-upgrade \
&& sudo apt-get install libavcodec-dev libavformat-dev libavdevice-dev libavfilter-dev libavutil-dev libpostproc-dev libswresample-dev libswscale-dev

# delete all the apt list files since they're big and get stale quickly
RUN sudo rm -rf /var/lib/apt/lists/*
# this forces "apt-get update" in dependent images, which is also good
13 changes: 13 additions & 0 deletions .circleci/test_image/build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Instructions for building the CircleCI docker image for testing

- install docker desktop
- cd to this directory
- docker build -t streampunkmedia/testbeam:x-y.z .
- run container locally to check build
- push to Docker Hub
- update config.yml to pull new version tag
- push to git to trigger new build and test

(x: NodeAPI base version, y.z: FFmpeg build number)

See https://circleci.com/developer/images/image/cimg/node for CircleCI docker image tags
36 changes: 26 additions & 10 deletions .github/workflows/prebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Use nodejs
uses: actions/setup-node@v1
with:
node-version: 14.8.0
node-version: 16.13.0

- name: npm install
run: npm install
Expand All @@ -37,27 +37,43 @@ jobs:
run: brew install nasm pkg-config
if: ${{ runner.os == 'macOS'}}

- name: install Mac dependencies (shared release)
run: node ./install_ffmpeg.js
- name: install Mac dependencies (shared release x64)
run: node ./install_ffmpeg.js --arch x64
if: ${{ runner.os == 'macOS'}}

- name: install Mac dependencies (shared release arm64)
run: node ./install_ffmpeg.js --arch arm64
if: ${{ runner.os == 'macOS'}}

- name: install Windows dependencies
run: node ./install_ffmpeg.js
if: ${{ runner.os == 'Windows'}}

- name: prebuild for macOS (x64)
run: npx prebuild --runtime napi --arch x64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }}
- name: prebuild Release for macOS (x64)
run: npx prebuild --runtime napi --arch x64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --verbose --upload ${{ secrets.GITHUB_TOKEN }}
if: ${{ runner.os == 'macOS'}}

# - name: prebuild for macOS (arm64)
# run: npx prebuild --runtime napi --arch arm64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }}
# - name: prebuild Debug for macOS (x64)
# run: npx prebuild --debug --runtime napi --arch x64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }}
# if: ${{ runner.os == 'macOS'}}

- name: clean build directory for cross-compiling
run: rm ./build/Release/*.dylib
if: ${{ runner.os == 'macOS'}}

- name: prebuild Release for macOS (arm64)
run: npx prebuild --runtime napi --arch arm64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --verbose --upload ${{ secrets.GITHUB_TOKEN }}
if: ${{ runner.os == 'macOS'}}

- name: prebuild for Windows
run: npx prebuild --runtime napi --include-regex '"(\.node|\.dll|ffmpeg\.exe|ffprobe\.exe)$"' --upload ${{ secrets.GITHUB_TOKEN }}
run: npx prebuild --runtime napi --include-regex '.node|.dll|.exe' --verbose --upload ${{ secrets.GITHUB_TOKEN }}
shell: bash
if: ${{ runner.os == 'Windows'}}

- name: prebuild for Linux
run: npx prebuild --runtime napi --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }}
- name: prebuild for Linux (x64)
run: npx prebuild --runtime napi --arch x64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }}
if: ${{ runner.os == 'Linux'}}

- name: prebuild for Linux (arm64)
run: npx prebuild --runtime napi --arch arm64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }}
if: ${{ runner.os == 'Linux'}}
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.18.3
17.0.1
4 changes: 2 additions & 2 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"C:/Program Files (x86)/Windows Kits/8.1/Include/shared",
"C:/Program Files (x86)/Windows Kits/8.1/Include/winrt",
"${workspaceFolder}/**",
"${workspaceFolder}/ffmpeg/ffmpeg-4.3.1-win64-shared/include/**",
"${env:USERPROFILE}/AppData/Local/node-gyp/Cache/12.18.2/include/node"
"${workspaceFolder}/ffmpeg/ffmpeg-4.x-win64-shared/include/**",
"${env:USERPROFILE}/AppData/Local/node-gyp/Cache/12.21.0/include/node"
],
"defines": [
"_DEBUG",
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@
"xtr1common": "cpp",
"xtree": "cpp",
"xutility": "cpp"
}
},
"cmake.configureOnOpen": false
}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ This will install all necessary dependencies, download the FFmpeg shared and dev

Note that if you want to use a local version of FFmpeg then, before the install, symbolic link or copy appropriate folders to:

./node_modules/beamcoder/ffmpeg/ffmpeg-4.1-win64-shared
./node_modules/beamcoder/ffmpeg/ffmpeg-4.1-win64-dev
./node_modules/beamcoder/ffmpeg/ffmpeg-4.x-win64-shared

To ensure that sufficient threads are available to process several requests in parallel, set the `UV_THREADPOOL_SIZE` environment variable, e.g.:

Expand Down
51 changes: 26 additions & 25 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"copies": [
{
"destination": "build/Release/",
"destination": "<(PRODUCT_DIR)",
"files": [
"node_modules/ffmpeg-ffprobe-static/ffmpeg",
"node_modules/ffmpeg-ffprobe-static/ffprobe",
Expand All @@ -48,7 +48,8 @@
}],
["OS=='mac'", {
"variables": {
"ffmpeg_version": "1.21.rc6"
"ffmpeg_version": "1.33rc3",
"target_arch_override": "<!(node -p \"'<(target_arch)' === 'x64' ? 'x86_64' : '<(target_arch)'\")",
},
"defines": [
"__STDC_CONSTANT_MACROS"
Expand All @@ -62,11 +63,11 @@
"-fexceptions"
],
"include_dirs": [
"<(module_root_dir)/ffmpeg/ffmpeg-ffprobe-shared-darwin-x86_64.<(ffmpeg_version)/include/"
"<(module_root_dir)/ffmpeg/ffmpeg-ffprobe-shared-darwin-<(target_arch_override).<(ffmpeg_version)/include/"
],
"link_settings": {
"library_dirs": [
"<(module_root_dir)/ffmpeg/ffmpeg-ffprobe-shared-darwin-x86_64.<(ffmpeg_version)/"
"<(module_root_dir)/ffmpeg/ffmpeg-ffprobe-shared-darwin-<(target_arch_override).<(ffmpeg_version)/"
],
"libraries": [
"-Wl,-rpath,@loader_path",
Expand All @@ -85,9 +86,9 @@
},
"copies": [
{
"destination": "build/Release/",
"destination": "<(PRODUCT_DIR)",
"files": [
"<!@(node -p \"require('fs').readdirSync('ffmpeg/ffmpeg-ffprobe-shared-darwin-x86_64.<(ffmpeg_version)').map(f => 'ffmpeg/ffmpeg-ffprobe-shared-darwin-x86_64.<(ffmpeg_version)/' + f).join(' ')\")"
"<!@(node -p \"require('fs').readdirSync('ffmpeg/ffmpeg-ffprobe-shared-darwin-<(target_arch_override).<(ffmpeg_version)').map(f => 'ffmpeg/ffmpeg-ffprobe-shared-darwin-<(target_arch_override).<(ffmpeg_version)/' + f).join(' ')\")"
]
}
]
Expand All @@ -105,32 +106,32 @@
}
},
"include_dirs" : [
"ffmpeg/ffmpeg-4.3-win64-shared/include"
"ffmpeg/ffmpeg-4.x-win64-shared/include"
],
"libraries": [
"-l../ffmpeg/ffmpeg-4.3-win64-shared/lib/avcodec",
"-l../ffmpeg/ffmpeg-4.3-win64-shared/lib/avdevice",
"-l../ffmpeg/ffmpeg-4.3-win64-shared/lib/avfilter",
"-l../ffmpeg/ffmpeg-4.3-win64-shared/lib/avformat",
"-l../ffmpeg/ffmpeg-4.3-win64-shared/lib/avutil",
"-l../ffmpeg/ffmpeg-4.3-win64-shared/lib/postproc",
"-l../ffmpeg/ffmpeg-4.3-win64-shared/lib/swresample",
"-l../ffmpeg/ffmpeg-4.3-win64-shared/lib/swscale"
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/avcodec",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/avdevice",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/avfilter",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/avformat",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/avutil",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/postproc",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/swresample",
"-l../ffmpeg/ffmpeg-4.x-win64-shared/lib/swscale"
],
"copies": [
{
"destination": "build/Release/",
"destination": "<(PRODUCT_DIR)",
"files": [
"ffmpeg/ffmpeg-4.3-win64-shared/bin/avcodec-58.dll",
"ffmpeg/ffmpeg-4.3-win64-shared/bin/avdevice-58.dll",
"ffmpeg/ffmpeg-4.3-win64-shared/bin/avfilter-7.dll",
"ffmpeg/ffmpeg-4.3-win64-shared/bin/avformat-58.dll",
"ffmpeg/ffmpeg-4.3-win64-shared/bin/avutil-56.dll",
"ffmpeg/ffmpeg-4.3-win64-shared/bin/postproc-55.dll",
"ffmpeg/ffmpeg-4.3-win64-shared/bin/swresample-3.dll",
"ffmpeg/ffmpeg-4.3-win64-shared/bin/swscale-5.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/avcodec-58.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/avdevice-58.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/avfilter-7.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/avformat-58.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/avutil-56.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/postproc-55.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/swresample-3.dll",
"ffmpeg/ffmpeg-4.x-win64-shared/bin/swscale-5.dll",
"node_modules/ffmpeg-ffprobe-static/ffmpeg.exe",
"node_modules/ffmpeg-ffprobe-static/ffprobe.exe",
"node_modules/ffmpeg-ffprobe-static/ffprobe.exe"
]
}
]
Expand Down
37 changes: 28 additions & 9 deletions install_ffmpeg.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const fs = require('fs');
const util = require('util');
const https = require('https');
const cp = require('child_process');
const { argv } = require('process');
const [ mkdir, access, rename, execFile, exec ] = // eslint-disable-line
[ fs.mkdir, fs.access, fs.rename, cp.execFile, cp.exec ].map(util.promisify);

Expand Down Expand Up @@ -83,7 +84,7 @@ async function inflate(rs, folder, name) {
return new Promise((comp, err) => {
console.log(`Unzipping '${folder}/${name}.zip'.`);
rs.pipe(unzip.Extract({ path: folder }).on('close', () => {
fs.rename(`./${folder}/${directoryName}`, `./${folder}/${name}`, () => {
fs.rename(`${folder}/${directoryName}`, `${folder}/${name}`, () => {
console.log(`Unzipping of '${folder}/${name}.zip' completed.`);
comp();
});
Expand All @@ -100,14 +101,16 @@ async function win32() {
else throw e;
});

const ffmpegFilename = 'ffmpeg-4.3-win64-shared';
const ffmpegFilename = 'ffmpeg-4.x-win64-shared';
await access(`ffmpeg/${ffmpegFilename}`, fs.constants.R_OK).catch(async () => {
const html = await getHTML('https://github.com/BtbN/FFmpeg-Builds/wiki/Latest', 'latest autobuilds');
const htmlStr = html.toString('utf-8');
const autoPos = htmlStr.indexOf('<p><a href=');
const endPos = htmlStr.indexOf('</div>', autoPos);
const autoStr = htmlStr.substring(autoPos, endPos);
const sharedEndPos = autoStr.lastIndexOf('">win64-gpl-shared-4.3');
const sharedEndPos = autoStr.lastIndexOf('">win64-gpl-shared-4.');
if (sharedEndPos === -1)
throw new Error('Failed to find latest v4.x autobuild from "https://github.com/BtbN/FFmpeg-Builds/wiki/Latest"');
const startStr = '<p><a href="';
const sharedStartPos = autoStr.lastIndexOf(startStr, sharedEndPos) + startStr.length;
const downloadSource = autoStr.substring(sharedStartPos, sharedEndPos);
Expand Down Expand Up @@ -182,14 +185,30 @@ async function darwin() {
else throw e;
});

const version = '1.21.rc6';
const ffmpegFilename = `ffmpeg-ffprobe-shared-darwin-x86_64.${version}`;
const version = '1.33rc3';

// default to platform-architecture
let arch = os.arch()

// but if the '--arch' argument is provided
// use the next argument as the value (e.g. 'x64' or 'arm64')
const overrideArchIndex = process.argv.indexOf('--arch');
if (0 < overrideArchIndex && overrideArchIndex < process.argv.length - 1) {
arch = process.argv[overrideArchIndex + 1];
}

if (arch === 'x64') {
arch = 'x86_64';
}

const ffmpegFilename = `ffmpeg-ffprobe-shared-darwin-${arch}.${version}`;
const tag = `v${version}`

await access(`ffmpeg/${ffmpegFilename}`, fs.constants.R_OK).catch(async () => {
const ws = fs.createWriteStream(`ffmpeg/${ffmpegFilename}.zip`);
await get(
ws,
`https://github.com/descriptinc/ffmpeg-build-script/releases/download/v${version}/${ffmpegFilename}.zip`,
`https://github.com/descriptinc/ffmpeg-build-script/releases/download/${tag}/${ffmpegFilename}.zip`,
`${ffmpegFilename}.zip`
).catch(async (err) => {
if (err.name === 'RedirectError') {
Expand All @@ -211,19 +230,19 @@ case 'win32':
console.error('Only 64-bit platforms are supported.');
process.exit(1);
} else {
win32();
win32().catch(console.error);
}
break;
case 'linux':
if (os.arch() != 'x64') {
if (os.arch() != 'x64' && os.arch() != 'arm64') {
console.error('Only 64-bit platforms are supported.');
process.exit(1);
} else {
linux();
}
break;
case 'darwin':
if (os.arch() != 'x64') {
if (os.arch() != 'x64' && os.arch() != 'arm64') {
console.error('Only 64-bit platforms are supported.');
process.exit(1);
} else {
Expand Down
Loading