Skip to content

Commit

Permalink
ffmpeg-for-homebridge is not being utilized (#480)
Browse files Browse the repository at this point in the history
* ffmpeg-for-homebridge is not being utilized

When debugging why I could not use the proper audio codec provided by ffmpeg-for-homebridge found that it was using the OS installed version.

* CHANGELOG and README

* README

* Update CHANGELOG.md

* Update package.json

Co-authored-by: Donavan Becker <[email protected]>
  • Loading branch information
NorthernMan54 and donavanbecker authored May 12, 2020
1 parent 6d7da57 commit 494e276
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Change Log

All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/).


## v1.0.0 (2020-05-11)

### Breaking Changes

* We are now bundling static ffmpeg binaries for Homebridge with support for audio (libfdk-aac) and hardware decoding (h264_omx) for most major platforms. Details are [here](https://github.com/homebridge/ffmpeg-for-homebridge)
* And are defaulting to use the supplied version unless a different version is specified with the `videoProcessor` configuration option.

### Notable Changes
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<a href="https://www.npmjs.com/package/homebridge-camera-ffmpeg"><img title="npm version" src="https://badgen.net/npm/v/homebridge-camera-ffmpeg" ></a>
<a href="https://www.npmjs.com/package/homebridge-camera-ffmpeg"><img title="npm downloads" src="https://badgen.net/npm/dt/homebridge-camera-ffmpeg" ></a>

<p><a href="https://www.ffmpeg.org">FFmpeg</a> plugin for
<a href="https://homebridge.io">Homebridge</a>.
<p><a href="https://www.ffmpeg.org">FFmpeg</a> plugin for
<a href="https://homebridge.io">Homebridge</a>.
</p>

</span>
Expand All @@ -21,7 +21,7 @@
- Run Homebridge
- Add extra camera accessories in Home app. The setup code is the same as homebridge.

- Install via Homebridge Web UI
- Install via Homebridge Web UI
- Search for `Camera FFmpeg` on the plugin screen of [config-ui-x](https://github.com/oznu/homebridge-config-ui-x) .
- Click install.

Expand Down Expand Up @@ -90,8 +90,8 @@ Example with manufacturer, model, serial number and firmware set:
* `maxBitrate` is the maximum bit rate of the stream in kbit/s, default `300`
* `preserveRatio` can be set to either `W` or `H` with respective obvious meanings, all other values have no effect
* `vcodec` If you're running on a RPi with the omx version of ffmpeg installed, you can change to the hardware accelerated video codec with this option, default `libx264`
* `audio` can be set to true to enable audio streaming from camera. To use audio ffmpeg must be compiled with --enable-libfdk-aac, see https://github.com/KhaosT/homebridge-camera-ffmpeg/wiki, default `false`. Many ffmpeg binaries are not compiled with libfdk-aac, and to work around this issue, force the OPUS codec:
`"acodec": "libopus"`
* `audio` can be set to true to enable audio streaming from camera, default `false`.
* `acodec` Default audio codec is `libfdk_aac` and is enabled in the bundled ffmpeg version.
* `packetSize` If audio or video is choppy try a smaller value, set to a multiple of 188, default `1316`
* `vflip` Flips the stream vertically, default `false`
* `hflip` Flips the stream horizontally, default `false`
Expand Down
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ ffmpegPlatform.prototype.configureAccessory = function(accessory) {

ffmpegPlatform.prototype.didFinishLaunching = function() {
var self = this;
var videoProcessor = self.config.videoProcessor || 'ffmpeg';
var interfaceName = self.config.interfaceName || '';

if (self.config.cameras) {
Expand Down Expand Up @@ -79,7 +78,7 @@ ffmpegPlatform.prototype.didFinishLaunching = function() {
.on('set', _Motion.bind(cameraAccessory));
}

var cameraSource = new FFMPEG(hap, cameraConfig, self.log, videoProcessor, interfaceName);
var cameraSource = new FFMPEG(hap, cameraConfig, self.log, self.config.videoProcessor, interfaceName);
cameraAccessory.configureCameraSource(cameraSource);
configuredAccessories.push(cameraAccessory);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Homebridge Camera FFmpeg",
"name": "homebridge-camera-ffmpeg",
"version": "0.1.19",
"version": "1.0.0",
"description": "ffmpeg plugin for homebridge: https://github.com/nfarina/homebridge",
"license": "ISC",
"keywords": [
Expand Down

0 comments on commit 494e276

Please sign in to comment.