Re: Question about Audio tracks
- From: "Geoff Dunbar [MSFT]" <geoffdu@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 16 May 2005 11:25:47 -0700
When Becky says synchronize between streams, she means give the writer
samples in presentation time order, regardless of the stream number. So,
send audio sample timestamped 15000 ms _before_ video sample timestamped
15002 ms.
To answer what I think your question is, the timestamps on the samples you
give to the writer determine the order and synchronization when playing back
the file. So you need to be sure audio and video have the same starting
timestamp, if you expect them to play at the same time.
Geoff
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"smtppop" <smtppop@xxxxxxxx> wrote in message
news:uYqEOVdVFHA.616@xxxxxxxxxxxxxxxxxxxxxxx
> Thanks.
> More a quesiton about synchronization . If I need write the sample depend
> on the time stamp on it ?
>
> If the audio time stamp is natively different from the video time stamp,
how
> can i process it ?
>
> Thanks again.
>
>
> "Becky Weiss [MS]" <BeckyWeissMS@xxxxxxxxxxxxxxxxxxxxxxxxx> дÈëÏûÏ¢
> news:56881A9D-DB8F-47B1-8551-25CC628CDCA7@xxxxxxxxxxxxxxxx
> > There isn't sample code that does exactly this. But here's the general
> idea
> > of how I might add an audio track to an existing file original.asf:
> > 1) Encode your audio track into foo.wma
> > 2) Create two instances of the IWMSyncReader: one to read from
> original.asf,
> > and one to read from foo.wma.
> > 3) Create an IWMWriter to write output.asf and set the profile, using
the
> > mediatypes from original.asf and from foo.wma (make sure you get the
> > mediatypes exactly)
> > 4) Read samples from the two input files and pass them into
> > IWMWriterAdvanced::WriteStreamSample. Make sure you're synchronizing
> between
> > the various streams.
> >
> > Becky
> >
> > This posting is provided AS IS with no warranties and confers no rights.
> >
> > "smtppop" wrote:
> >
> > > I want to insert two or more audio tracks into asf file. But I can not
> find
> > > any sample code in WM format SDK 9.0 . I have no idea about this. Can
> you
> > > help me ? Where can i find the sample code or the instruction to do
this
> ?
> > >
> > >
> > >
>
>
.
- References:
- RE: Question about Audio tracks
- From: Becky Weiss [MS]
- Re: Question about Audio tracks
- From: smtppop
- RE: Question about Audio tracks
- Prev by Date: Re: re:wmv compressed payload sample
- Next by Date: REQ: Help w/ using Play While Archiving
- Previous by thread: Re: Question about Audio tracks
- Next by thread: crashes in WM9 codec DLLs
- Index(es):
Relevant Pages
|