You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var nms = new NodeMediaServer(config);
nms.run();`
cmd:
2024/12/31 14:33:29 9792 [INFO] Node Media Server v2.7.4
2024/12/31 14:33:29 9792 [INFO] Node Media Rtmp Server started on port: 1935
2024/12/31 14:33:29 9792 [INFO] Node Media Http Server started on port: 8000
2024/12/31 14:33:29 9792 [INFO] Node Media WebSocket Server started on port: 8000
2024/12/31 14:33:29 9792 [ERROR] uncaughtException ReferenceError: version is not defined
at NodeTransServer.run (C:\Users\adian\Desktop\rtmp\node_modules\node-media-server\src\node_trans_server.js:45:132)
at NodeMediaServer.run (C:\Users\adian\Desktop\rtmp\node_modules\node-media-server\src\node_media_server.js:40:18)
at Object. (C:\Users\adian\Desktop\rtmp\app.js:27:5)
at Module._compile (node:internal/modules/cjs/loader:1196:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
at Module.load (node:internal/modules/cjs/loader:1074:32)
at Function.Module._load (node:internal/modules/cjs/loader:909:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47
The text was updated successfully, but these errors were encountered:
能正常运行,但是不知道为什么会报错
`const NodeMediaServer = require('node-media-server');
const config = {
rtmp: {
port: 1935,
chunk_size: 60000,
gop_cache: true,
ping: 60,
ping_timeout: 30
},
http: {
port: 8000,
allow_origin: '*',
mediaroot: './media',
},
trans: {
ffmpeg: 'D:/ffmpeg-7.0.2-essentials_build/bin/ffmpeg.exe',
tasks: [{
app: 'live',
mp4: true,
mp4Flags: '[movflags=frag_keyframe+empty_moov]',
}]
}
};
var nms = new NodeMediaServer(config);
nms.run();`
cmd:
2024/12/31 14:33:29 9792 [INFO] Node Media Server v2.7.4
2024/12/31 14:33:29 9792 [INFO] Node Media Rtmp Server started on port: 1935
2024/12/31 14:33:29 9792 [INFO] Node Media Http Server started on port: 8000
2024/12/31 14:33:29 9792 [INFO] Node Media WebSocket Server started on port: 8000
2024/12/31 14:33:29 9792 [ERROR] uncaughtException ReferenceError: version is not defined
at NodeTransServer.run (C:\Users\adian\Desktop\rtmp\node_modules\node-media-server\src\node_trans_server.js:45:132)
at NodeMediaServer.run (C:\Users\adian\Desktop\rtmp\node_modules\node-media-server\src\node_media_server.js:40:18)
at Object. (C:\Users\adian\Desktop\rtmp\app.js:27:5)
at Module._compile (node:internal/modules/cjs/loader:1196:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
at Module.load (node:internal/modules/cjs/loader:1074:32)
at Function.Module._load (node:internal/modules/cjs/loader:909:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47
The text was updated successfully, but these errors were encountered: