aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-05 16:27:46 +0200
committerChocobozzz <me@florianbigard.com>2020-05-05 16:27:46 +0200
commit1c3206736743646d41a667c03f3e499cc3e3373f (patch)
tree688fe935a0cdf6892b3f5211a950bc440fa2ccb1 /server
parent7139845894ae24af397989f85350471cc5b91e2a (diff)
downloadPeerTube-1c3206736743646d41a667c03f3e499cc3e3373f.tar.gz
PeerTube-1c3206736743646d41a667c03f3e499cc3e3373f.tar.zst
PeerTube-1c3206736743646d41a667c03f3e499cc3e3373f.zip
Fix HLS audio only transcoding
Diffstat (limited to 'server')
-rw-r--r--server/helpers/ffmpeg-utils.ts1
-rw-r--r--server/lib/job-queue/handlers/video-transcoding.ts1
-rw-r--r--server/models/video/video-playlist.ts2
3 files changed, 3 insertions, 1 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index 9dac4448e..557fb5e3a 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -423,6 +423,7 @@ async function buildHLSCommand (command: ffmpeg.FfmpegCommand, options: HLSTrans
423 const videoPath = getHLSVideoPath(options) 423 const videoPath = getHLSVideoPath(options)
424 424
425 if (options.copyCodecs) command = presetCopy(command) 425 if (options.copyCodecs) command = presetCopy(command)
426 else if (options.resolution === VideoResolution.H_NOVIDEO) command = presetOnlyAudio(command)
426 else command = await buildx264Command(command, options) 427 else command = await buildx264Command(command, options)
427 428
428 command = command.outputOption('-hls_time 4') 429 command = command.outputOption('-hls_time 4')
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts
index 46add57d4..04aac515f 100644
--- a/server/lib/job-queue/handlers/video-transcoding.ts
+++ b/server/lib/job-queue/handlers/video-transcoding.ts
@@ -92,6 +92,7 @@ async function onVideoFileOptimizerSuccess (videoArg: MVideoWithFile, payload: O
92 92
93 let videoPublished = false 93 let videoPublished = false
94 94
95 // Generate HLS version of the max quality file
95 const hlsPayload = Object.assign({}, payload, { resolution: videoDatabase.getMaxQualityFile().resolution }) 96 const hlsPayload = Object.assign({}, payload, { resolution: videoDatabase.getMaxQualityFile().resolution })
96 await createHlsJobIfEnabled(hlsPayload) 97 await createHlsJobIfEnabled(hlsPayload)
97 98
diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts
index b17fd1060..b9b95e067 100644
--- a/server/models/video/video-playlist.ts
+++ b/server/models/video/video-playlist.ts
@@ -230,7 +230,7 @@ export class VideoPlaylistModel extends Model<VideoPlaylistModel> {
230 230
231 @AllowNull(true) 231 @AllowNull(true)
232 @Is('VideoPlaylistDescription', value => throwIfNotValid(value, isVideoPlaylistDescriptionValid, 'description', true)) 232 @Is('VideoPlaylistDescription', value => throwIfNotValid(value, isVideoPlaylistDescriptionValid, 'description', true))
233 @Column 233 @Column(DataType.STRING(CONSTRAINTS_FIELDS.VIDEO_PLAYLISTS.DESCRIPTION.max))
234 description: string 234 description: string
235 235
236 @AllowNull(false) 236 @AllowNull(false)