I have a very long list of drawtext and overlay filters (several thousand). I'm running into an issue of hitting my operating system's hard limit for total command length (~131k characters). Can I work around this in any way?

Sample command:

ffmpeg -i input.mp4 -filter_complex {150k characters} output.mp4

Does ffmpeg allow a text file containing the -filter_complex value?

Something like:

ffmpeg -i input.mp4 -filter_complex /path/to/filters.txt output.mp4

Thank you


Use the -filter_complex_script option.

From the documentation:

This option is similar to -filter_complex, the only difference is that its argument is the name of the file from which a complex filtergraph description is to be read.

  • Thanks for the edit! I couldn't get filter_script to work with my current filters. I will test this soon. – user1661677 Nov 22 '16 at 1:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.