[mirotalksfu] - fix ffmpeg in Docker

هذا الالتزام موجود في:
Miroslav Pejic
2024-07-01 22:38:01 +02:00
الأصل 89f7ed9e63
التزام 18520e4368
9 ملفات معدلة مع 17 إضافات و12 حذوفات

عرض الملف

@@ -13,6 +13,7 @@ RUN apt-get update \
build-essential \ build-essential \
python3 \ python3 \
python3-pip \ python3-pip \
ffmpeg \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Copy package.json and install npm dependencies # Copy package.json and install npm dependencies

عرض الملف

@@ -1,8 +1,9 @@
'use strict'; 'use strict';
const config = require('./config');
const ffmpegPath = config.server.rtmp && config.server.rtmp.ffmpeg ? config.server.rtmp.ffmpeg : '/usr/bin/ffmpeg';
const ffmpeg = require('fluent-ffmpeg'); const ffmpeg = require('fluent-ffmpeg');
const ffmpegInstaller = require('@ffmpeg-installer/ffmpeg'); ffmpeg.setFfmpegPath(ffmpegPath);
ffmpeg.setFfmpegPath(ffmpegInstaller.path);
const Logger = require('./Logger'); const Logger = require('./Logger');
const log = new Logger('RtmpFile'); const log = new Logger('RtmpFile');

عرض الملف

@@ -1,9 +1,10 @@
'use strict'; 'use strict';
const config = require('./config');
const { PassThrough } = require('stream'); const { PassThrough } = require('stream');
const ffmpeg = require('fluent-ffmpeg'); const ffmpeg = require('fluent-ffmpeg');
const ffmpegInstaller = require('@ffmpeg-installer/ffmpeg'); const ffmpegPath = config.server.rtmp && config.server.rtmp.ffmpeg ? config.server.rtmp.ffmpeg : '/usr/bin/ffmpeg';
ffmpeg.setFfmpegPath(ffmpegInstaller.path); ffmpeg.setFfmpegPath(ffmpegPath);
const Logger = require('./Logger'); const Logger = require('./Logger');
const log = new Logger('RtmpStreamer'); const log = new Logger('RtmpStreamer');

عرض الملف

@@ -1,8 +1,9 @@
'use strict'; 'use strict';
const config = require('./config');
const ffmpegPath = config.server.rtmp && config.server.rtmp.ffmpeg ? config.server.rtmp.ffmpeg : '/usr/bin/ffmpeg';
const ffmpeg = require('fluent-ffmpeg'); const ffmpeg = require('fluent-ffmpeg');
const ffmpegInstaller = require('@ffmpeg-installer/ffmpeg'); ffmpeg.setFfmpegPath(ffmpegPath);
ffmpeg.setFfmpegPath(ffmpegInstaller.path);
const Logger = require('./Logger'); const Logger = require('./Logger');
const log = new Logger('RtmpUrl'); const log = new Logger('RtmpUrl');

عرض الملف

@@ -44,7 +44,7 @@ dependencies: {
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon * @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 * @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com * @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.4.76 * @version 1.4.77
* *
*/ */

عرض الملف

@@ -76,6 +76,7 @@ module.exports = {
- apiSecret: The API secret for streaming WebRTC to RTMP through the MiroTalk API. - apiSecret: The API secret for streaming WebRTC to RTMP through the MiroTalk API.
- expirationHours: The number of hours before the RTMP URL expires. Default is 4 hours. - expirationHours: The number of hours before the RTMP URL expires. Default is 4 hours.
- dir: Directory where your video files are stored to be streamed via RTMP. - dir: Directory where your video files are stored to be streamed via RTMP.
- ffmpeg: Path of the ffmpeg installation on the system (which ffmpeg)
Important: Ensure your RTMP server is operational before proceeding. You can start the server by running the following command: Important: Ensure your RTMP server is operational before proceeding. You can start the server by running the following command:
- Start: npm run nms-start - Start the RTMP server. - Start: npm run nms-start - Start the RTMP server.
@@ -94,6 +95,7 @@ module.exports = {
apiSecret: 'mirotalkRtmpApiSecret', apiSecret: 'mirotalkRtmpApiSecret',
expirationHours: 4, expirationHours: 4,
dir: 'rtmp', dir: 'rtmp',
ffmpeg: '/usr/bin/ffmpeg',
}, },
}, },
middleware: { middleware: {

عرض الملف

@@ -1,6 +1,6 @@
{ {
"name": "mirotalksfu", "name": "mirotalksfu",
"version": "1.4.76", "version": "1.4.77",
"description": "WebRTC SFU browser-based video calls", "description": "WebRTC SFU browser-based video calls",
"main": "Server.js", "main": "Server.js",
"scripts": { "scripts": {
@@ -55,7 +55,6 @@
"node": ">=18" "node": ">=18"
}, },
"dependencies": { "dependencies": {
"@ffmpeg-installer/ffmpeg": "^1.1.0",
"@sentry/integrations": "7.114.0", "@sentry/integrations": "7.114.0",
"@sentry/node": "7.114.0", "@sentry/node": "7.114.0",
"axios": "^1.7.2", "axios": "^1.7.2",

عرض الملف

@@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon * @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 * @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com * @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.4.76 * @version 1.4.77
* *
*/ */
@@ -4032,7 +4032,7 @@ function showAbout() {
imageUrl: image.about, imageUrl: image.about,
customClass: { image: 'img-about' }, customClass: { image: 'img-about' },
position: 'center', position: 'center',
title: 'WebRTC SFU v1.4.76', title: 'WebRTC SFU v1.4.77',
html: ` html: `
<br /> <br />
<div id="about"> <div id="about">

عرض الملف

@@ -9,7 +9,7 @@
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon * @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 * @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com * @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.4.76 * @version 1.4.77
* *
*/ */