Disable mp4 option for restreamer cuts

It caused our RSS to explode and i'm not sure why
mike/testing
Mike Lang 5 years ago
parent 59d0fa3e40
commit dc7f093ba0

@ -280,6 +280,8 @@ def cut(channel, quality):
if type == 'fast': if type == 'fast':
return Response(fast_cut_segments(segments, start, end), mimetype='video/MP2T') return Response(fast_cut_segments(segments, start, end), mimetype='video/MP2T')
elif type in ('mpegts', 'mp4'): 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 # 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') 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] encoding_args = ['-c:v', 'libx264', '-preset', 'ultrafast', '-crf', '0', '-f', muxer]

@ -108,7 +108,6 @@
<option value="rough" selected>Rough (fastest, pads start and end by a few seconds)</option> <option value="rough" selected>Rough (fastest, pads start and end by a few seconds)</option>
<option value="fast">Fast (may have artifacts a few seconds in from start and end)</option> <option value="fast">Fast (may have artifacts a few seconds in from start and end)</option>
<option value="mpegts">MPEG-TS (slow, consumes server resources)</option> <option value="mpegts">MPEG-TS (slow, consumes server resources)</option>
<option value="mp4">MP4 (slower, consumes server resources, output is MP4 file)</option>
</select> </select>
</div> </div>
<div id="ManualLinkPane" style="display:none"> <div id="ManualLinkPane" style="display:none">

Loading…
Cancel
Save