Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix HLS audio only transcoding

Chocobozzz1c3206736743
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index 9dac4448ec..557fb5e3aa 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
const videoPath = getHLSVideoPath(options)
if (options.copyCodecs) command = presetCopy(command)
+ else if (options.resolution === VideoResolution.H_NOVIDEO) command = presetOnlyAudio(command)
else command = await buildx264Command(command, options)
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 46add57d49..04aac515f6 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
let videoPublished = false
+ // Generate HLS version of the max quality file
const hlsPayload = Object.assign({}, payload, { resolution: videoDatabase.getMaxQualityFile().resolution })
await createHlsJobIfEnabled(hlsPayload)
diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts
index b17fd10601..b9b95e0671 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> {
@AllowNull(true)
@Is('VideoPlaylistDescription', value => throwIfNotValid(value, isVideoPlaylistDescriptionValid, 'description', true))
- @Column
+ @Column(DataType.STRING(CONSTRAINTS_FIELDS.VIDEO_PLAYLISTS.DESCRIPTION.max))
description: string
@AllowNull(false)