fluent-ffmpeg / node-fluent-ffmpeg

A fluent API to FFMPEG (http://www.ffmpeg.org)
MIT License
7.85k stars 874 forks source link

kill an ffmpeg screenshots job #350

Closed timkock closed 9 years ago

timkock commented 9 years ago

I was wondering how you kill a screenshots (frame grabbing) activity. I have tried calling the kill() method but the following exception occurs (even when listening to .on('error'))

node_modules/fluent-ffmpeg/lib/processor.js:631
      this.options.logger.warn('No running ffmpeg process, cannot send signal'
                          ^
TypeError: Cannot call method 'warn' of undefined
    at FfmpegCommand.proto.kill (node_modules/fluent-ffmpeg/lib/processor.js:631:27)
    at Grabber.kill (footage.js:171:35)
    at null._onTimeout (cli.js:272:25)
    at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
njoyard commented 9 years ago

This issue is fixed in current master (see pull request #347). It will be available in the next release. In the meantime you can either apply the fix manually on your copy, or update your package.json so that npm fetches fluent-ffmpeg from the git repository.