Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Remi Achard
> > This did the trick thanks. For the -v verbose this indeed print the last > decoded frame on normal run but not when using -xerror. > Eg. > [AVIOContext @ 0x7f7f7780] Statistics: 52700397 bytes read, 4 seeks > I guess because print_report is not called when exit_program is called in check_d

Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Remi Achard
> > Add `-copyts` for that. If you want the index of the first decode > failure, you don't need this patch. Run with `-xerror -v verbose`. > ist->frames_decoded will be printed for each input stream. Add 1 to > that. The `time=` value at the end should be the timestamp + duration of > the last succ

Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Gyan
On 12-07-2019 04:08 PM, Remi Achard wrote: Which is good: that means you get the same number with or without it. Sorry I was unclear, I mean that best_effort_timestamp is relative to trim start. Would be nice to have the abosulte timestamp in the file, regardless of where the -ss flag starts

Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Remi Achard
> Which is good: that means you get the same number with or without it. > Sorry I was unclear, I mean that best_effort_timestamp is relative to trim start. Would be nice to have the abosulte timestamp in the file, regardless of where the -ss flag starts no ? ___

Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Nicolas George
Remi Achard (12019-07-12): > Would you advice using the AVFrame::best_effort_timestamp field ? That is the one. > One problem I see is that it doesn't seems to be aware of trim command (eg. > -ss flag). Which is good: that means you get the same number with or without it. Regards, -- Nicola

Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Remi Achard
> > Exactly, you need to use the format string for uint64_t, PRIu64 from > memory; check in the code base and standard. > Thanks for the pointer, didn't knew this. > Then I think the timestamp of the frame would be a better choice. IIUC, > the field you print depends on the way ffmpeg processes

Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Remi Achard
> > Let's call good frames G and bad frames B. If your input isG G G B B > B G G B then for all 3 initial B frames, ist->frames_decoded will be > 3, and 5 for the last B frame. So, what your patched log tells you is > the total number of previous _successful_ decodes. Presumably, you wish > t

Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Nicolas George
Remi Achard (12019-07-12): > So I'm not supposed to use %llu as is the case here (sorry if I didn't > understood your point) ? Exactly, you need to use the format string for uint64_t, PRIu64 from memory; check in the code base and standard. > The use case would be to improve error diagnostic, eg.

Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Remi Achard
> Rémi Achard (12019-07-12): > > --- > > fftools/ffmpeg.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c > > index 01f04103cf..aaeabe512b 100644 > > --- a/fftools/ffmpeg.c > > +++ b/fftools/ffmpeg.c > > @@ -2107,7 +2107,7 @@ stati

Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Nicolas George
Rémi Achard (12019-07-12): > --- > fftools/ffmpeg.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c > index 01f04103cf..aaeabe512b 100644 > --- a/fftools/ffmpeg.c > +++ b/fftools/ffmpeg.c > @@ -2107,7 +2107,7 @@ static void check_decode

Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Gyan
On 12-07-2019 02:54 PM, Remi Achard wrote: Thanks for the review, I updated the patch to show the correct frame number as suggested (sorry for the double post I managed to screw up my git send-email). This is not what I meant. Let's call good frames G and bad frames B. If your input is    G G

Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Remi Achard
Thanks for the review, I updated the patch to show the correct frame number as suggested (sorry for the double post I managed to screw up my git send-email). Le ven. 12 juil. 2019 à 11:18, Rémi Achard a écrit : > --- > fftools/ffmpeg.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

[FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Rémi Achard
--- fftools/ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 01f04103cf..aaeabe512b 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2107,7 +2107,7 @@ static void check_decode_result(InputStream *ist, int *got_output, i

Re: [FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Gyan
On 12-07-2019 01:15 PM, Rémi Achard wrote: --- fftools/ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 01f04103cf..fe067007ea 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2107,7 +2107,7 @@ static void check_de

[FFmpeg-devel] [PATCH] Display decoded frame number on error

2019-07-12 Thread Rémi Achard
--- fftools/ffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 01f04103cf..fe067007ea 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2107,7 +2107,7 @@ static void check_decode_result(InputStream *ist, int *got_output, i