<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Thanks your answer.<div>There is another question about the scheduleDelayedTask(duration,x,x).</div><div>So how should I set the duration, then the audio and video would be sync.</div><div>Currently my every audio's frame is 20000ms. the video frame rate is 25fps.. Now I set the audio's next getframe time is 20000ms, video's next getframe time is 8000ms.</div><div>In such case, I use vlc to access it, it also shows that the audio is "PTS is out of range". It seems that the audio is too late. So if I slowed the video send rate, the result is video is "PTS is out range".</div><div>So is there any solution to solve it ?<br><br><br><br><br><div></div><div id="divNeteaseMailCard"></div><br>ÔÚ 2013-10-20 16:29:31£¬"Ross Finlayson" <finlayson@live555.com> дµÀ£º<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div><blockquote type="cite"><div lang="ZH-CN" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US"> In the videoframesource¡¯s getnextframe, if the buffer is nalu, not completely frame. So the fPresentationTime and fDurationInMicroseconds should only be set when the buffer is the last nalu in current frame.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US"> Is it right?</span></div></div></div></blockquote><div><br></div></div>Not quite. "fPresentationTime" should be set for every NAL unit that you deliver. However, for NAL units that make up the same access unit, the "fPresentationTime" value will be the same.<div><br></div><div>Also, if you are streaming from a live source (i.e., from an encoder), rather than from a file, then you don't need to set "fDurationInMicroseconds" at all. If, however, you are streaming pre-recorded video (e.g., from a file), then you will need to set "fDurationInMicroseconds" for the last NAL unit of the access unit (and leave "fDurationInMicroseconds" for the other NAL units at the default value of 0).</div><br><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></blockquote></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>