From 4e0203ca68f63af9560cda6ee8bab8b6113dc09f Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sun, 30 May 2021 07:36:33 -0500 Subject: [PATCH] increase read size and listen on local --- frigate/output.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frigate/output.py b/frigate/output.py index 40b7294ef..b82a14260 100644 --- a/frigate/output.py +++ b/frigate/output.py @@ -20,7 +20,7 @@ from frigate.util import SharedMemoryFrameManager class FFMpegConverter(object): def __init__(self): - ffmpeg_cmd = "ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1920x1080 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -b:v 1000k -bf 0 pipe:".split( + ffmpeg_cmd = "ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1920x1080 -i pipe: -f mpegts -s 640x360 -codec:v mpeg1video -b:v 1000k -bf 0 pipe:".split( " " ) self.process = sp.Popen( @@ -55,7 +55,7 @@ class BroadcastThread(threading.Thread): def run(self): while True: - buf = self.converter.read(4096) + buf = self.converter.read(65536) if buf: self.websocket_server.manager.broadcast(buf, binary=True) elif self.converter.process.poll() is not None: @@ -80,7 +80,7 @@ def output_frames(config, video_output_queue): # start a websocket server on 8082 WebSocketWSGIHandler.http_version = "1.1" websocket_server = make_server( - "", + "127.0.0.1", 8082, server_class=WSGIServer, handler_class=WebSocketWSGIRequestHandler,