Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
This repository was archived by the owner on May 22, 2025. It is now read-only.

Node process exits with exit code 13 without outputing any error #1325

Open
@UlyssesZh

Description

@UlyssesZh

I actually suspect this is a Node.js bug, but I am opening an issue here anyway.

// test.mjs
import { Readable, Writable } from 'stream';
import FfmpegCommand from 'fluent-ffmpeg';

process.on('exit', console.log); // outputs 0, but actual exit code is 13

await new Promise((resolve, reject) => FfmpegCommand()
	.input(Readable.from(Buffer.from(new ArrayBuffer(1000))))
	.inputFormat('f32le')
	.audioChannels(1)
	.audioFrequency(44100)
	.format('wav')
	.pipe(new Writable({ write: chunk => console.log(chunk.length) }))
	.on('end', resolve)
	.on('error', reject)
);

console.log('done'); // never reached
$ node test.mjs && echo good || echo $?
78
0
13

The Node process exits after incomplete ffmpeg output with exit code 13 without outputing any error.

Node version 20.19.0. FFmpeg version 7.1.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions