[FFmpeg-devel] Problem with av_find_stream_info and possible solution(s)

Michael Niedermayer michaelni
Wed Jan 28 00:47:57 CET 2009

On Tue, Jan 27, 2009 at 09:27:22PM +0000, Luca Abeni wrote:
> Hi Michael,
> Michael Niedermayer wrote:
> [...]
> >> 1) modify libavformat/utils.c:tb_unreliable() to consider
> >>     reliable the time base of codecs that will never set it
> >>     to "reliable" values (such as rawvideo, mjpeg, h.263 - I
> >>     think - and similar)
> > 
> > we cant do that, this will break framerate detection for these codecs
> > in some cases
> I am obviously missing something here, sorry...
> but isn't the timebase for h.263 always 30000/1001? And it is my 

have you missed the h.263 files people complain about that are not
30000/1001 fps?

> impression that the timebase for raw video is set by the "read_header" 
> method of the format, not in frame decoding. Am I wrong? I see the same 
> for MJPEG...

you can put raw and mjpeg in containers that lack a fps value and use a
timebase of 1000000

> >> 2) add a codec capability that says that the time base of
> >>     this codec has to be considered reliable
> > 
> > there is nothing codec specific.
> > As you already noted yourself its a file vs. network issue
> > 
> > I think the most obvious thing is the simple question if the user
> > app wants the guessed frame rate or not.
> > ffplay does not give a damn about it and ffmpeg in some cases
> > should not need it either but for some cases like avi output
> > it is essential to have some "reasonable minimal" timebase and not
> > 1/90000
> > Adding a flag to enable/disable it should be easy ...
> Ok; I'll have a look at adding this flag.
> Anyway, double thinking about it I suspect this flag depends on the 
> input format... Is adding a flag in the input AVFormat reasonable?


it belongs in AVFormatContext
It is a flag set by the user app not fixed per input format

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090128/5ad024f5/attachment.pgp>

More information about the ffmpeg-devel mailing list