Re: Seeking Postion in an .avi file
- From: "Judi" <Judi@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 9 Jan 2006 01:57:03 -0800
Hi,
Thank you very much.It was quite useful to me.Would you please give me some
details about writing an interleaved 'rec' chunk?What do we specify in
dwInitialFrames field?If I specify audio preload value, does that mean a
single rec chunk always have sound data first followed by video data.Do I
need to implement a timer to decode/encode rec chunk.
Many Thanks
"Alessandro Angeli [MVP::DigitalMedia]" wrote:
> Judi wrote:
>
> > Am not using MSDN APis.Iam writing the code on my own.I
> > would like to know ,where the position information
> > resides in an .avi format file.
>
> Then I don't know what you mean by position information in
> an AVI file. If you are parsing the RIFF structure of the
> AVI yourself, you should have noticed that an AVI just
> contains the stream format definitions, the interleaved
> stream data and the optional index.
>
> If you want to seek to time T in the clip timeline, you must
> guess the byte offset in the file where the sample at time T
> is stored. To do that, you must scan the file and count the
> samples, because there is no timing information in the AVI
> itself, taking into consideration the bitrate for audio (if
> the audio is CBR, otherwise you can not reliably seek the
> audio) and frame rate for video (which is constant for AVI,
> so it is reliable). The information in the index will help
> you scan the file in a very efficient way.
>
> Of course, you must also take into account dropped samples
> (usually dropped video frames), and the video frame types
> (key- or delta-frame) because you can not start decoding
> from a delta-frame (and only the index will tell which
> frames are keyframes). You must also take into account the
> audio preroll.
>
> Also, when you have a video format with bidirectionally
> predicted frames (like MPEG-4 using B-BOPs), the frame order
> in the file is not the presentation order, so you may have
> frame lag when you seek and there is no reliable way to
> handle this only based on the info in the AVI.
>
>
> --
> // Alessandro Angeli
> // MVP :: Digital Media
> // a dot angeli at psynet dot net
>
>
>
.
- References:
- Re: Seeking Postion in an .avi file
- From: Alessandro Angeli [MVP::DigitalMedia]
- Re: Seeking Postion in an .avi file
- From: Alessandro Angeli [MVP::DigitalMedia]
- Re: Seeking Postion in an .avi file
- Prev by Date: Re: How can i Mix my audio stream?
- Next by Date: acmStreamOpen
- Previous by thread: Re: Seeking Postion in an .avi file
- Next by thread: mixerGetLineInfo returns strange dwLineID and dwSource
- Index(es):
Relevant Pages
|