sahilchaddha / homebridge-dafang

Homebridge Plugin for Xiaomi Dafang / Wyze Cam IP Camera => Hey Siri, Start Video Recording
MIT License
204 stars 34 forks source link

Allow ffmpeg to copy the stream if the requested dimensions are similar enough #6

Open KodeCR opened 5 years ago

KodeCR commented 5 years ago

These changes allow homebridge-dafang to copy the stream instead of re-encoding it when the requested dimensions are similar to the stream coming from the camera. It detects the width and height from the stream automatically using ffprobe. I also refactored the ffmpeg option handling to support it more easily, now allowing global_options and input_options. Note that this doesn't take into account bitrate and fps. Also note the (image) source no longer is expected to contain the "-i ".

sahilchaddha commented 5 years ago

@KodeCR PR looks good. Allow me some time to test it and upload the new version to npm.

mkormendy commented 5 years ago

@sahilchaddha for uploading to npm, just use release-it. (npm install -g release-it). You can also include it in your CI process.