Re: How to programmatically check and fix asf files like asfcheck.exe

From: Alessandro Angeli [MVP::DigitalMedia] (nobody_at_nowhere.in.the.net)
Date: 04/28/04


Date: Wed, 28 Apr 2004 10:20:33 +0200

Justin Engelman wrote:

> Hello,
> How can I programmatically (preferrably from VB.NET)
> check for wma or wmv file corruption and try to fix
> errors like the WMTools ASFCheck command line utility
> does? Ideally I think it would be done using the Encoder
> SDK since that has an interface I can use from VB, unlike
> the Format SDK which requires some complex C++ (and I
> still have a lot to learn about C++ and the Windows SDK).
> Is this possible?
>
> Also, if anyone knows what exactly the ASFCheck utility
> is looking for to see if a file is corrupt and how it
> tries to fix the problem, could you please explain? I
> can't find any detailed documentation on MSDN or anywhere
> else online for ASFCheck.

ASFCheck is old and pre-dates the WMFSDK and anything based
on it (WME9 for example). There is no library to perform a
check because that is not something that can be done using
the WMFSDK.

ASFCheck scans the ASF structure itself and, since the ASF
syntax forces a given pattern in the file, it can determine
whether the file is corrupt and fix it (only to some
extent).

You can get the ASF specs from http://www.microsoft.com/asf
and scan the file yourself in any language that can read
binary files. It is not too difficult but not the easiest of
things either. Finding a reliable error detection and error
correction algorithm is a whole other story.

-- 
/**
 * Alessandro Angeli
 *
 * MVP :: Digital Media
 *
 * a dot angeli at biosys dot net
 */


Relevant Pages

  • Re: How to programmatically check and fix asf files like asfcheck.exe
    ... > check for wma or wmv file corruption and try to fix ... if anyone knows what exactly the ASFCheck utility ... > is looking for to see if a file is corrupt and how it ... ASFCheck scans the ASF structure itself and, ...
    (microsoft.public.windowsmedia.encoder)
  • Re: dump/restore corrupted filesystems
    ... and fsck can't fix the damage. ... That might be worth filing a PR for, especially the panics. ... If dump dies on ... So if any of these is corrupt, ...
    (freebsd-questions)
  • Re: Does Word SP-3 address the old problem of a build-up of list templates?
    ... Once a document is corrupt, merely opening it in a fixed system isn't likely ... it doesn't fix existing buildup. ... >>>> documents which had a build-up of list templates. ... >>>> necessary edit to the Windows registry which corrected the problem. ...
    (microsoft.public.word.numbering)
  • Re: dump/restore corrupted filesystems
    ... and fsck can't fix the damage. ... That might be worth filing a PR for, especially the panics. ... So if any of these is corrupt, ...
    (freebsd-questions)
  • Re: Cannot save work file / out of memory error
    ... I am almost certain that Normal.dotm is corrupt. ... that will fix only "new" documents. ... This technique for de-corrupting is known as "Doing a 'Maggie'", ... McGhie Information Engineering Pty Ltd ...
    (microsoft.public.mac.office.word)