[FFmpeg-devel] [PATCH] Enable parser in FLV demuxer for H264 codec

Michael Niedermayer michaelni at gmx.at
Fri Dec 13 04:06:00 CET 2013


On Thu, Dec 12, 2013 at 06:44:35PM -0800, Alex Sukhanov wrote:
> On Thu, Dec 12, 2013 at 6:09 PM, Michael Niedermayer <michaelni at gmx.at>wrote:
> 
> > On Thu, Dec 12, 2013 at 03:10:10PM -0800, Alex Sukhanov wrote:
> > > ---
> > >  libavformat/flvdec.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
> > > index 1024001..4401652 100644
> > > --- a/libavformat/flvdec.c
> > > +++ b/libavformat/flvdec.c
> > > @@ -256,6 +256,7 @@ static int flv_set_video_codec(AVFormatContext *s,
> > AVStream *vstream,
> > >          return 1;     // 1 byte body size adjustment for
> > flv_read_packet()
> > >      case FLV_CODECID_H264:
> > >          vcodec->codec_id = AV_CODEC_ID_H264;
> > > +        vstream->need_parsing = AVSTREAM_PARSE_HEADERS;
> > >          return 3;     // not 4, reading packet type will consume one
> > byte
> > >      case FLV_CODECID_MPEG4:
> > >          vcodec->codec_id = AV_CODEC_ID_MPEG4;
> >
> > breaks
> > ffmpeg -i Enigma_Principles_of_Lust.flv test.flv
> >
> > before the patch:
> > frame= 6300 fps=1441 q=31.0 Lsize=    7266kB time=00:03:30.65 bitrate=
> > 282.6kbits/s
> > after the patch
> > frame= 4531 fps=1180 q=9.8 Lsize=    6987kB time=00:03:30.65 bitrate=
> > 271.7kbits/s dup=0 drop=1769
> >
> > [....]
> >
> > --
> > Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >
> > The misfortune of the wise is better than the prosperity of the fool.
> > -- Epicurus
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> >
> 
> Hi Michael,
> 
> sad to hear that. I ran FATE test before sending this patch to you, and it
> passed. A few questions:
> - Where can I find this Enigma_Principles_of_Lust.flv file?

http://samples.ffmpeg.org/FLV/Enigma_Principles_of_Lust-part.flv


> - fps = 1180 or 1441 doesn't look like sane.

its the transcoding speed, that difference is not what i meant, rather
that there are many droped frames with the patch


>  Is file corrupted?

I did not really investigate, its timestamps looked a bit odd though

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131213/0b66e4bb/attachment.asc>


More information about the ffmpeg-devel mailing list