1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Support RTMPS

This commit is contained in:
Chocobozzz 2021-11-05 11:36:03 +01:00
parent 8dd754c767
commit df1db951c5
No known key found for this signature in database
GPG key ID: 583A612D890159BE
20 changed files with 343 additions and 51 deletions

View file

@ -219,7 +219,7 @@ async function transcode (options: TranscodeOptions) {
// ---------------------------------------------------------------------------
async function getLiveTranscodingCommand (options: {
rtmpUrl: string
inputUrl: string
outPath: string
masterPlaylistName: string
@ -234,10 +234,9 @@ async function getLiveTranscodingCommand (options: {
availableEncoders: AvailableEncoders
profile: string
}) {
const { rtmpUrl, outPath, resolutions, fps, bitrate, availableEncoders, profile, masterPlaylistName, ratio } = options
const input = rtmpUrl
const { inputUrl, outPath, resolutions, fps, bitrate, availableEncoders, profile, masterPlaylistName, ratio } = options
const command = getFFmpeg(input, 'live')
const command = getFFmpeg(inputUrl, 'live')
const varStreamMap: string[] = []
@ -259,7 +258,7 @@ async function getLiveTranscodingCommand (options: {
const resolutionFPS = computeFPS(fps, resolution)
const baseEncoderBuilderParams = {
input,
input: inputUrl,
availableEncoders,
profile,
@ -327,8 +326,8 @@ async function getLiveTranscodingCommand (options: {
return command
}
function getLiveMuxingCommand (rtmpUrl: string, outPath: string, masterPlaylistName: string) {
const command = getFFmpeg(rtmpUrl, 'live')
function getLiveMuxingCommand (inputUrl: string, outPath: string, masterPlaylistName: string) {
const command = getFFmpeg(inputUrl, 'live')
command.outputOption('-c:v copy')
command.outputOption('-c:a copy')