Skip to content

[ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded #81

@marcraft2

Description

@marcraft2

Hello,
I ran into this problem with this lib. On a not very powerful machine. Because my assembly was very long, more than 3 hours.

Bypass problem :

Add line on :
node-ffmpeg/lib/utils.js

On my device :

node_modules/ffmpeg/lib/utils.js

[...] (line 10 on utils.js)
module.exports.exec = function (commands, settings, callback) {
	// Create final command line
	var finalCommand = commands.join(" ");
	// Create the timeoutId for stop the timeout at the end the process
	var timeoutID = null;

        // -------------------------------------HERE---------------------------
        settings.maxBuffer = 1024*1024*50        //Default of child_process lib is : 1024*1024
        // -------------------------------------HERE---------------------------

	// Exec the command
	var process = exec(finalCommand, settings, function (error, stdout, stderr) {
		// Clear timeout if 'timeoutID' are setted
		if (timeoutID !== null) clearTimeout(timeoutID);
		// Call the callback function
		callback(error, stdout, stderr);
	});
	// Verify if the timeout are setting
	if (settings.timeout > 0) {
		// Set the timeout
		timeoutID = setTimeout(function () {
			process.kill();
		}, 100);
	}
}
[...]

src : https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback

The best would be to add the possibility to set this value, or to calculate the most probable value if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions