[FFmpeg-devel] improved DV probe score patch BROKES detecting 1-frame DV
Fri Sep 25 14:43:51 CEST 2009
On Fri, Sep 25, 2009 at 02:18:41PM +0200, Reimar D?ffinger wrote:
> On Fri, Sep 25, 2009 at 11:48:55AM +0300, Maksym Veremeyenko wrote:
> > I always thought that format detection for ffmpeg is prioritized in way:
> > 1. "-f <format>" input format redefinition
> > 2. input file extension
> > 3. stream probe
> > Why does it perform stream probe if input file extension is defined?
> No, no idea where you got that from.
> Extension does not matter for formats that have a probe function (which
> may be a bad idea),
the idea is that the probe function is better, if its not it can be removed
also nothing stops the probe function itself to check the extension
> and for formats that do not have a probe function it
> sets the score to 50 (which seems a bit high to me).
> Anyway, once more the MPEG detection strikes (if someone can find the
> motivation, extending probetest to check that no two probe functions
> return the same value even if <= 25 might be a good idea).
> Of course the DV probe function probably could be improved to reliably
> return a higher score for single-frame DVs, but that is a bit more
> effort :-).
more effort than awnsering and debuging all these things?
> E.g. this change makes it work:
> Index: libavformat/mpeg.c
> --- libavformat/mpeg.c (revision 20013)
> +++ libavformat/mpeg.c (working copy)
> @@ -78,7 +78,7 @@
> //av_log(NULL, AV_LOG_ERROR, "%d %d %d %d %d len:%d\n", sys, priv1,
> //pspack,vid, audio, p->buf_size);
> if(sys>invalid && sys*9 <= pspack*10)
> - return pspack > 2 ? AVPROBE_SCORE_MAX/2+2 : AVPROBE_SCORE_MAX/4; // +1 for .mpg
> + return pspack > 2 ? AVPROBE_SCORE_MAX/2+2 : AVPROBE_SCORE_MAX/4-1; // +1 for .mpg
i would prefer if the scores would not be decreased below 25 to workaround
the inefficiency of the dv probe that we know how to improve.
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel