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

Commit c6ea17e

Browse files
committed
Updated documentation
1 parent b950e4c commit c6ea17e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,8 @@ ffmpeg('/path/to/file.avi')
848848

849849
The `error` event is emitted when an error occurs when running ffmpeg or when preparing its execution. It is emitted with an error object as an argument. If the error happened during ffmpeg execution, listeners will also receive two additional arguments containing ffmpegs stdout and stderr.
850850

851+
If streams are used for input or output, any errors emitted from these streams will be passed through to this event, attached to the `error` as `inputStreamError` and `outputStreamError` for input and output streams respectively.
852+
851853
**Warning**: you should _always_ set a handler for the `error` event, as node's default behaviour when an `error` event without any listeners is emitted is to output the error to the console and _terminate the program_.
852854

853855
```js

lib/processor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ module.exports = function(proto) {
7171
* Emitted when an error happens when preparing or running a command
7272
*
7373
* @event FfmpegCommand#error
74-
* @param {Error} error error object
74+
* @param {Error} error error object, with optional properties 'inputStreamError' / 'outputStreamError' for errors on their respective streams
7575
* @param {String|null} stdout ffmpeg stdout, unless outputting to a stream
7676
* @param {String|null} stderr ffmpeg stderr
7777
*/

0 commit comments

Comments
 (0)