Skip to content
Permalink
Browse files

fix(ffmpeg-video): fig bug for scaling videos to stdout

  • Loading branch information...
numb3r3 committed Aug 23, 2019
1 parent 780aad0 commit 6aa0c3ca124467b21057486d70c1a322e6e3469a
Showing with 9 additions and 6 deletions.
  1. +6 −4 gnes/service/base.py
  2. +3 −2 gnes/service/frontend.py
@@ -129,11 +129,13 @@ def build_socket(ctx: 'zmq.Context', host: str, port: int, socket_type: 'SocketT
sock.setsockopt(zmq.SUBSCRIBE, identity.encode('ascii') if identity else b'')
# sock.setsockopt(zmq.SUBSCRIBE, b'')

sock.setsockopt(zmq.RCVHWM, 100)
sock.setsockopt(zmq.RCVBUF, 512 * 1024 * 1024) # network buffer 512M

sock.setsockopt(zmq.SNDHWM, 100)
sock.setsockopt(zmq.SNDBUF, 512 * 1024 * 1024)
# Note: the following very dangerous for pub-sub socketc
sock.setsockopt(zmq.RCVHWM, 10)
sock.setsockopt(zmq.RCVBUF, 10 * 1024 * 1024) # limit of network buffer 100M

sock.setsockopt(zmq.SNDHWM, 10)
sock.setsockopt(zmq.SNDBUF, 10 * 1024 * 1024) # limit of network buffer 100M

return sock, sock.getsockopt_string(zmq.LAST_ENDPOINT)

@@ -137,9 +137,10 @@ def Search(self, request, context):

def StreamCall(self, request_iterator, context):
with self.zmq_context as zmq_client:
num_request = 0
# network traffic control
max_outstanding = 1000
num_request = 0
max_outstanding = 500

for request in request_iterator:
timeout = 25
if self.args.timeout > 0:

0 comments on commit 6aa0c3c

Please sign in to comment.
You can’t perform that action at this time.