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

2018-07-02 Thread Michael Niedermayer
Just reread this as the patch was pinged for needing review ... On Sun, Jun 10, 2018 at 11:07:58PM +0300, Jan Ekström wrote: [...] > Many people have their own use cases for various things and have > enough leverage to get things that specifically work for their use > case into the code base, whi

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

2018-06-11 Thread Lou Logan
On Mon, Jun 11, 2018, at 1:00 PM, Morten With wrote: > > Also, was this the correct way to send in a revised patch? I'm completely > new to this. Yes, that is acceptable. We are not too picky about that. It can be helpful to rename the subject, such as [PATCH v2], if desired: especially if multip

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

2018-06-11 Thread Morten With
Yeah, I was thinking that there seemed to be very little validation of -sseof combinations. That's why I initially didn't add any of those for -toeof. You are correct, that is missing, I'll add that once your patch is done then. Also, was this the correct way to send in a revised patch? I'm compl

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

2018-06-11 Thread Gyan Doshi
On 12-06-2018 12:48 AM, Morten With wrote: commit message to "stop reading"), here is the revised patch attached. Maybe I missed it, but in the new patch, you don't vet ss against toeof i.e. for a 10-second file, -ss 7 -toeof -4 should be declared invalid. Also, this isn't an issue with

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

2018-06-11 Thread Morten With
2018-06-10 22:07 GMT+02:00 Jan Ekström : > > Yes, programmatic things for things like these are often better. That > said, the question regarding sseof can be answered by "the person who > merged this stuff was OK with all the asterisks/caveats around it". > > Think of MPEG-TS, for example. I thin

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

2018-06-10 Thread Jan Ekström
On Sun, Jun 10, 2018 at 10:39 PM, Morten With wrote: > 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):

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

2018-06-10 Thread Morten With
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

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

2018-06-10 Thread Gyan Doshi
On 10-06-2018 10:01 PM, morten.w...@gmail.com wrote: +if (o->stop_time_eof != AV_NOPTS_VALUE) { +if (ic->duration>0) { +o->recording_time = ic->duration + o->stop_time_eof; +} else +av_log(NULL, AV_LOG_WARNING, "Cannot use -toeof, duration of %s no

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

2018-06-10 Thread Gyan Doshi
On 10-06-2018 11:28 PM, Marton Balint wrote: 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? This is the counterpart to `to` as -sseof is to -ss. This is

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

2018-06-10 Thread Gyan Doshi
On 10-06-2018 10:01 PM, morten.w...@gmail.com wrote: +@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. Should be, "Stop reading the input at @var{position} rel

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

2018-06-10 Thread Marton Balint
On Sun, 10 Jun 2018, morten.w...@gmail.com wrote: From: withmorten Signed-off-by: Morten With --- 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..f

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

2018-06-10 Thread morten . with
From: withmorten Signed-off-by: Morten With --- 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/ff