Reputation: 11
I am trying to use the -vf format="gray" in ffmpeg-python and I can't seem to get the syntax right. From what I have seen, ffmpeg-python has a set of filter_name options you can use, and then there is also the option to use .filter_() to just put in the ffmpeg commands directly in.
I have tried using both and seem to get the same error, where ffmpeg-python wants me to declare a filter_name and from what I am seeing in the documentation, format=gray doesn't fall under any of the filter_name options.
If I take this approach, it works:
(
ffmpeg.input(img_seq_template, framerate=framerate, **input_options)
.filter("format", "gray")
.output(filename=output_path, **output_options)
.run(overwrite_output=True)
)
However, I want to also use a dictionary in the filter(), which then requires me to put in a filter_name. The goal would be to have something like below working:
filter_options = {'format' : 'gray'}
(
ffmpeg.input(img_seq_template, framerate=framerate, **input_options)
.filter(filter_name = "some_filter_name", **filter_options)
.output(filename=output_path, **output_options)
.run(overwrite_output=True)
)
Any ideas on what I could put into the filter_name to get this running would be amazing! All suggestions welcome, thanks so much!
Upvotes: 1
Views: 912