add workaround for manually-created ffmpeg archive
This commit is contained in:
parent
f0713379bc
commit
45b84b7fcd
|
|
@ -762,6 +762,7 @@ export class Registry {
|
||||||
|
|
||||||
const ffmpeg = descriptors.find(d => d.name === 'ffmpeg')!;
|
const ffmpeg = descriptors.find(d => d.name === 'ffmpeg')!;
|
||||||
const ffmpegExecutable = findExecutablePath(ffmpeg.dir, 'ffmpeg');
|
const ffmpegExecutable = findExecutablePath(ffmpeg.dir, 'ffmpeg');
|
||||||
|
console.log(ffmpegExecutable)
|
||||||
this._executables.push({
|
this._executables.push({
|
||||||
type: 'tool',
|
type: 'tool',
|
||||||
name: 'ffmpeg',
|
name: 'ffmpeg',
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,13 @@ async function downloadAndExtractBrotli(options: DownloadParams) {
|
||||||
await pipeline(
|
await pipeline(
|
||||||
response,
|
response,
|
||||||
createBrotliDecompress(),
|
createBrotliDecompress(),
|
||||||
tarFs.extract(options.browserDirectory)
|
tarFs.extract(options.browserDirectory, {
|
||||||
|
map(header: { name: string }) {
|
||||||
|
// manually-created ffmpeg archive has files nested in subdirectory
|
||||||
|
if (header.name.startsWith('ffmpeg-'))
|
||||||
|
header.name = header.name.substring(header.name.indexOf('/'));
|
||||||
|
}
|
||||||
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
if (downloadedBytes !== totalBytes)
|
if (downloadedBytes !== totalBytes)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue