]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/live-manager.ts
Support progress for ffmpeg tasks
[github/Chocobozzz/PeerTube.git] / server / lib / live-manager.ts
index 2fb4b774c1234868ebdb5fb51d47316e9781cb84..7f5fdf8992835af7038f41dd8c93accc0ab8fc77 100644 (file)
@@ -109,6 +109,10 @@ class LiveManager {
     logger.info('Running RTMP server on port %d', config.rtmp.port)
 
     this.rtmpServer = new NodeRtmpServer(config)
+    this.rtmpServer.tcpServer.on('error', err => {
+      logger.error('Cannot run RTMP server.', { err })
+    })
+
     this.rtmpServer.run()
   }
 
@@ -505,7 +509,7 @@ class LiveManager {
   private isDurationConstraintValid (streamingStartTime: number) {
     const maxDuration = CONFIG.LIVE.MAX_DURATION
     // No limit
-    if (maxDuration === null) return true
+    if (maxDuration < 0) return true
 
     const now = new Date().getTime()
     const max = streamingStartTime + maxDuration