I don't see any added value from this new interface to replace the original, why not add a call to the function if "template=" is sent to add_stream Instead of expecting us to modify our code.
In addition it would be lovely to get a dict representation of all codec defining params. so that they'll be
Example API
j = input_stream.codec.dict()
j['layout'] = new layout.
output_stream.add_stream(**j)
Additional context
https://github.com/deepdub-ai/audiosample