Maybe you're looking for -nostdin ffmpeg option. It makes ffmpeg not require user input in any circumstances.
-nostdin
check it here: https://ffmpeg.org/ffmpeg.html#Main-options