• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [coreAudio] Detecting corrupted files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [coreAudio] Detecting corrupted files


  • Subject: Re: [coreAudio] Detecting corrupted files
  • From: "Alexander v. Below" <email@hidden>
  • Date: Wed, 8 Mar 2006 22:20:54 +0100


Am 08.03.2006 um 21:55 schrieb Brian Whitman:

QT will convert to LPCM, yes. Look for the ConvertMovieSndTrack example,

http://developer.apple.com/samplecode/ConvertMovieSndTrack/ ConvertMovieSndTrack.html

However, back to John's solution, you can assume the fork won't crash right away-- on my 2.5GB machine it takes a minute or so. So if you just read the first sample for example, you can assume it better come back within a second or so. But this is such a gross set of assumptions with concordant problems: reading off a CD, network drive; maybe the machine has tiny memory to begin with... a real solution either involves 1) detecting if the file is corrupted outside of CoreAudio, 2) using another reading library (QT, libavcodec, libmad etc) or 3) waiting for the fix.

Around 1), I found this: http://jo.ath.cx/soft/mp3check/ mp3check.html , it's a GPL mp3 integrity check. I ran it on one of my known bad files:

# curl -O http://variogr.am/clarity.mp3
# ./mp3check-0.7.3-macosx -eBS clarity.mp3

And it returned a host of "invalid header", "CRC error," etc. Good files did not return any such errors. So that's a start!

Thanks for you suggestions, I will see which route I will try.

The "timeout" forking sounds tempting, because it seems like that would fit well into the existing code. I would hate to use a different library, because our deadline is approaching fast. As for a fix: Where would it be fixed? I doubt that machines running 10.2.8 would benefit, unless we get some code that gets deployed with the appication.

FYI, on the file I am talking about, mp3check returns a pretty clear verdict:

"not an audio mpeg stream"

Alex

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: [coreAudio] Detecting corrupted files (From: lazzaro <email@hidden>)
 >Re: [coreAudio] Detecting corrupted files (From: Brian Whitman <email@hidden>)
 >Re: [coreAudio] Detecting corrupted files (From: "Alexander v. Below" <email@hidden>)
 >Re: [coreAudio] Detecting corrupted files (From: Brian Whitman <email@hidden>)

  • Prev by Date: Re: [coreAudio] Detecting corrupted files
  • Next by Date: Re: [coreAudio] Detecting corrupted files
  • Previous by thread: Re: [coreAudio] Detecting corrupted files
  • Next by thread: Re: [coreAudio] Detecting corrupted files
  • Index(es):
    • Date
    • Thread