Re: how to do the "NTSC" video timer
- From: "pango" <pango@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 6 Aug 2005 22:42:03 -0700
Chris,do you mean I can use the sound card as the timer source?It is a fancy
idea for me,and I don't know how to implement it,so can you give me a example?
"Chris P. [MVP]" wrote:
> On Sat, 6 Aug 2005 05:01:03 -0700, pango wrote:
>
> > Thanks Chris:
> > What I care is the AV sync problem when I use the "timeSetEvent()" to
> > do the 33ms timer,because the fps is faster than real(30.30fps>29.97fps),so
> > after some time the audio behind video.I think out a method to solve it:every
> > 3s ,drop a video frame,than the fps is close to real(about 30fps).
> > But I'm a newbie to video play working,so I'm not sure about my
> > method,and the fps is still faster than real about 0.03fps,so after 1
> > hours,the video will ahead audio about 3s,it is a big problem.So do you have
> > any suggest for my method?How can I play NTSC video that audio is still sync
> > with video?
>
> Because you have an audio track you can use this to govern the video
> rendering. Instead of trying to use the inaccurate system clock to count
> time, count time using the audio data. Count the number of audio samples
> that have been sent to the sound card, divide by the sample rate, multiply
> by the frame rate and you have a rock solid sync reference. Depending on
> what methods you are using to playback the audio, the method of getting the
> current sample count will vary.
>
.
- Follow-Ups:
- Re: how to do the "NTSC" video timer
- From: Chris P. [MVP]
- Re: how to do the "NTSC" video timer
- References:
- how to do the "NTSC" video timer
- From: pango
- Re: how to do the "NTSC" video timer
- From: Chris P. [MVP]
- Re: how to do the "NTSC" video timer
- From: pango
- Re: how to do the "NTSC" video timer
- From: Chris P. [MVP]
- Re: how to do the "NTSC" video timer
- From: pango
- Re: how to do the "NTSC" video timer
- From: Chris P. [MVP]
- how to do the "NTSC" video timer
- Prev by Date: Re: how to do the "NTSC" video timer
- Next by Date: how to convert 24bit audio to 16bit or 8bit
- Previous by thread: Re: how to do the "NTSC" video timer
- Next by thread: Re: how to do the "NTSC" video timer
- Index(es):
Relevant Pages
|