-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Hi @jidasheng,
Thanks for the detailed report!
The “Argument list too long” issue has been addressed and released in v3.5.2. You can now avoid this by enabling use_filter_complex_script=True when calling run():
import ffmpeg import sys sys.setrecursionlimit(1000) f = ffmpeg.input("in.mp4") for _ in range(100): f = f.drawtext( text="123", x="100", y="100", fontsize=100, fontcolor="red", fontfile="/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf" ) f = f.output("out.mp4") print(f.run(use_filter_complex_script=True))This will switch to using -filter_complex_script instead of passing everything via the command line, which avoids hitting system argument limits.
As for the other two issues:
• RecursionError: maximum recursion depth exceeded
• Slow execution of compile_line() on very large filter chainsI don’t have a clean fix for those yet. Manually increasing the recursion limit with
sys.setrecursionlimit()can help as a temporary workaround. I’ll go ahead and open a separate issue to track these performance limitations.Thanks again for flagging this!