diff --git a/demos/real_time_stream_analysis/python/client.py b/demos/real_time_stream_analysis/python/client.py index 00e76e6561..62e6ab9557 100755 --- a/demos/real_time_stream_analysis/python/client.py +++ b/demos/real_time_stream_analysis/python/client.py @@ -23,6 +23,8 @@ parser = argparse.ArgumentParser() parser.add_argument('--grpc_address', required=False, default='localhost:9022', help='Specify url to grpc service') +parser.add_argument('--ffmpeg_output_width', required=False, default=None, type=int, help='Width of the rtsp output channel window') +parser.add_argument('--ffmpeg_output_height', required=False, default=None, type=int, help='Height of the rtsp output channel window') parser.add_argument('--input_stream', required=False, default="rtsp://localhost:8080/channel1", type=str, help='Url of input rtsp stream') parser.add_argument('--output_stream', required=False, default="rtsp://localhost:8080/channel2", type=str, help='Url of output rtsp stream') parser.add_argument('--model_name', required=False, default="holisticTracking", type=str, help='Name of the model') @@ -54,6 +56,17 @@ def postprocess(frame, result): backend = StreamClient.OutputBackends.cv2 exact = True -client = StreamClient(postprocess_callback = postprocess, preprocess_callback=preprocess, output_backend=backend, source=args.input_stream, sink=args.output_stream, exact=exact, benchmark=args.benchmark, verbose=args.verbose) +client = StreamClient( + postprocess_callback=postprocess, + preprocess_callback=preprocess, + output_backend=backend, + source=args.input_stream, + sink=args.output_stream, + exact=exact, + benchmark=args.benchmark, + verbose=args.verbose, + ffmpeg_output_width=args.ffmpeg_output_width, + ffmpeg_output_height=args.ffmpeg_output_height, +) client.start(ovms_address=args.grpc_address, input_name=args.input_name, model_name=args.model_name, datatype = StreamClient.Datatypes.uint8, batch = False, limit_stream_duration = args.limit_stream_duration, limit_frames = args.limit_frames, streaming_api=True)