[FFmpeg-devel] improved DV probe score patch BROKES detecting 1-frame DV

Michael Niedermayer michaelni
Fri Sep 25 23:12:24 CEST 2009


On Fri, Sep 25, 2009 at 12:35:03PM -0700, Baptiste Coudurier wrote:
> On 09/25/2009 11:47 AM, Reimar D?ffinger wrote:
>> On Fri, Sep 25, 2009 at 11:13:35AM -0700, Baptiste Coudurier wrote:
>>> On 09/25/2009 07:01 AM, Michael Niedermayer wrote:
>>>> maybe we should test how bad the various<=25 probes are with probetest 
>>>> and
>>>> then consider to reassign scores based on that. If above really is that
>>>> often causing false positives then i surely agree with reducing its 
>>>> score
>>>
>>> We can surely continue complicating probing functions, however I
>>> believe the whole approach should be improved

i fear that improving == (complicating || finetuning)


>>>
>>> First taking file extension into account is the first thing to do IMHO.

i dont really know how to consider the file extension in a generic way.
Let alone in one that does not complicate things
with common formats like avi, mpeg-ps, mpeg-es, mp4, ... the file ext is
not reliable, people name random files .avi .mpeg and so on out of
brainlessness, a few of the sample files from roundup reports fall in that
category while IIRC these where unrelated to the reports, given the number
of reports i think we can fairly saftely say that >0.1% of files have the
wrong extension. If this quick guess of >0.1% is true checking a mere 2
more bytes would improve detection more than the file extension (this of
course is a oversimplification i know ...)


OTOH for really obscure and rare formats that are hard to detect and that
are primarely used by educated humanoids chances of wrong file extensions
likely are quite low, so i agree that the file extension can be usefull for
specific probe functions, i just do not think theres any generic way like to
just add 1, 5, 10 or 50 for a match that would not cause more problems than
it solves

also a .mpeg file is mpeg-ps, mpeg2video, mpeg-ts? i wouldnt make a bet on
something like that and 
.dv is dv or dv in avi? does the general user even have the understanding to
name files appropriately ...
And sometimes people might misname files intentionally to make them pass
through some silly user tools ...

I guess one could say that amongth educated circles file extensions should
be quite reliably but amongth others i really wouldnt bet on it ...
there well may be the kind that names every audio file .mp3 and every
video .mkv  though iam guessing here i dont have a real example of that


>>> It seems reasonable to assume that if filename matches and probe is
>>> sufficiently high enough (this must be defined), this is the correct
>>> format.

Currently a score of 100 will lead to accepting the file and no further
probing. trying the format with matching extension first should not
be any worse than the random order it is currently. So iam definitly
fine with this if it is faster ...


>>
>> Well, there is one reason that speaks against it: it means that cases
>> where no extension is available (http streaming often) might become
>> tested much worse. But apart from that I do not like much how
>> extensions are handled currently (though IMO your suggestions give it
>> too much relevance).
>
> Yes, indeed if extension is missing, all formats must be tested.

> I'm also thinking that extension can be used to break probing score ties, 

ive thought about that one too, in effect that would just add a +0.5 to
the score for a filename match ...
I suspect that shouldnt do much harm and surely would help in a few cases


> in this case for example.
>
>> In case your comment is related to the DV probe: an argument for 
>> complicating
>> it anyway is that currently single-frame DV files are only detected with a
>> warning due to low score, there are apparently people using single-frame 
>> DV
>> and raising the score is not ok since the test is not really reliable.
>
> I definitely trust you on improving the dv probe function, I'm just a bit 
> worried about the code, mpeg probing code is frightening me :>

mpeg is pretty robust if we dont consider the low <=25 scores i think, also
its not complicated at all if you understand it and quite flexible ...
the basic principle is just to count various things that MUST occur in a
valid mpeg file and count various things that MUST NOT occur in a mpeg file
the ifs() below that check for the various 
PS/PES/not really whatthe spec said/... variants. Mans probably can explain
the ifs better than i could ...

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

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- 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/20090925/60b1bbf2/attachment.pgp>



More information about the ffmpeg-devel mailing list