diff --git a/README.md b/README.md index 10639d0..48e6072 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ package the output of the transcoding job referenced by the message. | `OSC_ACCESS_TOKEN` | Optional OSC access token for accessing Encore instance in OSC | | | `AWS_ACCESS_KEY_ID` | Optional AWS access key id when `PACKAGE_OUTPUT_FOLDER` is an AWS S3 bucket | | | `AWS_SECRET_ACCESS_KEY` | Optional AWS secret access key when `PACKAGE_OUTPUT_FOLDER` is an AWS S3 bucket | | +| `S3_ENDPOINT_URL` | Optional S3 Endpoint URL when `PACKAGE_OUTPUT_FOLDER` is an S3 bucket not on AWS | ##### Stream key templates diff --git a/package-lock.json b/package-lock.json index c23c88d..052412f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.9.0", "license": "MIT", "dependencies": { - "@eyevinn/shaka-packager-s3": "^0.5.2", + "@eyevinn/shaka-packager-s3": "^0.6.0", "@fastify/cors": "^8.2.0", "@fastify/type-provider-typebox": "^2.4.0", "@osaas/client-core": "^0.8.0", @@ -1009,9 +1009,9 @@ } }, "node_modules/@eyevinn/shaka-packager-s3": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@eyevinn/shaka-packager-s3/-/shaka-packager-s3-0.5.2.tgz", - "integrity": "sha512-ktZea2caY1asCW8zVZLoGSqTiNwZHDlh74SFVZF7/SqGp+7aM4di86F8U4QPnWPSGcetfviNW8wyxRW6+WkRXg==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@eyevinn/shaka-packager-s3/-/shaka-packager-s3-0.6.0.tgz", + "integrity": "sha512-lfczV+gB0OW8j7U1Q6ReNLIGGBtdbDzW2qxCwEys/My7NyQ+rXR4IT660W3U632/n1JD0gb55d+wpguOymbOKg==", "dependencies": { "commander": "^12.1.0", "mv": "^2.1.1" diff --git a/package.json b/package.json index becbe56..1058272 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "node": ">=18.15.0" }, "dependencies": { - "@eyevinn/shaka-packager-s3": "^0.5.2", + "@eyevinn/shaka-packager-s3": "^0.6.0", "@fastify/cors": "^8.2.0", "@fastify/type-provider-typebox": "^2.4.0", "@osaas/client-core": "^0.8.0", diff --git a/src/config.ts b/src/config.ts index d487561..83cd060 100644 --- a/src/config.ts +++ b/src/config.ts @@ -30,6 +30,7 @@ export interface PackagingConfig { packageFormatOptions?: PackageFormatOptions; streamKeysConfig: StreamKeyTemplates; manifestNamesConfig: ManifestNameTemplates; + s3EndpointUrl?: string; } export const DEFAULT_OUTPUT_SUBFOLDER_TEMPLATE = '$INPUTNAME$/$JOBID$'; @@ -92,7 +93,8 @@ function readPackagingConfig(): PackagingConfig { stagingDir: process.env.STAGING_DIR, packageFormatOptions, streamKeysConfig, - manifestNamesConfig + manifestNamesConfig, + s3EndpointUrl: process.env.S3_ENDPOINT_URL }; } diff --git a/src/encorePackager.ts b/src/encorePackager.ts index 3101682..5ae9043 100644 --- a/src/encorePackager.ts +++ b/src/encorePackager.ts @@ -50,6 +50,7 @@ export class EncorePackager { const packageFormatOptions = this.getPackageFormatOptions(job); await doPackage({ dest, + s3EndpointUrl: this.config.s3EndpointUrl, inputs, source: this.config.oscAccessToken ? new URL(jobUrl).origin : undefined, serviceAccessToken,