Re: [coreAudio] Detecting corrupted files
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