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 ffmpegExecutable = findExecutablePath(ffmpeg.dir, 'ffmpeg');
|
||||
console.log(ffmpegExecutable)
|
||||
this._executables.push({
|
||||
type: 'tool',
|
||||
name: 'ffmpeg',
|
||||
|
|
|
|||
|
|
@ -150,7 +150,13 @@ async function downloadAndExtractBrotli(options: DownloadParams) {
|
|||
await pipeline(
|
||||
response,
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue