[FFmpeg-devel] [PATCH] avcodec/keyframe_bsf: add keyframe bitstream filter

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Jun 8 21:16:25 CEST 2014


On Sun, Jun 08, 2014 at 12:40:03PM +0200, Michael Niedermayer wrote:
> On Sun, Jun 08, 2014 at 11:29:18AM +0200, Reimar Döffinger wrote:
> > On Tue, Jun 03, 2014 at 11:05:39PM +0200, Michael Niedermayer wrote:
> > > On Tue, Jun 03, 2014 at 08:43:03PM +0100, Derek Buitenhuis wrote:
> > > > On 6/3/2014 8:20 PM, Aman Gupta wrote:
> > > > > Signed-off-by: Aman Gupta <ffmpeg at tmm1.net>
> > > > > ---
> > > > >  libavcodec/Makefile       |  1 +
> > > > >  libavcodec/allcodecs.c    |  1 +
> > > > >  libavcodec/keyframe_bsf.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++
> > > > >  3 files changed, 50 insertions(+)
> > > > >  create mode 100644 libavcodec/keyframe_bsf.c
> > > > 
> > > > Two things:
> > > > 
> > > 
> > > > 1) Won't this create some pretty broken files with some codecs?
> > > 
> > > which codec/case where you thinking of here ?
> > 
> > I don't know about broken files, but it should be
> > quite useless for audio and questionable for subtitles at least.
> > Which should be mentioned in the documentation.
> > Not sure what will happen for H.264 with refresh interval (sorry,
> > the proper name escaped my memory)?
> 
> > I guess it will create empty files?
> 
> either that, or it would create files with useless frames.
> 
> 
> > In addition, for MPEG-2 etc, won't the timestamps possibly
> > be quite messed up?
> 
> I would hope that wouldnt happen, if it does it should be investigated

Ok, I was just expecting that for the filtered frame some of the code
to detect e.g. has_b_frames might not work and thus pts/dts at least
won't quite match exactly.
Even if it might not be significant, it's just a suspicion that it
might show some non-obvious behaviour.


More information about the ffmpeg-devel mailing list