[FFmpeg-devel] [PATCH] fftools/ffmpeg_opt: Add -toeof option to stop writing relative to EOF

Marton Balint cus at passwd.hu
Sun Jun 10 20:58:14 EEST 2018

On Sun, 10 Jun 2018, morten.with at gmail.com wrote:

> From: withmorten <morten.with at gmail.com>
> Signed-off-by: Morten With <morten.with at gmail.com>
> ---
> doc/ffmpeg.texi      | 4 ++++
> fftools/ffmpeg.h     | 1 +
> fftools/ffmpeg_opt.c | 9 +++++++++
> 3 files changed, 14 insertions(+)
> diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
> index 3717f22d42..fe635d0e42 100644
> --- a/doc/ffmpeg.texi
> +++ b/doc/ffmpeg.texi
> @@ -488,6 +488,10 @@ see @ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1)
> -to and -t are mutually exclusive and -t has priority.
> + at item -toeof @var{position} (@emph{input})
> +Stop writing the output at @var{position} relative to the "end of file". That is negative
> +values are later in the file, 0 is at EOF.

end of file is misleading, you are simply using the input duration as far 
as I see. So write that in the help text. Also what happens if the 
output is generated from multiple inputs?

Also I am not sure your use case needs a separate option. Anybody willing 
to use this in an automated way can also get the input duration with 
ffprobe and use the good old -timestamp option to achieve the same result.


More information about the ffmpeg-devel mailing list