Board index » delphi » File Sniffer Component ?

File Sniffer Component ?


2008-06-16 02:28:53 AM
delphi262
Hello there,
Before I go and construct one myself, are there any pre-made components that
will "sniff" a file header and tell me what it is ?
The types of file I am seeking are mp3, avi, mpg, flv, wmv and mov.
I would like to pass in a file and it tell me what type it is and if its a
valid header.
For example, I have an mp3 encoded with the LAME3.84 encoder, and doing a
google search it tells me that this encoder is broken somehow. This is quite
apparent as it plays distorted in WMP and my program as well.
Is there a component / routine that does this, or do I need to create it
myself ?
Regards
Anthoni
 
 

Re:File Sniffer Component ?

Anthoni Gardner writes:
Quote
Hello there,

Before I go and construct one myself, are there any pre-made components that
will "sniff" a file header and tell me what it is ?

The types of file I am seeking are mp3, avi, mpg, flv, wmv and mov.
I would like to pass in a file and it tell me what type it is and if its a
valid header.

For example, I have an mp3 encoded with the LAME3.84 encoder, and doing a
google search it tells me that this encoder is broken somehow. This is quite
apparent as it plays distorted in WMP and my program as well.

Is there a component / routine that does this, or do I need to create it
myself ?

Regards
Anthoni


here's a delphi wrapper to the MediaInfo Dll
forum.doom9.org/showthread.php
Get the latest version of MediaInfo here:
mediainfo.sourceforge.net/en
 

Re:File Sniffer Component ?

Anthoni Gardner writes:
Quote

Before I go and construct one myself, are there any pre-made components that
will "sniff" a file header and tell me what it is ?

I don't know about any library but I have been using Get Type of File
(called GT2) found here : philip.helger.com/gt/program.php
The developer is a great hacker and will surely help you as he seems to
be Delphi fan.
HTH
Yogi Yang
 

Re:File Sniffer Component ?

Yogi Yang writes:
Quote
Anthoni Gardner writes:
>
>Before I go and construct one myself, are there any pre-made
>components that will "sniff" a file header and tell me what it is ?
>
I don't know about any library but I have been using Get Type of File
(called GT2) found here : philip.helger.com/gt/program.php

The developer is a great hacker and will surely help you as he seems to
be Delphi fan.

HTH

Yogi Yang
Yogi do you have the functional interface for the Dlls as the only
documentation I can see is for the command line?
cheers, harrie.
 

Re:File Sniffer Component ?

Hi,
Quote
here's a delphi wrapper to the MediaInfo Dll

forum.doom9.org/showthread.php
This is actually pretty good and might be worth using. Depending if Yogi can
get a wrapper for the DLL's for GT2. If he can will wait until I can test
that, otherwise I will use this one.
Thanks
Anthoni
 

Re:File Sniffer Component ?

Quote
Yogi do you have the functional interface for the Dlls as the only
documentation I can see is for the command line?
Yep me too looking for this. Dont want to have to call command line from my
program.
Failing this I will opt for MediaInfo.dll instead.
Regards
Anthoni