wchill/ffmpy3

when I use the follew command, The program reported an error

syssts opened this issue · 1 comments

inputs = OrderedDict([(outvideo, None), (outvoice, None)])

    outputs = {output, '-c copy -map 0:v:0 -map 1:a:0'}

    ff = ffmpy3.FFmpeg(
        inputs=inputs,
        outputs=outputs
    )
    print(ff.cmd)
    ff.run()

Traceback (most recent call last):
File "ts.py", line 211, in
ff = ffmpy3.FFmpeg(
File "/home/xie/miniconda3/envs/ai/lib/python3.8/site-packages/ffmpy3.py", line 66, in init
self._cmd += _merge_args_opts(outputs)
File "/home/xie/miniconda3/envs/ai/lib/python3.8/site-packages/ffmpy3.py", line 317, in _merge_args_opts
for arg, opt in args_opts_dict.items():
AttributeError: 'set' object has no attribute 'items'

AttributeError: 'set' object has no attribute 'items'

your using a set not a dict. (the tags have links for more info)

outputs = {output, '-c copy -map 0:v:0 -map 1:a:0'}

should be

outputs = {"output": "-c copy -map 0:v:0 -map 1:a:0"}

also this

inputs = OrderedDict([(outvideo, None), (outvoice, None)])

could be

inputs = {outvideo: None, outvoice: None}