As Gyan clarified, this only affects one input file. Help text has been modified as per Gyan's instructions (not yet submitted).
This feature was specifically requested here (and I had the same issue as the one who opened the ticket): https://trac.ffmpeg.org/ticket/7155 I think it's a lot cleaner to just solve this with one ffmpeg command without any external scripting math, since ffmpeg knows the duration of the file internally anyway. Otherwise, why would -sseof exist? Regards, Morten 2018-06-10 19:58 GMT+02:00 Marton Balint <c...@passwd.hu>: > > > On Sun, 10 Jun 2018, morten.w...@gmail.com wrote: > > From: withmorten <morten.w...@gmail.com> >> >> Signed-off-by: Morten With <morten.w...@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. >> >> +@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. > > Regards, > Marton > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel