Fix HLS audio only transcoding

pull/2737/head
Chocobozzz 2020-05-05 16:27:46 +02:00
parent 7139845894
commit 1c32067367
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 3 additions and 1 deletions

View File

@ -423,6 +423,7 @@ async function buildHLSCommand (command: ffmpeg.FfmpegCommand, options: HLSTrans
const videoPath = getHLSVideoPath(options) const videoPath = getHLSVideoPath(options)
if (options.copyCodecs) command = presetCopy(command) if (options.copyCodecs) command = presetCopy(command)
else if (options.resolution === VideoResolution.H_NOVIDEO) command = presetOnlyAudio(command)
else command = await buildx264Command(command, options) else command = await buildx264Command(command, options)
command = command.outputOption('-hls_time 4') command = command.outputOption('-hls_time 4')

View File

@ -92,6 +92,7 @@ async function onVideoFileOptimizerSuccess (videoArg: MVideoWithFile, payload: O
let videoPublished = false let videoPublished = false
// Generate HLS version of the max quality file
const hlsPayload = Object.assign({}, payload, { resolution: videoDatabase.getMaxQualityFile().resolution }) const hlsPayload = Object.assign({}, payload, { resolution: videoDatabase.getMaxQualityFile().resolution })
await createHlsJobIfEnabled(hlsPayload) await createHlsJobIfEnabled(hlsPayload)

View File

@ -230,7 +230,7 @@ export class VideoPlaylistModel extends Model<VideoPlaylistModel> {
@AllowNull(true) @AllowNull(true)
@Is('VideoPlaylistDescription', value => throwIfNotValid(value, isVideoPlaylistDescriptionValid, 'description', true)) @Is('VideoPlaylistDescription', value => throwIfNotValid(value, isVideoPlaylistDescriptionValid, 'description', true))
@Column @Column(DataType.STRING(CONSTRAINTS_FIELDS.VIDEO_PLAYLISTS.DESCRIPTION.max))
description: string description: string
@AllowNull(false) @AllowNull(false)