Audio duration problem with wavdest
- From: geo@xxxxxxxxxxxxxx
- Date: Tue, 16 Oct 2007 10:32:46 -0700
Hello everyone,
I've been working on some code to extract the audio from a multimedia
file and save the audio as a PCM WAV file. This is a pretty
straightforward problem and my solution was to render a filtergraph
for the multimedia file in question (mpg, mpa, mp2, mp3, aif, wav,
wma, wmv, whatever), then modify the graph to ditch the video and
hook-in the wavedest filter and a filewriter.
This worked like a charm, sort of.
Before I explain the problem, I think it's important to point out the
media files in question are usually close to 2 hours in duration, and
the encoding of these files is outside my control. For this reason, I
see quite an interesting spectrum of goofy bitrates, codecs, dropped
frames, etc. in the files I am trying to process.
Because of the specifics of my application, it is very important the
extracted PCM audio matches (as closely as possible) the original
audio stream within the source multimedia file. Or to put it in
simpler terms, the duration of the extracted PCM audio should very
closely match the original multimedia duration.
I won't go into all the details about why this is so important, but
think of it in terms of seeking to a particular time in both the
source and output. If I seek to 1 hour in both files and hit the play
button, the audio should be a spot-on match.
I wrote a quick batch processor to excercise my code by extracting the
audio from a couple hundred files. The results were not promising.
A very large percentage of files exhibit some pretty big differences
between the original multimedia duation and the extracted audio
duration. Sometimes on the order of 30+ seconds. This is definately
not going to work, so I am trying to figure out what is going on.
I have some guesses, but I was hoping someone might shed some light on
this for me.
My ultimate goal is to identify (1) Why the durations are so
dramatically different and (2) adapt the WavDest to 'insert' or
'delete' samples when appropriate to keep the timebase between my
source and destination the same.
Sorry for the small book, am I making sense? Has anyone got any
ideas?
Thanks!
Geo...
.
- Follow-Ups:
- Re: Audio duration problem with wavdest
- From: Alessandro Angeli
- Re: Audio duration problem with wavdest
- Prev by Date: Re: asking about direct sound buffer
- Next by Date: Re: Audio duration problem with wavdest
- Previous by thread: Re: Cannot Restore lost buffer on Vista
- Next by thread: Re: Audio duration problem with wavdest
- Index(es):
Relevant Pages
|