potmat / homebridge-google-nest-sdm

A Homebridge plugin for Google Nest devices that uses the Google Smart Device Management API. Supports Cameras, Doorbells, Displays, and Thermostats. Includes support for HomeKit Secure Video.
ISC License
134 stars 15 forks source link

Set `stdio` to `'pipe'` when spawning FFmpeg process #144

Closed PatrickStankard closed 5 months ago

PatrickStankard commented 5 months ago

Fixes #101

According to the Node.js docs for stdin on child processes:

If the child was spawned with stdio[0] set to anything other than 'pipe', then this will be null.

By default, the process that the HksvStreamer spawns has it set to 'ignore': https://github.com/potmat/homebridge-google-nest-sdm/blob/a228dc3a07ad7fdd3197538e9942d276c9a78f65/src/HksvStreamer.ts#L84

This PR explicitly sets stdio to 'pipe' whenever we're calling spawn to launch FFmpeg, so that stdin is set correctly.