How to force ffmpeg into non-interactive mode?
14,049
See https://ffmpeg.org/ffmpeg.html#Main-options
-stdin
-
Enable interaction on standard input. On by default unless a pipe is detected.
-nostdin
- To explicitly disable console interactions. Without -y
this will cause ffmpeg to error out if the target file exists.
-y
- To overwrite the output file
Comments
-
ubershmekel about 2 years
Sometimes you want ffmpeg to ask you whether it should overwrite a file. Sometimes it's just a script that you prefer would fail if something is amiss. I.e. don't rely on stdin to answer if you have a question.
-
ubershmekel over 9 yearsThat's if you want it to always overwrite. If you'd rather it error out then
-nostdin
is the right option. -
Velkan about 6 years@slhck,
-y
is not enough. FFmpeg is still eating some characters which is causing weird bugs in the shell scripts. -
GlynD about 5 yearsYou appear to need -nostdin -y In order to overwrite
-
Freedo about 5 yearsrunning this inside a bash script and calling the script from command line, ffmpeg still outputs to terminal
-
Alexis Wilke almost 3 years@Freedo if you want to redirect the output you can always use the shell redirect
ffmpeg ... > output.log 2>&1
(the2>&1
is if you want errors to also go to that log file).