From af8abb6072a21c72bfbfd2335794812df5f2cad1 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Fri, 9 Jan 2026 12:45:48 -0800 Subject: [PATCH] rebroadcast: publish rtmp support beta --- plugins/prebuffer-mixin/package-lock.json | 4 +-- plugins/prebuffer-mixin/package.json | 2 +- plugins/prebuffer-mixin/src/main.ts | 32 +++++++++++++++-------- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/plugins/prebuffer-mixin/package-lock.json b/plugins/prebuffer-mixin/package-lock.json index 8b66dbaa4..2886f8fe9 100644 --- a/plugins/prebuffer-mixin/package-lock.json +++ b/plugins/prebuffer-mixin/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/prebuffer-mixin", - "version": "0.10.63", + "version": "0.10.64", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/prebuffer-mixin", - "version": "0.10.63", + "version": "0.10.64", "license": "Apache-2.0", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/prebuffer-mixin/package.json b/plugins/prebuffer-mixin/package.json index d3d11fc03..85475d80c 100644 --- a/plugins/prebuffer-mixin/package.json +++ b/plugins/prebuffer-mixin/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/prebuffer-mixin", - "version": "0.10.63", + "version": "0.10.64", "description": "Video Stream Rebroadcast, Prebuffer, and Management Plugin for Scrypted.", "author": "Scrypted", "license": "Apache-2.0", diff --git a/plugins/prebuffer-mixin/src/main.ts b/plugins/prebuffer-mixin/src/main.ts index 15ecaeef9..268bbbb17 100644 --- a/plugins/prebuffer-mixin/src/main.ts +++ b/plugins/prebuffer-mixin/src/main.ts @@ -351,6 +351,20 @@ class PrebufferSession { const currentParser = parser.isDefault ? STRING_DEFAULT : parser.parser; + const choices = this.canUseRtmpParser(this.advertisedMediaStreamOptions) + ? [ + STRING_DEFAULT, + SCRYPTED_PARSER_TCP, + FFMPEG_PARSER_TCP, + ] + : [ + STRING_DEFAULT, + SCRYPTED_PARSER_TCP, + SCRYPTED_PARSER_UDP, + FFMPEG_PARSER_TCP, + FFMPEG_PARSER_UDP, + ] + settings.push( { key: this.rtspParserKey, @@ -359,13 +373,7 @@ class PrebufferSession { title: 'RTSP Parser', description: `The RTSP Parser used to read the stream. The default is "${defaultValue}" for this stream.`, value: currentParser, - choices: [ - STRING_DEFAULT, - SCRYPTED_PARSER_TCP, - SCRYPTED_PARSER_UDP, - FFMPEG_PARSER_TCP, - FFMPEG_PARSER_UDP, - ], + choices, } ); @@ -585,10 +593,12 @@ class PrebufferSession { acodec = audioSoftMuted ? acodec : ['-acodec', 'copy']; - if (parser === FFMPEG_PARSER_UDP) - ffmpegInput.inputArguments = ['-rtsp_transport', 'udp', '-i', ffmpegInput.url]; - else if (parser === FFMPEG_PARSER_TCP) - ffmpegInput.inputArguments = ['-rtsp_transport', 'tcp', '-i', ffmpegInput.url]; + if (!this.canUseRtmpParser(mso)) { + if (parser === FFMPEG_PARSER_UDP) + ffmpegInput.inputArguments = ['-rtsp_transport', 'udp', '-i', ffmpegInput.url]; + else if (parser === FFMPEG_PARSER_TCP) + ffmpegInput.inputArguments = ['-rtsp_transport', 'tcp', '-i', ffmpegInput.url]; + } // create missing pts from dts so mpegts and mp4 muxing does not fail const userInputArguments = this.storage.getItem(this.ffmpegInputArgumentsKey); const extraInputArguments = userInputArguments || DEFAULT_FFMPEG_INPUT_ARGUMENTS;