diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-05 11:36:03 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-05 11:38:17 +0100 |
commit | df1db951c512a58110171d046ef367789df02733 (patch) | |
tree | a8894b4a4864d9e378923f011b4ca9d206e2ee0b /server/helpers/ffmpeg-utils.ts | |
parent | 8dd754c76735417305c4b68e2ada6f623e9d7650 (diff) | |
download | PeerTube-df1db951c512a58110171d046ef367789df02733.tar.gz PeerTube-df1db951c512a58110171d046ef367789df02733.tar.zst PeerTube-df1db951c512a58110171d046ef367789df02733.zip |
Support RTMPS
Diffstat (limited to 'server/helpers/ffmpeg-utils.ts')
-rw-r--r-- | server/helpers/ffmpeg-utils.ts | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts index 54fd031b7..ec24f357b 100644 --- a/server/helpers/ffmpeg-utils.ts +++ b/server/helpers/ffmpeg-utils.ts | |||
@@ -219,7 +219,7 @@ async function transcode (options: TranscodeOptions) { | |||
219 | // --------------------------------------------------------------------------- | 219 | // --------------------------------------------------------------------------- |
220 | 220 | ||
221 | async function getLiveTranscodingCommand (options: { | 221 | async function getLiveTranscodingCommand (options: { |
222 | rtmpUrl: string | 222 | inputUrl: string |
223 | 223 | ||
224 | outPath: string | 224 | outPath: string |
225 | masterPlaylistName: string | 225 | masterPlaylistName: string |
@@ -234,10 +234,9 @@ async function getLiveTranscodingCommand (options: { | |||
234 | availableEncoders: AvailableEncoders | 234 | availableEncoders: AvailableEncoders |
235 | profile: string | 235 | profile: string |
236 | }) { | 236 | }) { |
237 | const { rtmpUrl, outPath, resolutions, fps, bitrate, availableEncoders, profile, masterPlaylistName, ratio } = options | 237 | const { inputUrl, outPath, resolutions, fps, bitrate, availableEncoders, profile, masterPlaylistName, ratio } = options |
238 | const input = rtmpUrl | ||
239 | 238 | ||
240 | const command = getFFmpeg(input, 'live') | 239 | const command = getFFmpeg(inputUrl, 'live') |
241 | 240 | ||
242 | const varStreamMap: string[] = [] | 241 | const varStreamMap: string[] = [] |
243 | 242 | ||
@@ -259,7 +258,7 @@ async function getLiveTranscodingCommand (options: { | |||
259 | const resolutionFPS = computeFPS(fps, resolution) | 258 | const resolutionFPS = computeFPS(fps, resolution) |
260 | 259 | ||
261 | const baseEncoderBuilderParams = { | 260 | const baseEncoderBuilderParams = { |
262 | input, | 261 | input: inputUrl, |
263 | 262 | ||
264 | availableEncoders, | 263 | availableEncoders, |
265 | profile, | 264 | profile, |
@@ -327,8 +326,8 @@ async function getLiveTranscodingCommand (options: { | |||
327 | return command | 326 | return command |
328 | } | 327 | } |
329 | 328 | ||
330 | function getLiveMuxingCommand (rtmpUrl: string, outPath: string, masterPlaylistName: string) { | 329 | function getLiveMuxingCommand (inputUrl: string, outPath: string, masterPlaylistName: string) { |
331 | const command = getFFmpeg(rtmpUrl, 'live') | 330 | const command = getFFmpeg(inputUrl, 'live') |
332 | 331 | ||
333 | command.outputOption('-c:v copy') | 332 | command.outputOption('-c:v copy') |
334 | command.outputOption('-c:a copy') | 333 | command.outputOption('-c:a copy') |