Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Commit

Permalink
fix for ffmpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandawg93 committed Mar 19, 2020
1 parent 29349a5 commit 2cb499e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions lib/streamer.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,12 @@ class NexusStreamer extends EventEmitter {
let ffmpegCommand = '-use_wallclock_as_timestamps 1 -i - -c:v ' + self.ffmpegCodec + ' -an -pix_fmt yuv420p ' + x264Params + '-payload_type 99 -ssrc ' + videoSsrc + ' -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params ' + videoKey.toString('base64') + ' srtp://'+targetAddress+':' + targetVideoPort+'?rtcpport='+targetVideoPort+'&localrtcpport='+targetVideoPort+'&pkt_size=1316';
//audio - https://github.com/KhaosT/homebridge-camera-ffmpeg/issues/9
//ffmpegCommand += ' -c:a libfdk_aac -profile:a aac_eld -vn -ac 1 -ar 16000 -b:a 8000 -flags +global_header -payload_type 110 -ssrc ' + audioSsrc + ' -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params '+audioKey.toString('base64')+' -rtsp_transport tcp srtp://'+targetAddress+':'+targetAudioPort+'?rtcpport='+targetAudioPort+'&localrtcpport='+targetAudioPort+'&pkt_size=188';
if (typeof pathToFfmpeg === void 0) {
pathToFfmpeg = 'ffmpeg';
let ffmpeg;
if (pathToFfmpeg) {
ffmpeg = spawn(pathToFfmpeg, ffmpegCommand.split(' '), {env: process.env});
} else {
ffmpeg = spawn('ffmpeg', ffmpegCommand.split(' '), {env: process.env});
}
let ffmpeg = spawn(pathToFfmpeg, ffmpegCommand.split(' '), {env: process.env});
ffmpeg.stdin.on('error', (e) => {
if (e.code !== 'EPIPE') {
self.log.error(e.code);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-nest-cam2",
"version": "1.1.8",
"version": "1.1.9",
"description": "Nest cam plugin for homebridge: https://homebridge.io/",
"license": "ISC",
"keywords": [
Expand Down

0 comments on commit 2cb499e

Please sign in to comment.