diff --git a/README.md b/README.md index 0fb0a21..31db5a2 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,10 @@ This module is installed via npm: $ npm install ffmpeg-ffprobe-static ``` -*Note:* During installation, it will download the appropriate `ffmpeg` binary from the [`b4.3.1` GitHub release](https://github.com/descriptinc/ffmpeg-ffprobe-static/releases/tag/b4.3.1). Use and distribution of the binary releases of FFmpeg are covered by their respective license. +*Note:* During installation, it will download the appropriate `ffmpeg`/`ffprobe` binary from the [`b4.3.1` GitHub release](https://github.com/descriptinc/ffmpeg-ffprobe-static/releases/tag/b4.3.1). Use and distribution of the binary releases of FFmpeg are covered by their respective license. + +Alternatively, it will fetch binaries from `FFMPEG_FFPROBE_STATIC_BASE_URL` if set as an environment variable. The default base URL is https://github.com/descriptinc/ffmpeg-ffprobe-static/releases/download/. The install script will fetch binaries from `BASE_URL/binary-release-tag` (the `binary-release-tag` is set in package.json and can customized by setting `FFMPEG_BINARY_RELEASE`). + ### Electron & other cross-platform packaging tools diff --git a/install.js b/install.js index 2887ff6..8d34eb0 100644 --- a/install.js +++ b/install.js @@ -142,7 +142,9 @@ const releaseName = ( ) const arch = process.env.npm_config_arch || os.arch() const platform = process.env.npm_config_platform || os.platform() -let baseUrl = `https://github.com/descriptinc/ffmpeg-ffprobe-static/releases/download/${release}`; +const base = process.env.FFMPEG_FFPROBE_STATIC_BASE_URL || 'https://github.com/descriptinc/ffmpeg-ffprobe-static/releases/download/'; +console.log(`[ffmpeg-ffprobe-static] Using base url: ${base}`); +const baseUrl = new URL(release, base).href; const ffmpegUrl = `${baseUrl}/ffmpeg-${platform}-${arch}` const ffprobeUrl = `${baseUrl}/ffprobe-${platform}-${arch}` const readmeUrl = `${baseUrl}/${platform}-${arch}.README` diff --git a/package.json b/package.json index 4e303cc..50b88c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ffmpeg-ffprobe-static", - "version": "4.3.1-rc.2", + "version": "4.3.1-rc.3", "description": "ffmpeg static binaries for Mac OSX and Linux and Windows", "main": "index.js", "types": "index.d.ts",