aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/ffmpeg-utils.ts15
-rw-r--r--server/helpers/image-utils.ts2
2 files changed, 16 insertions, 1 deletions
diff --git a/server/helpers/ffmpeg-utils.ts b/server/helpers/ffmpeg-utils.ts
index b25dcaa90..2f167a580 100644
--- a/server/helpers/ffmpeg-utils.ts
+++ b/server/helpers/ffmpeg-utils.ts
@@ -424,6 +424,20 @@ function runLiveMuxing (rtmpUrl: string, outPath: string, deleteSegments: boolea
424 return command 424 return command
425} 425}
426 426
427function hlsPlaylistToFragmentedMP4 (playlistPath: string, outputPath: string) {
428 const command = getFFmpeg(playlistPath)
429
430 command.outputOption('-c copy')
431 command.output(outputPath)
432
433 command.run()
434
435 return new Promise<string>((res, rej) => {
436 command.on('error', err => rej(err))
437 command.on('end', () => res())
438 })
439}
440
427// --------------------------------------------------------------------------- 441// ---------------------------------------------------------------------------
428 442
429export { 443export {
@@ -443,6 +457,7 @@ export {
443 getVideoFileFPS, 457 getVideoFileFPS,
444 computeResolutionsToTranscode, 458 computeResolutionsToTranscode,
445 audio, 459 audio,
460 hlsPlaylistToFragmentedMP4,
446 getVideoFileBitrate, 461 getVideoFileBitrate,
447 canDoQuickTranscode 462 canDoQuickTranscode
448} 463}
diff --git a/server/helpers/image-utils.ts b/server/helpers/image-utils.ts
index f2f6a004f..5f254a7aa 100644
--- a/server/helpers/image-utils.ts
+++ b/server/helpers/image-utils.ts
@@ -21,7 +21,7 @@ async function processImage (
21 try { 21 try {
22 jimpInstance = await Jimp.read(path) 22 jimpInstance = await Jimp.read(path)
23 } catch (err) { 23 } catch (err) {
24 logger.debug('Cannot read %s with jimp. Try to convert the image using ffmpeg first.', { err }) 24 logger.debug('Cannot read %s with jimp. Try to convert the image using ffmpeg first.', path, { err })
25 25
26 const newName = path + '.jpg' 26 const newName = path + '.jpg'
27 await convertWebPToJPG(path, newName) 27 await convertWebPToJPG(path, newName)