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:
parent
ef680f6835
commit
b5b687550d
28 changed files with 356 additions and 111 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue