Skip to content

Commit f1d7b9a

Browse files
authored
fix lib ffmpeg (#32)
1 parent 7d78c4c commit f1d7b9a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

examples/record-audio-video-stream/server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ const fs = require('fs')
55

66
const { RTCAudioSink, RTCVideoSink } = require('wrtc').nonstandard;
77

8-
const ffmpeg = require('fluent-ffmpeg')
8+
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
9+
const ffmpeg = require('fluent-ffmpeg');
10+
ffmpeg.setFfmpegPath(ffmpegPath);
911
const { StreamInput } = require('fluent-ffmpeg-multistream')
1012

1113
const VIDEO_OUTPUT_SIZE = '320x240'

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"author": "Mark Andrus Roberts <[email protected]>",
1919
"license": "BSD-3-Clause",
2020
"dependencies": {
21+
"@ffmpeg-installer/ffmpeg": "^1.0.20",
2122
"Scope": "github:kevincennis/Scope",
2223
"body-parser": "^1.18.3",
2324
"browserify-middleware": "^8.1.1",
@@ -34,4 +35,4 @@
3435
"eslint": "^5.15.1",
3536
"tape": "^4.10.0"
3637
}
37-
}
38+
}

0 commit comments

Comments
 (0)