Can ffmpeg read filters from a text file?

5

2

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

user1661677

Posted 2016-11-21T21:15:52.653

Reputation: 247

Answers

6

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.

llogan

Posted 2016-11-21T21:15:52.653

Reputation: 31 929

Thanks for the edit! I couldn't get filter_script to work with my current filters. I will test this soon. – user1661677 – 2016-11-22T01:36:06.097