10 Provide a shell used to send interactive commands to a zmq filter.
12 The command assumes there is a running zmq or azmq filter acting as a
15 You can send a command to it, follwing the syntax:
16 TARGET COMMAND [COMMAND_ARGS]
18 * TARGET is the target filter identifier to send the command to
19 * COMMAND is the name of the command sent to the filter
20 * COMMAND_ARGS is the optional specification of command arguments
22 See the zmq/azmq filters documentation for more details, and the
23 zeromq documentation at:
27 logging.basicConfig(format=
'zmqshell|%(levelname)s> %(message)s', level=logging.INFO)
28 log = logging.getLogger()
35 context = zmq.Context()
38 cmd.Cmd.__init__(self)
43 log.info(f
"Sending command: {cmd}")
46 log.info(f
"Received response: {response}")
50 argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescriptionHelpFormatter
56 parser = argparse.ArgumentParser(description=HELP, formatter_class=Formatter)
57 parser.add_argument(
'--bind-address',
'-b', default=
'tcp://localhost:5555', help=
'specify bind address used to communicate with ZMQ')
59 args = parser.parse_args()
61 LavfiCmd(args.bind_address).cmdloop(
'FFmpeg libavfilter interactive shell')
62 except KeyboardInterrupt:
66 if __name__ ==
'__main__':