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.
How to force ffmpeg into non-interactive mode?
Asked Answered
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
@slhck,
-y
is not enough. FFmpeg is still eating some characters which is causing weird bugs in the shell scripts. –
Damar You appear to need -nostdin -y In order to overwrite –
Youngyoungblood
running this inside a bash script and calling the script from command line, ffmpeg still outputs to terminal –
Obnubilate
@Obnubilate if you want to redirect the output you can always use the shell redirect
ffmpeg ... > output.log 2>&1
(the 2>&1
is if you want errors to also go to that log file). –
Vannoy © 2022 - 2024 — McMap. All rights reserved.
-nostdin
is the right option. – Heyerdahl