[mirotalksfu] - update config & env template
هذا الالتزام موجود في:
@@ -64,7 +64,7 @@ RTMP_FROM_STREAM=true # Enable live stream (camera,
|
|||||||
RTMP_MAX_STREAMS=1 # Max simultaneous RTMP streams
|
RTMP_MAX_STREAMS=1 # Max simultaneous RTMP streams
|
||||||
RTMP_USE_NODE_MEDIA_SERVER=true # Use Node Media Server mirotalk-nms Docker image
|
RTMP_USE_NODE_MEDIA_SERVER=true # Use Node Media Server mirotalk-nms Docker image
|
||||||
RTMP_SERVER=rtmp://localhost:1935 # RTMP server URL
|
RTMP_SERVER=rtmp://localhost:1935 # RTMP server URL
|
||||||
RTMP_APP_NAME=mirotalk # RTMP application name
|
RTMP_APP_NAME=live # RTMP application name
|
||||||
RTMP_STREAM_KEY= # RTMP stream key (optional)
|
RTMP_STREAM_KEY= # RTMP stream key (optional)
|
||||||
RTMP_SECRET=mirotalkRtmpSecret # RTMP API secret (Must match node-media-server config.js)
|
RTMP_SECRET=mirotalkRtmpSecret # RTMP API secret (Must match node-media-server config.js)
|
||||||
RTMP_API_SECRET=mirotalkRtmpApiSecret # RTMP internal secret
|
RTMP_API_SECRET=mirotalkRtmpApiSecret # RTMP internal secret
|
||||||
|
|||||||
@@ -180,50 +180,59 @@ module.exports = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* RTMP Configuration
|
* RTMP Configuration
|
||||||
* ========================
|
* =================
|
||||||
* Real-Time Messaging Protocol for audio/video/data streaming
|
* Configures Real-Time Messaging Protocol (RTMP) for audio/video/data streaming.
|
||||||
*
|
*
|
||||||
* Core Settings:
|
* Core Settings
|
||||||
* ------------------------
|
* ------------
|
||||||
* - enabled: Enable RTMP streaming
|
* - enabled : Enable/disable RTMP streaming (default: false)
|
||||||
* - fromFile: Local file streaming [true/false] (default: true)
|
* - fromFile : Enable local file streaming (default: true)
|
||||||
* - fromUrl: URL streaming [true/false] (default: true)
|
* - fromUrl : Enable URL streaming (default: true)
|
||||||
* - fromStream: Live stream input [true/false] (default: true)
|
* - fromStream : Enable live stream input (default: true)
|
||||||
* - maxStreams: Max simultaneous streams (default: 1)
|
* - maxStreams : Maximum simultaneous streams (default: 1)
|
||||||
* - useNodeMediaServer: Use node-media-server (mirotalk-nms) instead of ngnix-rtmp (mirotalk-rtmp) [true/false] (default true)
|
* - useNodeMediaServer : Use NodeMediaServer instead of nginx-rtmp (default: true)
|
||||||
* - server: RTMP server URL
|
* - server : RTMP server URL (default: 'rtmp://localhost:1935')
|
||||||
* - appName: Application name for RTMP (for mirotalk/rtmp docker image add it in the nginx.conf)
|
* - appName : Application name (default: 'live')
|
||||||
* - streamKey: Optional authentication key
|
* - streamKey : Optional authentication key (auto-generated UUID if empty)
|
||||||
* - secret: Must match node-media-server config.js
|
* - secret : Must match NodeMediaServer's config.js (default: 'mirotalkRtmpSecret')
|
||||||
* - apiSecret: WebRTC → RTMP API secret
|
* - apiSecret : WebRTC→RTMP API secret (default: 'mirotalkRtmpApiSecret')
|
||||||
* - expirationHours: Stream URL expiry in hours (default: 4)
|
* - expirationHours : Stream URL expiry in hours (default: 4)
|
||||||
* - dir: Directory for video files (default app/rtmp)
|
* - dir : Video storage directory (default: 'app/rtmp')
|
||||||
* - ffmpegPatch: FFmpeg binary path (autodetected)
|
* - ffmpegPath : FFmpeg binary path (auto-detected)
|
||||||
* - platform: current platform (autodetected)
|
* - platform : Current OS platform (auto-detected)
|
||||||
*
|
*
|
||||||
* RTMP Node Media Server Management:
|
* Server Management
|
||||||
* ------------------------
|
* ----------------
|
||||||
* - Image: mirotalk/nms:latest
|
* NodeMediaServer (mirotalk/nms:latest):
|
||||||
* - Start: npm run nms-start
|
* - Start: npm run nms-start
|
||||||
* - Stop: npm run nms-stop
|
* - Stop: npm run nms-stop
|
||||||
* - Logs: npm run nms-logs
|
* - Logs: npm run nms-logs
|
||||||
*
|
*
|
||||||
* RTMP Nginx Server Management:
|
* NGINX-RTMP (mirotalk/rtmp:latest):
|
||||||
* ------------------------
|
* - Start: npm run rtmp-start
|
||||||
* - Image: mirotalk/rtmp:latest
|
* - Stop: npm run rtmp-stop
|
||||||
* - Start: npm run rtmp-start
|
* - Logs: npm run rtmp-logs
|
||||||
* - Stop: npm run rtmp-stop
|
|
||||||
* - Logs: npm run rtmp-logs
|
|
||||||
*
|
*
|
||||||
* Important:
|
* Implementation Notes:
|
||||||
* ------------------------
|
* --------------------
|
||||||
* - RTMP server must be running (npm run nms-start)
|
* 1. For NodeMediaServer:
|
||||||
* - Requires open port 1935
|
* - Mandatory values: appName (falls back to 'live'), streamKey (auto-generated)
|
||||||
|
* - URL format: rtmp://host:port/appName/streamKey?sign=expiration-token
|
||||||
|
*
|
||||||
|
* 2. Default Behavior:
|
||||||
|
* - If server URL is empty, uses localhost:1935
|
||||||
|
* - If no streamKey provided, generates UUIDv4
|
||||||
|
* - When useNodeMediaServer=true, generates signed URLs with expiration
|
||||||
|
*
|
||||||
|
* Requirements:
|
||||||
|
* -------------
|
||||||
|
* - RTMP server must be running
|
||||||
|
* - Port 1935 must be accessible
|
||||||
* - FFmpeg must be installed
|
* - FFmpeg must be installed
|
||||||
*
|
*
|
||||||
* Documentation:
|
* Documentation:
|
||||||
* ------------------------
|
* --------------
|
||||||
* - Docs: https://docs.mirotalk.com/mirotalk-sfu/rtmp/
|
* - https://docs.mirotalk.com/mirotalk-sfu/rtmp/
|
||||||
*/
|
*/
|
||||||
rtmp: {
|
rtmp: {
|
||||||
enabled: process.env.RTMP_ENABLED === 'true',
|
enabled: process.env.RTMP_ENABLED === 'true',
|
||||||
@@ -233,7 +242,7 @@ module.exports = {
|
|||||||
maxStreams: parseInt(process.env.RTMP_MAX_STREAMS) || 1,
|
maxStreams: parseInt(process.env.RTMP_MAX_STREAMS) || 1,
|
||||||
useNodeMediaServer: process.env.RTMP_USE_NODE_MEDIA_SERVER !== 'false',
|
useNodeMediaServer: process.env.RTMP_USE_NODE_MEDIA_SERVER !== 'false',
|
||||||
server: process.env.RTMP_SERVER || 'rtmp://localhost:1935',
|
server: process.env.RTMP_SERVER || 'rtmp://localhost:1935',
|
||||||
appName: process.env.RTMP_APP_NAME || 'mirotalk',
|
appName: process.env.RTMP_APP_NAME || 'live',
|
||||||
streamKey: process.env.RTMP_STREAM_KEY || '',
|
streamKey: process.env.RTMP_STREAM_KEY || '',
|
||||||
secret: process.env.RTMP_SECRET || 'mirotalkRtmpSecret',
|
secret: process.env.RTMP_SECRET || 'mirotalkRtmpSecret',
|
||||||
apiSecret: process.env.RTMP_API_SECRET || 'mirotalkRtmpApiSecret',
|
apiSecret: process.env.RTMP_API_SECRET || 'mirotalkRtmpApiSecret',
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم