aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/ffmpeg-utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/ffmpeg-utils.ts')
-rw-r--r--server/helpers/ffmpeg-utils.ts15
1 files changed, 15 insertions, 0 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}