Message ID | 20220403152706.311651-1-stefasab@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] ffmpeg: document -d option | expand |
Context | Check | Description |
---|---|---|
andriy/make_aarch64_jetson | success | Make finished |
andriy/make_fate_aarch64_jetson | success | Make fate finished |
andriy/make_armv7_RPi4 | success | Make finished |
andriy/make_fate_armv7_RPi4 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On 2022-04-03 08:57 pm, Stefano Sabatini wrote: > Option was added in commit 39aafa5ee90e10382e. > > Fix trac issue: http://trac.ffmpeg.org/ticket/1698 > --- > doc/ffmpeg.texi | 12 ++++++++++++ > fftools/ffmpeg_opt.c | 3 +++ > 2 files changed, 15 insertions(+) > > diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi > index 164419cad3..bf738da0c1 100644 > --- a/doc/ffmpeg.texi > +++ b/doc/ffmpeg.texi > @@ -845,6 +845,18 @@ ffmpeg -dump_attachment:t "" -i INPUT > Technical note -- attachments are implemented as codec extradata, so this > option can actually be used to extract extradata from any stream, not just > attachments. > + > +@item -d (@emph{global}) > + > +Run ffmpeg in daemon mode. This options should be only specified as fist option, s/fist/first > +or it will be ignored, for example as: > +@example > +ffmpeg -d ... > +@end example > + > +This option disables log and detaches the @code{ffmpeg} process from the > +terminal. > + > @end table > > @section Video Options > diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c > index 22c88287df..e3c93d1980 100644 > --- a/fftools/ffmpeg_opt.c > +++ b/fftools/ffmpeg_opt.c > @@ -186,6 +186,7 @@ static int ignore_unknown_streams = 0; > static int copy_unknown_streams = 0; > static int recast_media = 0; > static int find_stream_info = 1; > +static int daemon = 0; > > static void uninit_options(OptionsContext *o) > { > @@ -3713,6 +3714,8 @@ const OptionDef options[] = { > { "bits_per_raw_sample", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, > { .off = OFFSET(bits_per_raw_sample) }, > "set the number of bits per raw sample", "number" }, > + { "d", OPT_BOOL | OPT_EXPERT, { &daemon }, > + "run in daemon mode, can only be specified as first option" }, If you're going to add this, might as well use the var instead of strcmp(argv[1]) and remove the positional constraint. Regards, Gyan
Quoting Stefano Sabatini (2022-04-03 17:27:06) > Option was added in commit 39aafa5ee90e10382e. > > Fix trac issue: http://trac.ffmpeg.org/ticket/1698 > --- > doc/ffmpeg.texi | 12 ++++++++++++ > fftools/ffmpeg_opt.c | 3 +++ > 2 files changed, 15 insertions(+) Does this option do anything useful? Shouldn't it rather be removed?
On date Tuesday 2022-04-05 07:23:27 +0200, Anton Khirnov wrote: > Quoting Stefano Sabatini (2022-04-03 17:27:06) > > Option was added in commit 39aafa5ee90e10382e. > > > > Fix trac issue: http://trac.ffmpeg.org/ticket/1698 > > --- > > doc/ffmpeg.texi | 12 ++++++++++++ > > fftools/ffmpeg_opt.c | 3 +++ > > 2 files changed, 15 insertions(+) > > Does this option do anything useful? Shouldn't it rather be removed? Works for me. Do we have a use case for this? This basically disables logs and detaches ffmpeg from the terminal. @Michael, can you comment about this (this was added by you)?
On Tue, Apr 05, 2022 at 11:27:08PM +0200, Stefano Sabatini wrote: > On date Tuesday 2022-04-05 07:23:27 +0200, Anton Khirnov wrote: > > Quoting Stefano Sabatini (2022-04-03 17:27:06) > > > Option was added in commit 39aafa5ee90e10382e. > > > > > > Fix trac issue: http://trac.ffmpeg.org/ticket/1698 > > > --- > > > doc/ffmpeg.texi | 12 ++++++++++++ > > > fftools/ffmpeg_opt.c | 3 +++ > > > 2 files changed, 15 insertions(+) > > > > Does this option do anything useful? Shouldn't it rather be removed? > > Works for me. > > Do we have a use case for this? This basically disables logs and > detaches ffmpeg from the terminal. > > @Michael, can you comment about this (this was added by you)? i have a few udp&tcp tests that used it but i tried now and they work fine if i remove it so iam not aware of a current use case thx [...]
On date Wednesday 2022-04-06 16:43:02 +0200, Michael Niedermayer wrote: > On Tue, Apr 05, 2022 at 11:27:08PM +0200, Stefano Sabatini wrote: > > On date Tuesday 2022-04-05 07:23:27 +0200, Anton Khirnov wrote: > > > Quoting Stefano Sabatini (2022-04-03 17:27:06) > > > > Option was added in commit 39aafa5ee90e10382e. > > > > > > > > Fix trac issue: http://trac.ffmpeg.org/ticket/1698 > > > > --- > > > > doc/ffmpeg.texi | 12 ++++++++++++ > > > > fftools/ffmpeg_opt.c | 3 +++ > > > > 2 files changed, 15 insertions(+) > > > > > > Does this option do anything useful? Shouldn't it rather be removed? > > > > Works for me. > > > > Do we have a use case for this? This basically disables logs and > > detaches ffmpeg from the terminal. > > > > @Michael, can you comment about this (this was added by you)? > > i have a few udp&tcp tests that used it but i tried now and they work fine > if i remove it so iam not aware of a current use case Updated.
On Fri, 8 Apr 2022, Stefano Sabatini wrote: > On date Wednesday 2022-04-06 16:43:02 +0200, Michael Niedermayer wrote: >> On Tue, Apr 05, 2022 at 11:27:08PM +0200, Stefano Sabatini wrote: >>> On date Tuesday 2022-04-05 07:23:27 +0200, Anton Khirnov wrote: >>>> Quoting Stefano Sabatini (2022-04-03 17:27:06) >>>>> Option was added in commit 39aafa5ee90e10382e. >>>>> >>>>> Fix trac issue: http://trac.ffmpeg.org/ticket/1698 >>>>> --- >>>>> doc/ffmpeg.texi | 12 ++++++++++++ >>>>> fftools/ffmpeg_opt.c | 3 +++ >>>>> 2 files changed, 15 insertions(+) >>>> >>>> Does this option do anything useful? Shouldn't it rather be removed? >>> >>> Works for me. >>> >>> Do we have a use case for this? This basically disables logs and >>> detaches ffmpeg from the terminal. >>> >>> @Michael, can you comment about this (this was added by you)? >> >> i have a few udp&tcp tests that used it but i tried now and they work fine >> if i remove it so iam not aware of a current use case > > Updated. > Will apply. Thanks, Marton
diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 164419cad3..bf738da0c1 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -845,6 +845,18 @@ ffmpeg -dump_attachment:t "" -i INPUT Technical note -- attachments are implemented as codec extradata, so this option can actually be used to extract extradata from any stream, not just attachments. + +@item -d (@emph{global}) + +Run ffmpeg in daemon mode. This options should be only specified as fist option, +or it will be ignored, for example as: +@example +ffmpeg -d ... +@end example + +This option disables log and detaches the @code{ffmpeg} process from the +terminal. + @end table @section Video Options diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 22c88287df..e3c93d1980 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -186,6 +186,7 @@ static int ignore_unknown_streams = 0; static int copy_unknown_streams = 0; static int recast_media = 0; static int find_stream_info = 1; +static int daemon = 0; static void uninit_options(OptionsContext *o) { @@ -3713,6 +3714,8 @@ const OptionDef options[] = { { "bits_per_raw_sample", OPT_INT | HAS_ARG | OPT_EXPERT | OPT_SPEC | OPT_OUTPUT, { .off = OFFSET(bits_per_raw_sample) }, "set the number of bits per raw sample", "number" }, + { "d", OPT_BOOL | OPT_EXPERT, { &daemon }, + "run in daemon mode, can only be specified as first option" }, /* video options */ { "vframes", OPT_VIDEO | HAS_ARG | OPT_PERFILE | OPT_OUTPUT, { .func_arg = opt_video_frames },