This commit is contained in:
legop3
2025-11-27 22:56:02 -05:00
parent f9b95c078a
commit fb7b0be305
2 changed files with 8 additions and 1 deletions
+2 -1
View File
@@ -23,7 +23,8 @@ function stopBridge(rawName) {
function startBridge(rawName, baseName) { function startBridge(rawName, baseName) {
if (bridges.has(rawName)) return; if (bridges.has(rawName)) return;
const inputUrl = `srt://${SRT_HOST}:9000?streamid=#!::r=${rawName},m=request&mode=caller&transtype=live&latency=20`; // Use explicit credentials so mediamtx auth will allow the bridge to pull.
const inputUrl = `srt://${SRT_HOST}:9000?streamid=#!::r=${rawName},m=request&mode=caller&transtype=live&latency=20&u=bridge&p=bridge`;
const outputUrl = `srt://${SRT_HOST}:9000?streamid=#!::r=${baseName},m=publish&mode=caller&transtype=live&pkt_size=1316`; const outputUrl = `srt://${SRT_HOST}:9000?streamid=#!::r=${baseName},m=publish&mode=caller&transtype=live&pkt_size=1316`;
const args = [ const args = [
+6
View File
@@ -73,6 +73,12 @@ app.post('/mediamtx/auth', (req, res) => {
const path = (body.path || '').replace(/^\//, ''); const path = (body.path || '').replace(/^\//, '');
const sessionId = body.user; const sessionId = body.user;
const streamInfo = extractStreamInfo(path); const streamInfo = extractStreamInfo(path);
// Allow internal bridge (server-side audio transcode) to pull/push without a websocket session.
if (body.user === 'bridge' && body.pass === 'bridge') {
return res.status(200).end();
}
logger.info('video auth request', { path: body.path, sessionId, stream: streamInfo }); logger.info('video auth request', { path: body.path, sessionId, stream: streamInfo });
if (!sessionId || !streamInfo?.id) { if (!sessionId || !streamInfo?.id) {