From dc7f093ba0a5d2357d2802bb8bfca16941700122 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Thu, 7 Nov 2019 17:45:48 -0800 Subject: [PATCH] Disable mp4 option for restreamer cuts It caused our RSS to explode and i'm not sure why --- restreamer/restreamer/main.py | 2 ++ thrimbletrimmer/index.html | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/restreamer/restreamer/main.py b/restreamer/restreamer/main.py index 8ec8060..22c00b2 100644 --- a/restreamer/restreamer/main.py +++ b/restreamer/restreamer/main.py @@ -280,6 +280,8 @@ def cut(channel, quality): if type == 'fast': return Response(fast_cut_segments(segments, start, end), mimetype='video/MP2T') elif type in ('mpegts', 'mp4'): + if type == 'mp4': + return "mp4 type has been disabled due to the load it causes", 400 # encode as high-quality, without wasting too much cpu on encoding stream, muxer, mimetype = (True, 'mpegts', 'video/MP2T') if type == 'mpegts' else (False, 'mp4', 'video/mp4') encoding_args = ['-c:v', 'libx264', '-preset', 'ultrafast', '-crf', '0', '-f', muxer] diff --git a/thrimbletrimmer/index.html b/thrimbletrimmer/index.html index 3e23753..bc29e04 100644 --- a/thrimbletrimmer/index.html +++ b/thrimbletrimmer/index.html @@ -108,7 +108,6 @@ -