1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Add ability to save live replay

This commit is contained in:
Chocobozzz 2020-10-26 16:44:23 +01:00 committed by Chocobozzz
parent ef680f6835
commit b5b687550d
28 changed files with 356 additions and 111 deletions

View file

@ -424,6 +424,20 @@ function runLiveMuxing (rtmpUrl: string, outPath: string, deleteSegments: boolea
return command
}
function hlsPlaylistToFragmentedMP4 (playlistPath: string, outputPath: string) {
const command = getFFmpeg(playlistPath)
command.outputOption('-c copy')
command.output(outputPath)
command.run()
return new Promise<string>((res, rej) => {
command.on('error', err => rej(err))
command.on('end', () => res())
})
}
// ---------------------------------------------------------------------------
export {
@ -443,6 +457,7 @@ export {
getVideoFileFPS,
computeResolutionsToTranscode,
audio,
hlsPlaylistToFragmentedMP4,
getVideoFileBitrate,
canDoQuickTranscode
}