<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><blockquote type="cite">I implemented a device source with Ross's help and made it to work. Now I am getting nice video but my audio is choppy and is not good. So my question is what is the right way of timestamping audio and video. I read that if your source is live than no need to set fFrameDurationInMicroSeconds</blockquote><div><br></div>That's correct. Because you are streaming from a live source, you shouldn't set "fDurationInMicroseconds" (sic).</div><div><br></div><div><br></div><div><blockquote type="cite">In my case I am using FFMpeg to encode a live stream into MPEG4 and AC3 and then streaming it using live555. Should I be sending the frame with gettimeofday() as presentation time. My understanding is that we need to calculate delta between frames and set the timestamping as it is possible that encoder can give 2 consecutive frames in short duration and may be take longer for 3rd packet.<br></blockquote></div><br><div>The presentation times - for both audio and video frames - should correspond to the times that the frames were *generated*. This is to ensure that when the receiver gets the incoming audio and video frames, it can feed them to the decoder at the appropriate time, so that audio and video will be properly synced.</div><div><br></div><div>So, if your audio frames come in 'bunches', then you shouldn't just call "gettimeofday()" each time. Instead, think about the times that the audio (and video) frames were really *generated*, and set appropriate presentation times for each.</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; "><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; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>