prasanaworld / puppeteer-screen-recorder

A powerful plugin for recording with Puppeteer.
https://prasanaworld.github.io/puppeteer-screen-recorder/classes/puppeteerscreenrecorder.html
MIT License
388 stars 63 forks source link

add ffmpegAdditionalOptions config prop. Also, improve handling of er… #75

Closed kieransimkin closed 9 months ago

kieransimkin commented 1 year ago

I wanted to add the ffmpeg option -movflags +faststart, as I'm generating video preview thumbnails; so I added the option to add custom options to the ffmpeg commandline.

Before, some errors from ffmpeg were being silently dropped, in particular: bad filter errors, which I noticed while testing this new feature - you'd just get a zero length video with no explanation. I've therefore fixed ffmpeg error handling so that it will properly catch and handle errors on stdout from ffmpeg. If you're writing a file, you'll get ffmpeg errors to stderr. If you're writing to a stream, you can catch the error event on that stream and you will receive all ffmpeg errors.

prasanaworld commented 9 months ago

Its Make sense to have additional options as a configurable props. Thanks for your contribution. I'll test the changes and merge it. Thanks!!