aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-07-11 21:10:17 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-07-19 16:33:02 +0200
commit0fe8acf2d69bf4bce620128e48b62a957421a106 (patch)
tree9a1c4faf95dbd0f6932a590d2075a9e73bb90a00
parent52ab418588ba14a53b40a80ea32589f8844f3ce6 (diff)
downloadffmpeg-0fe8acf2d69bf4bce620128e48b62a957421a106.tar.gz
ffmpeg: add -(no)stdin option.
Allows to disable interaction from standard input. Useful, for example, if ffmpeg is in the background process group. Roughly the same result can be achieved with "ffmpeg ... < /dev/null" but it requires a shell.
-rw-r--r--Changelog1
-rw-r--r--doc/ffmpeg.texi8
-rw-r--r--ffmpeg.c2
3 files changed, 11 insertions, 0 deletions
diff --git a/Changelog b/Changelog
index 7372d0d48c..4242cea3da 100644
--- a/Changelog
+++ b/Changelog
@@ -31,6 +31,7 @@ version next:
- new option: -progress
- 3GPP Timed Text decoder
- GeoTIFF decoder support
+- ffmpeg -(no)stdin option
version 0.11:
diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index c9b6514fed..904a50589a 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -361,6 +361,14 @@ the encoding process. It is made of "@var{key}=@var{value}" lines. @var{key}
consists of only alphanumeric characters. The last key of a sequence of
progress information is always "progress".
+@item -stdin
+Enable interaction on standard input. On by default unless standard input is
+used as an input.
+
+Useful, for example, if ffmpeg is in the background process group. Roughly
+the same result can be achieved with @code{ffmpeg ... < /dev/null} but it
+requires a shell.
+
@item -debug_ts (@emph{global})
Print timestamp information. It is off by default. This option is
mostly useful for testing and debugging purposes, and the output
diff --git a/ffmpeg.c b/ffmpeg.c
index 9057fe178a..2d12241a0a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -5878,6 +5878,8 @@ static const OptionDef options[] = {
"add timings for each task" },
{ "progress", HAS_ARG | OPT_EXPERT, {(void*)opt_progress},
"write program-readable progress information", "url" },
+ { "stdin", OPT_BOOL | OPT_EXPERT, {(void*)&stdin_interaction},
+ "enable or disable interaction on standard input" },
{ "timelimit", HAS_ARG, {(void*)opt_timelimit}, "set max runtime in seconds", "limit" },
{ "dump", OPT_BOOL | OPT_EXPERT, {(void*)&do_pkt_dump},
"dump each input packet" },