aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/live/shared/transcoding-wrapper
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-16 09:12:50 +0200
committerChocobozzz <me@florianbigard.com>2023-05-16 09:12:50 +0200
commit287057050526e1f474c4f4d5d9a7ef3b7c677f2f (patch)
tree09fc9e4879617973b78534252ab601f4aeb9a242 /server/lib/live/shared/transcoding-wrapper
parentb30ad9888f54e6b55f3b6ca6e73534227d4d401e (diff)
downloadPeerTube-287057050526e1f474c4f4d5d9a7ef3b7c677f2f.tar.gz
PeerTube-287057050526e1f474c4f4d5d9a7ef3b7c677f2f.tar.zst
PeerTube-287057050526e1f474c4f4d5d9a7ef3b7c677f2f.zip
Provide public RTMP URL to runners
Diffstat (limited to 'server/lib/live/shared/transcoding-wrapper')
-rw-r--r--server/lib/live/shared/transcoding-wrapper/abstract-transcoding-wrapper.ts12
-rw-r--r--server/lib/live/shared/transcoding-wrapper/ffmpeg-transcoding-wrapper.ts4
-rw-r--r--server/lib/live/shared/transcoding-wrapper/remote-transcoding-wrapper.ts2
3 files changed, 12 insertions, 6 deletions
diff --git a/server/lib/live/shared/transcoding-wrapper/abstract-transcoding-wrapper.ts b/server/lib/live/shared/transcoding-wrapper/abstract-transcoding-wrapper.ts
index 226ba4573..ee61d7690 100644
--- a/server/lib/live/shared/transcoding-wrapper/abstract-transcoding-wrapper.ts
+++ b/server/lib/live/shared/transcoding-wrapper/abstract-transcoding-wrapper.ts
@@ -25,7 +25,9 @@ interface AbstractTranscodingWrapperOptions {
25 25
26 lTags: LoggerTagsFn 26 lTags: LoggerTagsFn
27 27
28 inputUrl: string 28 inputLocalUrl: string
29 inputPublicUrl: string
30
29 fps: number 31 fps: number
30 toTranscode: { 32 toTranscode: {
31 resolution: number 33 resolution: number
@@ -50,7 +52,9 @@ abstract class AbstractTranscodingWrapper extends EventEmitter {
50 fps: number 52 fps: number
51 }[] 53 }[]
52 54
53 protected readonly inputUrl: string 55 protected readonly inputLocalUrl: string
56 protected readonly inputPublicUrl: string
57
54 protected readonly fps: number 58 protected readonly fps: number
55 protected readonly bitrate: number 59 protected readonly bitrate: number
56 protected readonly ratio: number 60 protected readonly ratio: number
@@ -76,7 +80,9 @@ abstract class AbstractTranscodingWrapper extends EventEmitter {
76 this.videoUUID = options.videoLive.Video.uuid 80 this.videoUUID = options.videoLive.Video.uuid
77 this.streamingPlaylist = options.streamingPlaylist 81 this.streamingPlaylist = options.streamingPlaylist
78 82
79 this.inputUrl = options.inputUrl 83 this.inputLocalUrl = options.inputLocalUrl
84 this.inputPublicUrl = options.inputPublicUrl
85
80 this.fps = options.fps 86 this.fps = options.fps
81 this.toTranscode = options.toTranscode 87 this.toTranscode = options.toTranscode
82 88
diff --git a/server/lib/live/shared/transcoding-wrapper/ffmpeg-transcoding-wrapper.ts b/server/lib/live/shared/transcoding-wrapper/ffmpeg-transcoding-wrapper.ts
index 1f4c12bd4..c82970b88 100644
--- a/server/lib/live/shared/transcoding-wrapper/ffmpeg-transcoding-wrapper.ts
+++ b/server/lib/live/shared/transcoding-wrapper/ffmpeg-transcoding-wrapper.ts
@@ -15,7 +15,7 @@ export class FFmpegTranscodingWrapper extends AbstractTranscodingWrapper {
15 async run () { 15 async run () {
16 this.ffmpegCommand = CONFIG.LIVE.TRANSCODING.ENABLED 16 this.ffmpegCommand = CONFIG.LIVE.TRANSCODING.ENABLED
17 ? await this.buildFFmpegLive().getLiveTranscodingCommand({ 17 ? await this.buildFFmpegLive().getLiveTranscodingCommand({
18 inputUrl: this.inputUrl, 18 inputUrl: this.inputLocalUrl,
19 19
20 outPath: this.outDirectory, 20 outPath: this.outDirectory,
21 masterPlaylistName: this.streamingPlaylist.playlistFilename, 21 masterPlaylistName: this.streamingPlaylist.playlistFilename,
@@ -31,7 +31,7 @@ export class FFmpegTranscodingWrapper extends AbstractTranscodingWrapper {
31 hasAudio: this.hasAudio 31 hasAudio: this.hasAudio
32 }) 32 })
33 : this.buildFFmpegLive().getLiveMuxingCommand({ 33 : this.buildFFmpegLive().getLiveMuxingCommand({
34 inputUrl: this.inputUrl, 34 inputUrl: this.inputLocalUrl,
35 outPath: this.outDirectory, 35 outPath: this.outDirectory,
36 36
37 masterPlaylistName: this.streamingPlaylist.playlistFilename, 37 masterPlaylistName: this.streamingPlaylist.playlistFilename,
diff --git a/server/lib/live/shared/transcoding-wrapper/remote-transcoding-wrapper.ts b/server/lib/live/shared/transcoding-wrapper/remote-transcoding-wrapper.ts
index 345eaf442..6770a5e6f 100644
--- a/server/lib/live/shared/transcoding-wrapper/remote-transcoding-wrapper.ts
+++ b/server/lib/live/shared/transcoding-wrapper/remote-transcoding-wrapper.ts
@@ -4,7 +4,7 @@ import { AbstractTranscodingWrapper } from './abstract-transcoding-wrapper'
4export class RemoteTranscodingWrapper extends AbstractTranscodingWrapper { 4export class RemoteTranscodingWrapper extends AbstractTranscodingWrapper {
5 async run () { 5 async run () {
6 await new LiveRTMPHLSTranscodingJobHandler().create({ 6 await new LiveRTMPHLSTranscodingJobHandler().create({
7 rtmpUrl: this.inputUrl, 7 rtmpUrl: this.inputPublicUrl,
8 toTranscode: this.toTranscode, 8 toTranscode: this.toTranscode,
9 video: this.videoLive.Video, 9 video: this.videoLive.Video,
10 outputDirectory: this.outDirectory, 10 outputDirectory: this.outDirectory,