<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">The packet for the theora and vorbis have much closer granules time when using icecast2. When ezstream/icecast2 is used for a live stream the granules are far off. Packet 1392 of audio could sync with packet 234 of the video.<br><br>Since I e-mailed the mailinglist last, I tried something different.<br><br>I'm taking one second of audio and using the last time stamp of the packet of that one second interval as the current audio time. Theora is one frame per. packet so, that's easy. Then doing what I said concerning taking the difference between the first and the curent packet and using that value as the clock. So, every time I get a new packet from the Ogg stream I say:<br><br>audio_time = audio_time -
first_audio_time <br><br>The first timestamp after the media headers is greater than zero, I check for this in the code and compensate if it's not the case. <br><br>giving me the difference which will initially start at zero and increase. The same being done for the video.Then syncing the two by keeping the video and audio timestamps as close as possible before presenting them to the media device.<br><br>This seems to work well, but the ezstream/icecast2 stream is so slow that the buffering in my software causes the audio and video to stagger a lot. It's strange to me that the icecast2 stream alone without using ezstream is very fast and causes no buffering problem in my software.<br><br>Does anyone have any idea way ezstream would be so much slower than using icecast2 alone? I'm only using a cat <filename> in the ezstream config file.<br><br>I really appreciate the help.<br><br>Thanks<br><br><div style="font-family: times new roman,new
york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Conrad Parker <conrad@metadecks.org><br>To: Jim Smith <jimjim197@yahoo.com><br>Cc: theora-dev@xiph.org<br>Sent: Sunday, June 22, 2008 7:48:17 PM<br>Subject: Re: [theora-dev] syncing a live stream<br><br>
2008/6/23 Jim Smith <<a ymailto="mailto:jimjim197@yahoo.com" href="mailto:jimjim197@yahoo.com">jimjim197@yahoo.com</a>>:<br>> Hi,<br>><br>> When I sync the a/v with just an icecast2 stream I'm starting at the<br>> beginning of the stream so it's simpler. But, when I read the stream from<br>> icecast2/ezstream I get the stream after the beginning and the a/v timing on<br>> the packets need to be handled differently. Does anyone know what approach I<br>> should take to sync the live stream? There has to be some generic high-level<br>> logic for an OGG stream.<br><br>In what way is the a/v timing incorrect in your current<br>implementation? Can you give an example of the timestamps in the<br>resulting Ogg stream?<br><br>Conrad.<br></div></div></div><br>
</body></html>