Hi,
You can use the shutdownStream to shutdown the input stream. The transcoder will terminate by itself when the input stream is gone. You can also use removeConfig with the config ID for the input stream (not the stream ID).
Let us know if you still encounter any crashes after this.
Cheers,
Don