<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-16329</id>
	<title>Nabble - Red5 - English</title>
	<updated>2009-11-27T08:27:27Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Red5---English-f16329.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Red5---English-f16329.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26544694</id>
	<title>SoundMixer.computeSpectrum rtmp livestream</title>
	<published>2009-11-27T08:27:27Z</published>
	<updated>2009-11-27T08:27:27Z</updated>
	<author>
		<name>John Hauf</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I'm new to this list and want to thank all developers of red5 for the
&lt;br&gt;great software.
&lt;br&gt;I'm devloping my first project with flex and red5 at the moment and try
&lt;br&gt;to use SoundMixer.computeSpectrum on a rtmp live stream. When I check
&lt;br&gt;the byteArray which is filled by computeSpectrum, it only contains zero
&lt;br&gt;values.
&lt;br&gt;If I use computeSpectrum with a rtmp file-stream, stored in the
&lt;br&gt;&amp;quot;streams&amp;quot; directory of the red5-server, everything works perfect. The
&lt;br&gt;only thing I change is the name of the stream in the
&lt;br&gt;netstream.play()-method.
&lt;br&gt;Does anybody have an idea why computeSpectrum is not working with the
&lt;br&gt;live stream?
&lt;br&gt;&lt;br&gt;Thank you,
&lt;br&gt;John
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544694&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SoundMixer.computeSpectrum-rtmp-livestream-tp26544694p26544694.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26544747</id>
	<title>Scope problem</title>
	<published>2009-11-27T08:18:11Z</published>
	<updated>2009-11-27T08:18:11Z</updated>
	<author>
		<name>Domingo Jurado</name>
	</author>
	<content type="html">Hi,&lt;br&gt;i&amp;#39;m having some problems with scope&amp;#39;s.&lt;br&gt;In the server side i create a new scope like &amp;quot;Paul Gregoire&amp;#39;s Blog&amp;quot; and then joined the clients.&lt;br&gt;&lt;br&gt;In my case i make join(client,&amp;quot;myapp/room/n&amp;quot;)&lt;br&gt;
&lt;br&gt;In my logs the join returns true, and when i get the scope by resolveScope(appScope,&amp;quot;room/n&amp;quot;), all works fine. Then i get connections or clients from this scope but i get nothing.&lt;br&gt;&lt;br&gt;Someone know&amp;#39;s what&amp;#39;s happen&amp;#39;s?&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26544747&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Scope-problem-tp26544747p26544747.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26543200</id>
	<title>red5 0.9.0rc1 .deb installation file</title>
	<published>2009-11-27T06:31:16Z</published>
	<updated>2009-11-27T06:31:16Z</updated>
	<author>
		<name>lee hughes</name>
	</author>
	<content type="html">Is a .deb file available for this, i see people talking about it on list , but can&amp;#39;t find it via the red5 pages or svn.&lt;br&gt;&lt;br&gt;is it even released, Sure i can use the zip, but my build process currently uses .deb&amp;#39;s!! :-(&lt;br&gt;
&lt;br&gt;hope you can point in the right direction.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;tox&lt;br&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26543200&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/red5-0.9.0rc1-.deb-installation-file-tp26543200p26543200.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26541951</id>
	<title>How to catch events like one video is over and another is started?</title>
	<published>2009-11-27T04:42:06Z</published>
	<updated>2009-11-27T04:42:06Z</updated>
	<author>
		<name>Tipugin Alexander</name>
	</author>
	<content type="html">Hello every1!
&lt;br&gt;How to catch events like one video is over and another is started on the serverside? I mean, i need to redefine some Shared Object value and let my flash player to know, that new video is started. How i can done this? In FMS it was pretty easy to done, but i am not very familiar with Java :(
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26541951&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-catch-events-like-one-video-is-over-and-another-is-started--tp26541951p26541951.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26540542</id>
	<title>Video/Audio Subscribe</title>
	<published>2009-11-27T02:32:21Z</published>
	<updated>2009-11-27T02:32:21Z</updated>
	<author>
		<name>ddprasad</name>
	</author>
	<content type="html">Hello Users,
&lt;br&gt;&lt;br&gt;I have been using Red5 since v6. I am gr8ful to its developers. Recently am doing some new experiments. 
&lt;br&gt;&lt;br&gt;In a scenario, there three clients and a server. All connected via red5 server. Server wants to apply video download/play restriction on some clients (may be on demand from client). 
&lt;br&gt;&lt;br&gt;Some examples are, apply watermark on all video being streamed or allow video to be played at certain speed only. Is it possible? How?
&lt;br&gt;&lt;br&gt;Thanking You all!!
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Video-Audio-Subscribe-tp26540542p26540542.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26539857</id>
	<title>unequal delay on audio and video</title>
	<published>2009-11-27T01:24:35Z</published>
	<updated>2009-11-27T01:24:35Z</updated>
	<author>
		<name>Daniele Bettella</name>
	</author>
	<content type="html">That's not that different from what I do:
&lt;br&gt;In Xuggle I have a timebase for the audio stream of 1/90000; the dts start at zero (of course) and are incremented by 90000*(576/22050), which is the correct frame duration in ticks of timebase, for every packet. Let's leave audio alone; with this configuration audio dies after a while (8 minutes with a buffer of one second on the player); that is, something is still streaming, but I can't hear anything.
&lt;br&gt;If that dts interval is correct I don't know what else I am doing wrong.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-----Messaggio originale-----
&lt;br&gt;Da: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] Per conto di Andy Shaules
&lt;br&gt;Inviato: venerdì 27 novembre 2009 8.54
&lt;br&gt;A: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Oggetto: Re: [Red5] R: R: R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;&lt;br&gt;//Assume you have a class field name 'lastTimecode' of type double.
&lt;br&gt;&lt;br&gt;//read the header.
&lt;br&gt;MP3Header header=new MP3Header(hdr);
&lt;br&gt;&lt;br&gt;//get the span
&lt;br&gt;double timeSpan=header.frameDuration();
&lt;br&gt;&lt;br&gt;//set the timestamp at last audioFrame start + last audioFrame duration.
&lt;br&gt;audio.setTimestamp((int) lastTimecode);
&lt;br&gt;&lt;br&gt;//Adjust to end of frame for next one.
&lt;br&gt;lastTimecode+=timeSpan;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thats it. There is no mystery about it. This will stream for hours and hours 
&lt;br&gt;and be in sync.
&lt;br&gt;&lt;br&gt;Stamp the latest video frame you get with the latest audio &amp;nbsp;timestamp you 
&lt;br&gt;have.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: Daniele Bettella
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Sent: Thursday, November 26, 2009 11:23 PM
&lt;br&gt;Subject: [Red5] R: R: R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;&lt;br&gt;I've checked a thing, but I'm not sure it makes sense..
&lt;br&gt;Let's say I stream audio only with timestamps calculated from mp3header.
&lt;br&gt;I then check the application log (which takes the time of every post) and I 
&lt;br&gt;get something like this:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at log time zero I send rtmp packet with timestamp zero (just 
&lt;br&gt;shifted the times)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at log time 19578 (that is, 19.5 seconds after the first packet) 
&lt;br&gt;I send packet with timestamp 20000
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at log time 79125 I send timestamp 80000
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at log time 158483 I send timestamp 160000 (the audio probably 
&lt;br&gt;already died by now)
&lt;br&gt;&lt;br&gt;Is this a good way of telling whether timestamps are correct or not?
&lt;br&gt;&lt;br&gt;Da: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] Per conto di 
&lt;br&gt;Andy Shaules
&lt;br&gt;Inviato: giovedì 26 novembre 2009 8.22
&lt;br&gt;A: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Oggetto: Re: [Red5] R: R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;&lt;br&gt;10000 samples/ second &amp;nbsp; &amp;nbsp;* &amp;nbsp;100 bits/ sample = 1000000 bits /second
&lt;br&gt;&lt;br&gt;1000000 bits/second &amp;nbsp;* &amp;nbsp;1 byte / 8 bits &amp;nbsp;= &amp;nbsp; &amp;nbsp; 125000 &amp;nbsp;bytes per second
&lt;br&gt;&lt;br&gt;But forget all of that!
&lt;br&gt;&lt;br&gt;If you count the frame durations calculated by the mp3 header then you 
&lt;br&gt;should be fine. If its not fine, then you are doing something else not 
&lt;br&gt;right.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is my situation. I get 3 mp3 frames for every one h264 frame, yet I can 
&lt;br&gt;still take the calculated values from the mp3 header add all of them up, and 
&lt;br&gt;my stream will still be synchronized after 24 hours.
&lt;br&gt;&lt;br&gt;Something you are doing is not right. Yes the duration will calculate to a 
&lt;br&gt;double precision value and the timestamp will take an integer, but if you 
&lt;br&gt;keep the double precision around for the whole process, you will be good to 
&lt;br&gt;go.
&lt;br&gt;&lt;br&gt;If fact, if your client is running windows, windows will adjust the system 
&lt;br&gt;clock to fill those micro gaps, just as FLV video framerate is determined by 
&lt;br&gt;the audio sample counts.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: Daniele Bettella
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Sent: Wednesday, November 25, 2009 10:58 PM
&lt;br&gt;Subject: [Red5] R: R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;I thank you very much for helping me; let's see if I had this right:
&lt;br&gt;Let's say I have 100 byte per packet, at 100 bit per sample, with a sample 
&lt;br&gt;rate of 10000 samples per second; this means I have 8 samples per packet and 
&lt;br&gt;so 8/10000 seconds per packet. and this is my timestamp interval.
&lt;br&gt;Is this correct?
&lt;br&gt;&lt;br&gt;Da: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] Per conto di 
&lt;br&gt;Andy Shaules
&lt;br&gt;Inviato: mercoledì 25 novembre 2009 18.57
&lt;br&gt;A: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Oggetto: Re: [Red5] R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;wrong,
&lt;br&gt;&lt;br&gt;audio duration is an equation without guesses. that is your only error.
&lt;br&gt;&lt;br&gt;You have sample rate, you have bits per sample, you have bits per second. 
&lt;br&gt;You can take that info and calulate to the 100 nano-second accuracy if you 
&lt;br&gt;need too.
&lt;br&gt;&lt;br&gt;Now, caviot! &amp;nbsp;FLV frame rate is determined by audio sample count per frame, 
&lt;br&gt;not time of frame.
&lt;br&gt;&lt;br&gt;If you count duration correctly you will not have lag problems.
&lt;br&gt;&lt;br&gt;I do it with both mp3 and aac based on number of bytes in the buffer and 
&lt;br&gt;sample rate/bits per sample. Works perfect every time.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: Daniele Bettella
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Sent: Wednesday, November 25, 2009 1:06 AM
&lt;br&gt;Subject: [Red5] R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;I need help on understanding how this works..
&lt;br&gt;In the current solution I set the interval between audio timestamps by 
&lt;br&gt;guess,
&lt;br&gt;It is 2080 on a stream timebase of 1/90000.
&lt;br&gt;This way audio and video are in sync, at least for a while; there are some 
&lt;br&gt;other &amp;nbsp;problems, but with this not being a correct solution I don't bother.
&lt;br&gt;&lt;br&gt;So what if I calculate the audio frame duration? It comes out at 26ish 
&lt;br&gt;msecs; I set the timestamp interval based on the stream timebase. The logs 
&lt;br&gt;say my audio rtmp packets are correctly spaced at 26 msecs, but the end 
&lt;br&gt;result is audio and video not in sync and lagging.
&lt;br&gt;With my guess of 2080 the rtmp audio packets are every 23 msecs, but this 
&lt;br&gt;doesn't make much sense.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Da: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] Per conto di 
&lt;br&gt;Daniele Bettella
&lt;br&gt;Inviato: martedì 24 novembre 2009 18.11
&lt;br&gt;A: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Oggetto: [Red5] R: R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;Cancel the previous message, I forgot to enable the interleaving of packets.
&lt;br&gt;Apparently I still need to understand how to correlate the stream timebase 
&lt;br&gt;and the audio frame duration.
&lt;br&gt;&lt;br&gt;Da: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] Per conto di 
&lt;br&gt;Daniele Bettella
&lt;br&gt;Inviato: martedì 24 novembre 2009 17.58
&lt;br&gt;A: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Oggetto: [Red5] R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;Ok, I was able to calculate my timestamps based on the code in the mp3 
&lt;br&gt;header; it all works fine for the first minutes, but after a while I begin 
&lt;br&gt;to notice a little delay on audio. I think this could be because the frame 
&lt;br&gt;duration is calculated as
&lt;br&gt;576 / (getSampleRate() * 0.001)
&lt;br&gt;Inevitably this is not an integer, but the set dts requires one.
&lt;br&gt;So whatever I do (and based on the stream timebase, which is 1/90000) I'll 
&lt;br&gt;need to transform a double into a long and hence introduce error.
&lt;br&gt;And my audio will not be in sync.
&lt;br&gt;&lt;br&gt;I suppose there's a solution to this, but what is it?
&lt;br&gt;&lt;br&gt;Daniele
&lt;br&gt;&lt;br&gt;&lt;br&gt;Da: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] Per conto di 
&lt;br&gt;Andy Shaules
&lt;br&gt;Inviato: lunedì 23 novembre 2009 17.14
&lt;br&gt;A: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Oggetto: Re: [Red5] unequal delay on audio and video
&lt;br&gt;&lt;br&gt;You should base your timestamps on the mp3 frame durations, not guesses.
&lt;br&gt;&lt;br&gt;Look at the MP3Header class in the red5.io.mp3 package. Use the class to 
&lt;br&gt;determine each duration.
&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: Daniele Bettella
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Sent: Monday, November 23, 2009 3:05 AM
&lt;br&gt;Subject: [Red5] unequal delay on audio and video
&lt;br&gt;&lt;br&gt;I'm using Xuggle to publish an H264/mp3 live stream on red5. Audio and video 
&lt;br&gt;are already encoded when they get to xuggle, so I do no transcoding, I just 
&lt;br&gt;pass the packets on to red5.
&lt;br&gt;Now, if I stream video only I have a small delay, around 0.3 secs, I don't 
&lt;br&gt;know where it comes from, but it's either in xuggle/red5 or the player 
&lt;br&gt;(which has a buffer of zero, btw). I could live with this delay (well, sort 
&lt;br&gt;of), problem is, when I stream audio too this has a delay of little less 
&lt;br&gt;than one second, resulting in audio and video not in sync.
&lt;br&gt;So came the idea to force interleaving of packets (that is, using 
&lt;br&gt;container.writePacket(packet, true)). This meant adjusting dsts by hand, 
&lt;br&gt;since my packets had no timestamps to start with. This brought two problems:
&lt;br&gt;&lt;br&gt;1) &amp;nbsp; &amp;nbsp; &amp;nbsp;I know how to adjust timestamps on video packets (since I have one 
&lt;br&gt;frame per packet), but I had to guess on audio packets;
&lt;br&gt;2) &amp;nbsp; &amp;nbsp; &amp;nbsp;My best guess resulted in audio and video in sync (at least for the 
&lt;br&gt;first minutes), but with a delay of one second which grew when insufficient 
&lt;br&gt;bandwidths came out (streaming locally). Which is no good at all.
&lt;br&gt;&lt;br&gt;What I'd really like would be to minimize and balance the delays when non 
&lt;br&gt;interleaving packets in xuggle, because that's the way I have had the best 
&lt;br&gt;results.
&lt;br&gt;&lt;br&gt;Also to note: if I stream video only at 15fps instead of 30fps the delay 
&lt;br&gt;grows from .3 to .8 seconds (which, as a side effect, make audio and video 
&lt;br&gt;in sync if I add it).
&lt;br&gt;&lt;br&gt;I'd really love to figure out where these delays come out from.
&lt;br&gt;Thanks in advance.
&lt;br&gt;&lt;br&gt;Daniele
&lt;br&gt;&lt;br&gt;P.S.
&lt;br&gt;I'm sending this on osflash for now, since my membership on the official 
&lt;br&gt;group is pending
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=25&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=26&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26539857&amp;i=27&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/unequal-delay-on-audio-and-video-tp26476221p26539857.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26538956</id>
	<title>Re: R:  R:  R:  unequal delay on audio and video</title>
	<published>2009-11-26T23:53:30Z</published>
	<updated>2009-11-26T23:53:30Z</updated>
	<author>
		<name>Andy Shaules</name>
	</author>
	<content type="html">&lt;br&gt;//Assume you have a class field name 'lastTimecode' of type double.
&lt;br&gt;&lt;br&gt;//read the header.
&lt;br&gt;MP3Header header=new MP3Header(hdr);
&lt;br&gt;&lt;br&gt;//get the span
&lt;br&gt;double timeSpan=header.frameDuration();
&lt;br&gt;&lt;br&gt;//set the timestamp at last audioFrame start + last audioFrame duration.
&lt;br&gt;audio.setTimestamp((int) lastTimecode);
&lt;br&gt;&lt;br&gt;//Adjust to end of frame for next one.
&lt;br&gt;lastTimecode+=timeSpan;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thats it. There is no mystery about it. This will stream for hours and hours 
&lt;br&gt;and be in sync.
&lt;br&gt;&lt;br&gt;Stamp the latest video frame you get with the latest audio &amp;nbsp;timestamp you 
&lt;br&gt;have.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: Daniele Bettella
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Sent: Thursday, November 26, 2009 11:23 PM
&lt;br&gt;Subject: [Red5] R: R: R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;&lt;br&gt;I've checked a thing, but I'm not sure it makes sense..
&lt;br&gt;Let's say I stream audio only with timestamps calculated from mp3header.
&lt;br&gt;I then check the application log (which takes the time of every post) and I 
&lt;br&gt;get something like this:
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at log time zero I send rtmp packet with timestamp zero (just 
&lt;br&gt;shifted the times)
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at log time 19578 (that is, 19.5 seconds after the first packet) 
&lt;br&gt;I send packet with timestamp 20000
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at log time 79125 I send timestamp 80000
&lt;br&gt;- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at log time 158483 I send timestamp 160000 (the audio probably 
&lt;br&gt;already died by now)
&lt;br&gt;&lt;br&gt;Is this a good way of telling whether timestamps are correct or not?
&lt;br&gt;&lt;br&gt;Da: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] Per conto di 
&lt;br&gt;Andy Shaules
&lt;br&gt;Inviato: giovedì 26 novembre 2009 8.22
&lt;br&gt;A: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Oggetto: Re: [Red5] R: R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;&lt;br&gt;10000 samples/ second &amp;nbsp; &amp;nbsp;* &amp;nbsp;100 bits/ sample = 1000000 bits /second
&lt;br&gt;&lt;br&gt;1000000 bits/second &amp;nbsp;* &amp;nbsp;1 byte / 8 bits &amp;nbsp;= &amp;nbsp; &amp;nbsp; 125000 &amp;nbsp;bytes per second
&lt;br&gt;&lt;br&gt;But forget all of that!
&lt;br&gt;&lt;br&gt;If you count the frame durations calculated by the mp3 header then you 
&lt;br&gt;should be fine. If its not fine, then you are doing something else not 
&lt;br&gt;right.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Here is my situation. I get 3 mp3 frames for every one h264 frame, yet I can 
&lt;br&gt;still take the calculated values from the mp3 header add all of them up, and 
&lt;br&gt;my stream will still be synchronized after 24 hours.
&lt;br&gt;&lt;br&gt;Something you are doing is not right. Yes the duration will calculate to a 
&lt;br&gt;double precision value and the timestamp will take an integer, but if you 
&lt;br&gt;keep the double precision around for the whole process, you will be good to 
&lt;br&gt;go.
&lt;br&gt;&lt;br&gt;If fact, if your client is running windows, windows will adjust the system 
&lt;br&gt;clock to fill those micro gaps, just as FLV video framerate is determined by 
&lt;br&gt;the audio sample counts.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: Daniele Bettella
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Sent: Wednesday, November 25, 2009 10:58 PM
&lt;br&gt;Subject: [Red5] R: R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;I thank you very much for helping me; let's see if I had this right:
&lt;br&gt;Let's say I have 100 byte per packet, at 100 bit per sample, with a sample 
&lt;br&gt;rate of 10000 samples per second; this means I have 8 samples per packet and 
&lt;br&gt;so 8/10000 seconds per packet. and this is my timestamp interval.
&lt;br&gt;Is this correct?
&lt;br&gt;&lt;br&gt;Da: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] Per conto di 
&lt;br&gt;Andy Shaules
&lt;br&gt;Inviato: mercoledì 25 novembre 2009 18.57
&lt;br&gt;A: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Oggetto: Re: [Red5] R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;wrong,
&lt;br&gt;&lt;br&gt;audio duration is an equation without guesses. that is your only error.
&lt;br&gt;&lt;br&gt;You have sample rate, you have bits per sample, you have bits per second. 
&lt;br&gt;You can take that info and calulate to the 100 nano-second accuracy if you 
&lt;br&gt;need too.
&lt;br&gt;&lt;br&gt;Now, caviot! &amp;nbsp;FLV frame rate is determined by audio sample count per frame, 
&lt;br&gt;not time of frame.
&lt;br&gt;&lt;br&gt;If you count duration correctly you will not have lag problems.
&lt;br&gt;&lt;br&gt;I do it with both mp3 and aac based on number of bytes in the buffer and 
&lt;br&gt;sample rate/bits per sample. Works perfect every time.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: Daniele Bettella
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Sent: Wednesday, November 25, 2009 1:06 AM
&lt;br&gt;Subject: [Red5] R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;I need help on understanding how this works..
&lt;br&gt;In the current solution I set the interval between audio timestamps by 
&lt;br&gt;guess,
&lt;br&gt;It is 2080 on a stream timebase of 1/90000.
&lt;br&gt;This way audio and video are in sync, at least for a while; there are some 
&lt;br&gt;other &amp;nbsp;problems, but with this not being a correct solution I don't bother.
&lt;br&gt;&lt;br&gt;So what if I calculate the audio frame duration? It comes out at 26ish 
&lt;br&gt;msecs; I set the timestamp interval based on the stream timebase. The logs 
&lt;br&gt;say my audio rtmp packets are correctly spaced at 26 msecs, but the end 
&lt;br&gt;result is audio and video not in sync and lagging.
&lt;br&gt;With my guess of 2080 the rtmp audio packets are every 23 msecs, but this 
&lt;br&gt;doesn't make much sense.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Da: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] Per conto di 
&lt;br&gt;Daniele Bettella
&lt;br&gt;Inviato: martedì 24 novembre 2009 18.11
&lt;br&gt;A: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Oggetto: [Red5] R: R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;Cancel the previous message, I forgot to enable the interleaving of packets.
&lt;br&gt;Apparently I still need to understand how to correlate the stream timebase 
&lt;br&gt;and the audio frame duration.
&lt;br&gt;&lt;br&gt;Da: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] Per conto di 
&lt;br&gt;Daniele Bettella
&lt;br&gt;Inviato: martedì 24 novembre 2009 17.58
&lt;br&gt;A: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Oggetto: [Red5] R: unequal delay on audio and video
&lt;br&gt;&lt;br&gt;Ok, I was able to calculate my timestamps based on the code in the mp3 
&lt;br&gt;header; it all works fine for the first minutes, but after a while I begin 
&lt;br&gt;to notice a little delay on audio. I think this could be because the frame 
&lt;br&gt;duration is calculated as
&lt;br&gt;576 / (getSampleRate() * 0.001)
&lt;br&gt;Inevitably this is not an integer, but the set dts requires one.
&lt;br&gt;So whatever I do (and based on the stream timebase, which is 1/90000) I'll 
&lt;br&gt;need to transform a double into a long and hence introduce error.
&lt;br&gt;And my audio will not be in sync.
&lt;br&gt;&lt;br&gt;I suppose there's a solution to this, but what is it?
&lt;br&gt;&lt;br&gt;Daniele
&lt;br&gt;&lt;br&gt;&lt;br&gt;Da: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] Per conto di 
&lt;br&gt;Andy Shaules
&lt;br&gt;Inviato: lunedì 23 novembre 2009 17.14
&lt;br&gt;A: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Oggetto: Re: [Red5] unequal delay on audio and video
&lt;br&gt;&lt;br&gt;You should base your timestamps on the mp3 frame durations, not guesses.
&lt;br&gt;&lt;br&gt;Look at the MP3Header class in the red5.io.mp3 package. Use the class to 
&lt;br&gt;determine each duration.
&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: Daniele Bettella
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Sent: Monday, November 23, 2009 3:05 AM
&lt;br&gt;Subject: [Red5] unequal delay on audio and video
&lt;br&gt;&lt;br&gt;I'm using Xuggle to publish an H264/mp3 live stream on red5. Audio and video 
&lt;br&gt;are already encoded when they get to xuggle, so I do no transcoding, I just 
&lt;br&gt;pass the packets on to red5.
&lt;br&gt;Now, if I stream video only I have a small delay, around 0.3 secs, I don't 
&lt;br&gt;know where it comes from, but it's either in xuggle/red5 or the player 
&lt;br&gt;(which has a buffer of zero, btw). I could live with this delay (well, sort 
&lt;br&gt;of), problem is, when I stream audio too this has a delay of little less 
&lt;br&gt;than one second, resulting in audio and video not in sync.
&lt;br&gt;So came the idea to force interleaving of packets (that is, using 
&lt;br&gt;container.writePacket(packet, true)). This meant adjusting dsts by hand, 
&lt;br&gt;since my packets had no timestamps to start with. This brought two problems:
&lt;br&gt;&lt;br&gt;1) &amp;nbsp; &amp;nbsp; &amp;nbsp;I know how to adjust timestamps on video packets (since I have one 
&lt;br&gt;frame per packet), but I had to guess on audio packets;
&lt;br&gt;2) &amp;nbsp; &amp;nbsp; &amp;nbsp;My best guess resulted in audio and video in sync (at least for the 
&lt;br&gt;first minutes), but with a delay of one second which grew when insufficient 
&lt;br&gt;bandwidths came out (streaming locally). Which is no good at all.
&lt;br&gt;&lt;br&gt;What I'd really like would be to minimize and balance the delays when non 
&lt;br&gt;interleaving packets in xuggle, because that's the way I have had the best 
&lt;br&gt;results.
&lt;br&gt;&lt;br&gt;Also to note: if I stream video only at 15fps instead of 30fps the delay 
&lt;br&gt;grows from .3 to .8 seconds (which, as a side effect, make audio and video 
&lt;br&gt;in sync if I add it).
&lt;br&gt;&lt;br&gt;I'd really love to figure out where these delays come out from.
&lt;br&gt;Thanks in advance.
&lt;br&gt;&lt;br&gt;Daniele
&lt;br&gt;&lt;br&gt;P.S.
&lt;br&gt;I'm sending this on osflash for now, since my membership on the official 
&lt;br&gt;group is pending
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538956&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/unequal-delay-on-audio-and-video-tp26476221p26538956.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26538714</id>
	<title>R:  R:  R:  unequal delay on audio and video</title>
	<published>2009-11-26T23:23:14Z</published>
	<updated>2009-11-26T23:23:14Z</updated>
	<author>
		<name>Daniele Bettella</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;
&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=IT link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I&amp;#8217;ve checked a
thing, but I&amp;#8217;m not sure it makes sense..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Let&amp;#8217;s say I
stream audio only with timestamps calculated from mp3header.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I then check the application
log (which takes the time of every post) and I get something like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='margin-left:20.25pt;text-indent:-18.0pt;
mso-list:l0 level1 lfo1'&gt;&lt;![if !supportLists]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;span style='mso-list:Ignore'&gt;-&lt;span style='font:7.0pt &quot;Times New Roman&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;at log
time zero I send rtmp packet with timestamp zero (just shifted the times)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='margin-left:20.25pt;text-indent:-18.0pt;
mso-list:l0 level1 lfo1'&gt;&lt;![if !supportLists]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;span style='mso-list:Ignore'&gt;-&lt;span style='font:7.0pt &quot;Times New Roman&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;at log
time 19578 (that is, 19.5 seconds after the first packet) I send packet with
timestamp 20000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='margin-left:20.25pt;text-indent:-18.0pt;
mso-list:l0 level1 lfo1'&gt;&lt;![if !supportLists]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;span style='mso-list:Ignore'&gt;-&lt;span style='font:7.0pt &quot;Times New Roman&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;at log
time 79125 I send timestamp 80000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='margin-left:20.25pt;text-indent:-18.0pt;
mso-list:l0 level1 lfo1'&gt;&lt;![if !supportLists]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;span style='mso-list:Ignore'&gt;-&lt;span style='font:7.0pt &quot;Times New Roman&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;at log
time 158483 I send timestamp 160000 (the audio probably already died by now)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Is this a good way of
telling whether timestamps are correct or not? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; giovedì 26 novembre 2009 8.22&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] R: R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;10000
samples/ second&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp; 100 bits/ sample = 1000000 bits
/second&amp;nbsp; &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;1000000
bits/second&amp;nbsp; *&amp;nbsp; 1 byte / 8 bits&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
125000&amp;nbsp; bytes per second&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:
&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;But
forget all of that!&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
you count the frame durations calculated by the mp3 header then you should be
fine. If&amp;nbsp;its not fine, then you are doing something else not right.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Here
is my situation. I get 3 mp3 frames for every one h264 frame, yet I can still
take the calculated values from the mp3 header add all of them up, and my
stream&amp;nbsp;will still be synchronized after 24 hours.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Something
you are doing is not right. Yes the duration will calculate to a double
precision value and the timestamp will take an integer, but if you keep the
double precision around for the whole process, you will be good to go.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
fact, if your client is running windows, windows will adjust the system clock
to fill those micro gaps, just as FLV video framerate is determined by the
audio sample counts. &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Wednesday, November
25, 2009 10:58 PM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] R: R: unequal
delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I thank you very much
for helping me; let&amp;#8217;s see if I had this right:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Let&amp;#8217;s say I
have 100 byte per packet, at 100 bit per sample, with a sample rate of 10000
samples per second; this means I have 8 samples per packet and so 8/10000
seconds per packet&amp;#8230; and this is my timestamp interval.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Is this correct?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; mercoledì 25 novembre 2009 18.57&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;wrong,&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;audio
duration is an equation without guesses. that is your only error.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;You
have sample rate, you have bits per sample, you have bits per second. You can
take that info and calulate to the 100 nano-second accuracy if you need too.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Now,
caviot!&amp;nbsp; FLV frame rate is determined by audio sample count per frame, not
time of frame.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
you count duration correctly you will not have lag problems.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;I
do it with both mp3 and aac based on number of bytes in the buffer and sample
rate/bits per sample. Works perfect every time.&lt;/span&gt;&lt;span style='font-size:
12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Wednesday, November
25, 2009 1:06 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] R: unequal
delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I need help on
understanding how this works..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;In the current
solution I set the interval between audio timestamps by guess,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;It is 2080 on a
stream timebase of 1/90000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;This way audio and
video are in sync, at least for a while; there are some other &amp;nbsp;problems,
but with this not being a correct solution I don&amp;#8217;t bother.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;So what if I
calculate the audio frame duration? It comes out at 26ish msecs; I set the timestamp
interval based on the stream timebase. The logs say my audio rtmp packets are
correctly spaced at 26 msecs, but the end result is audio and video not in sync
and lagging.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;With my guess of 2080
the rtmp audio packets are every 23 msecs, but this doesn&amp;#8217;t make much
sense&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele
Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; martedì 24 novembre 2009 18.11&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Cancel the previous message,
I forgot to enable the interleaving of packets&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Apparently I still
need to understand how to correlate the stream timebase and the audio frame
duration&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele
Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; martedì 24 novembre 2009 17.58&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Ok, I was able to calculate my timestamps based on the code in the mp3 header; it all works fine for the first minutes, but after a while I begin to notice a little delay on audio. I think this could be because the frame duration is calculated as &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;576 / (getSampleRate() * 0.001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Inevitably this is not an integer, but the set dts requires one.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;So whatever I do (and based on the stream timebase, which is 1/90000) I&amp;#8217;ll need to transform a double into a long and hence introduce error&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;And my audio will not be in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;I suppose there&amp;#8217;s a solution to this, but what is it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Daniele&lt;/span&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy
Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; lunedì 23 novembre 2009 17.14&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;You
should base your timestamps on the mp3 frame durations, not guesses.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Look
at the MP3Header class in the red5.io.mp3 package. Use the class to determine
each duration. &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Monday, November 23,
2009 3:05 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] unequal delay
on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;m using Xuggle to publish an
H264/mp3 live stream on red5. Audio and video are already encoded when they get
to xuggle, so I do no transcoding, I just pass the packets on to red5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Now, if I stream video only I have a small
delay, around 0.3 secs, I don&amp;#8217;t know where it comes from, but it&amp;#8217;s
either in xuggle/red5 or the player (which has a buffer of zero, btw). I could
live with this delay (well, sort of), problem is, when I stream audio too this
has a delay of little less than one second, resulting in audio and video not in
sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;So came the idea to force interleaving of
packets (that is, using container.writePacket(packet, true)). This meant adjusting
dsts by hand, since my packets had no timestamps to start with. This brought
two problems: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt'&gt;&lt;span lang=EN-US&gt;1)&lt;/span&gt;&lt;span lang=EN-US style='font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span lang=EN-US&gt;I know how to adjust timestamps on video packets (since
I have one frame per packet), but I had to guess on audio packets;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt'&gt;&lt;span lang=EN-US&gt;2)&lt;/span&gt;&lt;span lang=EN-US style='font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span lang=EN-US&gt;My best guess resulted in audio and video in sync (at
least for the first minutes), but with a delay of one second which grew when
insufficient bandwidths came out (streaming locally). Which is no good at all.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;What I&amp;#8217;d really like would be to
minimize and balance the delays when non interleaving packets in xuggle,
because that&amp;#8217;s the way I have had the best results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Also to note: if I stream video only at
15fps instead of 30fps the delay grows from .3 to .8 seconds (which, as a side
effect, make audio and video in sync if I add it).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;d really love to figure out where
these delays come out from.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Thanks in advance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Daniele&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;P.S.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;m sending this on osflash for now,
since my membership on the official group is pending&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538714&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/unequal-delay-on-audio-and-video-tp26476221p26538714.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26538614</id>
	<title>R:  Frequent freezes/jerky on .9.0 RC2 (main trunk)</title>
	<published>2009-11-26T23:10:46Z</published>
	<updated>2009-11-26T23:10:46Z</updated>
	<author>
		<name>Daniele Bettella</name>
	</author>
	<content type="html">Hi, I've been using steamStream for a while, but I have heavily modified it for my needs. I have that message sometimes, but rarely.
&lt;br&gt;I probably won't be the best at helping though..
&lt;br&gt;What happens if you don't set timestamps, of if you change timebases?
&lt;br&gt;&lt;br&gt;-----Messaggio originale-----
&lt;br&gt;Da: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538614&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538614&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] Per conto di Jonathan Hawkes
&lt;br&gt;Inviato: giovedì 26 novembre 2009 20.56
&lt;br&gt;A: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538614&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;
&lt;br&gt;Oggetto: [Red5] Frequent freezes/jerky on .9.0 RC2 (main trunk)
&lt;br&gt;&lt;br&gt;I am using steamStream (&lt;a href=&quot;http://www.red5wiki.com/wiki/SteamStream&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.red5wiki.com/wiki/SteamStream&lt;/a&gt;) in 
&lt;br&gt;production. I only modified it to pull from HTTP instead of RTSP. It has 
&lt;br&gt;worked well for the most part. I started using it with the main trunk of 
&lt;br&gt;Red5 before any of the .9.0 release candidates. (So I don't know if that 
&lt;br&gt;was technically .8.0 or what.)
&lt;br&gt;&lt;br&gt;However, ever since the merge with the xuggle_timestamp_fixes branch, 
&lt;br&gt;video has been choppy and frequently freezes on the client side. (The 
&lt;br&gt;stream continues to broadcast, and a page refresh temporarily &amp;quot;fixes&amp;quot; it.)
&lt;br&gt;&lt;br&gt;I don't really know if this is a bug in Red5 or in steamStream. 
&lt;br&gt;SteamStream sets the timestamp for each packet and auto increments each 
&lt;br&gt;timestamp. I've been seeing at lot of the below errors (which weren't 
&lt;br&gt;there before), and I figure that they are probably related. Any thoughts 
&lt;br&gt;on how to fix or should I revert to 0.8.0?
&lt;br&gt;&lt;br&gt;2009-11-26 11:16:55,775 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259415775) to stream time (369600)
&lt;br&gt;2009-11-26 11:16:55,775 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259415775) to stream time (368000)
&lt;br&gt;2009-11-26 11:16:57,497 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259417497) to stream time (371200)
&lt;br&gt;2009-11-26 11:16:57,498 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259417498) to stream time (369600)
&lt;br&gt;2009-11-26 11:17:24,033 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259444033) to stream time (396800)
&lt;br&gt;2009-11-26 11:17:24,033 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259444033) to stream time (395200)
&lt;br&gt;2009-11-26 11:17:25,493 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259445493) to stream time (398400)
&lt;br&gt;2009-11-26 11:17:25,494 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259445494) to stream time (396800)
&lt;br&gt;2009-11-26 11:17:27,146 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259447146) to stream time (400000)
&lt;br&gt;2009-11-26 11:17:27,146 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259447146) to stream time (398400)
&lt;br&gt;2009-11-26 11:17:28,762 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259448762) to stream time (401600)
&lt;br&gt;2009-11-26 11:17:28,762 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259448762) to stream time (400000)
&lt;br&gt;2009-11-26 11:17:30,435 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259450435) to stream time (403200)
&lt;br&gt;2009-11-26 11:17:30,436 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259450436) to stream time (401600)
&lt;br&gt;2009-11-26 11:17:32,397 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259452397) to stream time (404800)
&lt;br&gt;2009-11-26 11:17:32,398 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259452398) to stream time (403200)
&lt;br&gt;2009-11-26 11:17:33,739 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259453739) to stream time (406400)
&lt;br&gt;2009-11-26 11:17:33,740 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259453740) to stream time (404800)
&lt;br&gt;2009-11-26 11:17:35,756 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259455756) to stream time (408000)
&lt;br&gt;2009-11-26 11:17:35,756 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259455756) to stream time (406400)
&lt;br&gt;2009-11-26 11:17:37,216 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259457216) to stream time (409600)
&lt;br&gt;2009-11-26 11:17:37,216 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259457216) to stream time (408000)
&lt;br&gt;2009-11-26 11:17:39,146 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259459146) to stream time (411200)
&lt;br&gt;2009-11-26 11:17:39,147 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259459147) to stream time (409600)
&lt;br&gt;2009-11-26 11:17:40,706 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259460706) to stream time (412800)
&lt;br&gt;2009-11-26 11:17:40,706 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259460706) to stream time (411200)
&lt;br&gt;2009-11-26 11:17:42,582 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259462582) to stream time (414400)
&lt;br&gt;2009-11-26 11:17:42,582 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259462582) to stream time (412800)
&lt;br&gt;&lt;br&gt;Thanks in advance,
&lt;br&gt;Jonathan Hawkes
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538614&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26538614&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Frequent-freezes-jerky-on-.9.0-RC2-%28main-trunk%29-tp26534279p26538614.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26535816</id>
	<title>JNDI in red5</title>
	<published>2009-11-26T14:41:21Z</published>
	<updated>2009-11-26T14:41:21Z</updated>
	<author>
		<name>dennis_gull</name>
	</author>
	<content type="html">Hey,
&lt;br&gt;&lt;br&gt;I'm new to Java and I can't get connection pooling to work, What I did was to followed &lt;a href=&quot;http://www.red5tutorials.net/index.php/Tutorials:MySQL_and_Red5#Method_2:_JNDI_.28connection_pool.29&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt;&amp;nbsp;but it says I have to put the context/resource inside the server.xml file inside the tomcat conf folder, however I'm using the standalone version of red5 and it doesn't have a server.xml file, I tried to create the file but it didn't work.
&lt;br&gt;&lt;br&gt;This is the error message I'm receiving:
&lt;br&gt;&lt;br&gt;2009-11-26 23:33:13,327 [main] WARN &amp;nbsp;o.a.c.core.NamingContextListener - Failed to register in JMX: javax.naming.NamingException: Could not create resource factory instance [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory]
&lt;br&gt;2009-11-26 23:33:13,478 [Launcher:/lobby] ERROR org.red5.core.Application - JNDIException: Could not create resource factory instance</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/JNDI-in-red5-tp26535816p26535816.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26535145</id>
	<title>MP3's with iTunes album artwork do not play in Red5</title>
	<published>2009-11-26T13:35:22Z</published>
	<updated>2009-11-26T13:35:22Z</updated>
	<author>
		<name>Wasim K</name>
	</author>
	<content type="html">I have just had a customer point out to me that when they upload certain mp3's, the server does not stream them. He sent me the mp3's and after trial and error I realised it was the iTunes album artwork that was causing the problem. 
&lt;br&gt;&lt;br&gt;I'm actually using oflaDemo to stream the mp3's - why do they not work with iTunes album artwork? How can I solve this problem? Has anyone ever experienced anything like this?</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/MP3%27s-with-iTunes-album-artwork-do-not-play-in-Red5-tp26535145p26535145.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26534279</id>
	<title>Frequent freezes/jerky on .9.0 RC2 (main trunk)</title>
	<published>2009-11-26T11:56:01Z</published>
	<updated>2009-11-26T11:56:01Z</updated>
	<author>
		<name>Jonathan Hawkes</name>
	</author>
	<content type="html">I am using steamStream (&lt;a href=&quot;http://www.red5wiki.com/wiki/SteamStream&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.red5wiki.com/wiki/SteamStream&lt;/a&gt;) in 
&lt;br&gt;production. I only modified it to pull from HTTP instead of RTSP. It has 
&lt;br&gt;worked well for the most part. I started using it with the main trunk of 
&lt;br&gt;Red5 before any of the .9.0 release candidates. (So I don't know if that 
&lt;br&gt;was technically .8.0 or what.)
&lt;br&gt;&lt;br&gt;However, ever since the merge with the xuggle_timestamp_fixes branch, 
&lt;br&gt;video has been choppy and frequently freezes on the client side. (The 
&lt;br&gt;stream continues to broadcast, and a page refresh temporarily &amp;quot;fixes&amp;quot; it.)
&lt;br&gt;&lt;br&gt;I don't really know if this is a bug in Red5 or in steamStream. 
&lt;br&gt;SteamStream sets the timestamp for each packet and auto increments each 
&lt;br&gt;timestamp. I've been seeing at lot of the below errors (which weren't 
&lt;br&gt;there before), and I figure that they are probably related. Any thoughts 
&lt;br&gt;on how to fix or should I revert to 0.8.0?
&lt;br&gt;&lt;br&gt;2009-11-26 11:16:55,775 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259415775) to stream time (369600)
&lt;br&gt;2009-11-26 11:16:55,775 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259415775) to stream time (368000)
&lt;br&gt;2009-11-26 11:16:57,497 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259417497) to stream time (371200)
&lt;br&gt;2009-11-26 11:16:57,498 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259417498) to stream time (369600)
&lt;br&gt;2009-11-26 11:17:24,033 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259444033) to stream time (396800)
&lt;br&gt;2009-11-26 11:17:24,033 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259444033) to stream time (395200)
&lt;br&gt;2009-11-26 11:17:25,493 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259445493) to stream time (398400)
&lt;br&gt;2009-11-26 11:17:25,494 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259445494) to stream time (396800)
&lt;br&gt;2009-11-26 11:17:27,146 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259447146) to stream time (400000)
&lt;br&gt;2009-11-26 11:17:27,146 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259447146) to stream time (398400)
&lt;br&gt;2009-11-26 11:17:28,762 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259448762) to stream time (401600)
&lt;br&gt;2009-11-26 11:17:28,762 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259448762) to stream time (400000)
&lt;br&gt;2009-11-26 11:17:30,435 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259450435) to stream time (403200)
&lt;br&gt;2009-11-26 11:17:30,436 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259450436) to stream time (401600)
&lt;br&gt;2009-11-26 11:17:32,397 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259452397) to stream time (404800)
&lt;br&gt;2009-11-26 11:17:32,398 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259452398) to stream time (403200)
&lt;br&gt;2009-11-26 11:17:33,739 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259453739) to stream time (406400)
&lt;br&gt;2009-11-26 11:17:33,740 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259453740) to stream time (404800)
&lt;br&gt;2009-11-26 11:17:35,756 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259455756) to stream time (408000)
&lt;br&gt;2009-11-26 11:17:35,756 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259455756) to stream time (406400)
&lt;br&gt;2009-11-26 11:17:37,216 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259457216) to stream time (409600)
&lt;br&gt;2009-11-26 11:17:37,216 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259457216) to stream time (408000)
&lt;br&gt;2009-11-26 11:17:39,146 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259459146) to stream time (411200)
&lt;br&gt;2009-11-26 11:17:39,147 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259459147) to stream time (409600)
&lt;br&gt;2009-11-26 11:17:40,706 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259460706) to stream time (412800)
&lt;br&gt;2009-11-26 11:17:40,706 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259460706) to stream time (411200)
&lt;br&gt;2009-11-26 11:17:42,582 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259462582) to stream time (414400)
&lt;br&gt;2009-11-26 11:17:42,582 [Thread-20] INFO &amp;nbsp;
&lt;br&gt;o.r.s.n.r.codec.RTMPProtocolEncoder - Resetting clock time 
&lt;br&gt;(1259259462582) to stream time (412800)
&lt;br&gt;&lt;br&gt;Thanks in advance,
&lt;br&gt;Jonathan Hawkes
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26534279&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Frequent-freezes-jerky-on-.9.0-RC2-%28main-trunk%29-tp26534279p26534279.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26531498</id>
	<title>R:  R:  R:  R:  unequal delay on audio and video</title>
	<published>2009-11-26T08:00:24Z</published>
	<updated>2009-11-26T08:00:24Z</updated>
	<author>
		<name>Daniele Bettella</name>
	</author>
	<content type="html">&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;

&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;
&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=IT link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I&amp;#8217;m sorry, I meant the
timestamps are spaced by 26 mseconds, not 23.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele
Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; giovedì 26 novembre 2009 15.36&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: R: R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Let me see if I
understood this..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;The mp3 header says a
frame duration is:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;576/(22050*0.001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;You talked about
sample count, in fact my coder says I have by default 576 samples per frame and
I suppose that&amp;#8217;s where the 576 on the mp3header comes out.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;If I take that value
of frame duration I have timestamps spaced by 23 mseconds, that don&amp;#8217;t look
right because:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'&gt;&lt;![if !supportLists]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;span style='mso-list:Ignore'&gt;1)&lt;span style='font:7.0pt &quot;Times New Roman&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Audio won&amp;#8217;t be in sync with video (then maybe
is video that has wrong timestamps?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'&gt;&lt;![if !supportLists]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;span style='mso-list:Ignore'&gt;2)&lt;span style='font:7.0pt &quot;Times New Roman&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;If I send audio only with those timestamps it
goes on for a bit (two or three minutes) and then dies.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy
Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; giovedì 26 novembre 2009 8.22&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] R: R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;10000
samples/ second&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp; 100 bits/ sample = 1000000 bits
/second&amp;nbsp; &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;1000000
bits/second&amp;nbsp; *&amp;nbsp; 1 byte / 8 bits&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
125000&amp;nbsp; bytes per second&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:
&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;But
forget all of that!&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
you count the frame durations calculated by the mp3 header then you should be
fine. If&amp;nbsp;its not fine, then you are doing something else not right.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Here
is my situation. I get 3 mp3 frames for every one h264 frame, yet I can still
take the calculated values from the mp3 header add all of them up, and my
stream&amp;nbsp;will still be synchronized after 24 hours.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Something
you are doing is not right. Yes the duration will calculate to a double
precision value and the timestamp will take an integer, but if you keep the
double precision around for the whole process, you will be good to go.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
fact, if your client is running windows, windows will adjust the system clock
to fill those micro gaps, just as FLV video framerate is determined by the
audio sample counts. &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Wednesday, November
25, 2009 10:58 PM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] R: R: unequal
delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I thank you very much
for helping me; let&amp;#8217;s see if I had this right:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Let&amp;#8217;s say I have 100
byte per packet, at 100 bit per sample, with a sample rate of 10000 samples per
second; this means I have 8 samples per packet and so 8/10000 seconds per
packet&amp;#8230; and this is my timestamp interval.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Is this correct?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; mercoledì 25 novembre 2009 18.57&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;wrong,&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;audio
duration is an equation without guesses. that is your only error.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;You
have sample rate, you have bits per sample, you have bits per second. You can take
that info and calulate to the 100 nano-second accuracy if you need too.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Now,
caviot!&amp;nbsp; FLV frame rate is determined by audio sample count per frame, not
time of frame.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
you count duration correctly you will not have lag problems.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;I
do it with both mp3 and aac based on number of bytes in the buffer and sample
rate/bits per sample. Works perfect every time.&lt;/span&gt;&lt;span style='font-size:
12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Wednesday, November
25, 2009 1:06 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] R: unequal
delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I need help on
understanding how this works..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;In the current
solution I set the interval between audio timestamps by guess,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;It is 2080 on a
stream timebase of 1/90000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;This way audio and
video are in sync, at least for a while; there are some other &amp;nbsp;problems,
but with this not being a correct solution I don&amp;#8217;t bother.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;So what if I
calculate the audio frame duration? It comes out at 26ish msecs; I set the
timestamp interval based on the stream timebase. The logs say my audio rtmp
packets are correctly spaced at 26 msecs, but the end result is audio and video
not in sync and lagging.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;With my guess of 2080
the rtmp audio packets are every 23 msecs, but this doesn&amp;#8217;t make much sense&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele
Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; martedì 24 novembre 2009 18.11&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Cancel the previous
message, I forgot to enable the interleaving of packets&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Apparently I still
need to understand how to correlate the stream timebase and the audio frame
duration&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele
Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; martedì 24 novembre 2009 17.58&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Ok, I was able to calculate my timestamps based on the code in the mp3 header; it all works fine for the first minutes, but after a while I begin to notice a little delay on audio. I think this could be because the frame duration is calculated as &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;576 / (getSampleRate() * 0.001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Inevitably this is not an integer, but the set dts requires one.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;So whatever I do (and based on the stream timebase, which is 1/90000) I&amp;#8217;ll need to transform a double into a long and hence introduce error&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;And my audio will not be in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;I suppose there&amp;#8217;s a solution to this, but what is it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Daniele&lt;/span&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy
Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; lunedì 23 novembre 2009 17.14&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;You
should base your timestamps on the mp3 frame durations, not guesses.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Look
at the MP3Header class in the red5.io.mp3 package. Use the class to determine
each duration. &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Monday, November 23,
2009 3:05 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] unequal delay
on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;m using Xuggle to publish an H264/mp3
live stream on red5. Audio and video are already encoded when they get to
xuggle, so I do no transcoding, I just pass the packets on to red5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Now, if I stream video only I have a small
delay, around 0.3 secs, I don&amp;#8217;t know where it comes from, but it&amp;#8217;s either in
xuggle/red5 or the player (which has a buffer of zero, btw). I could live with
this delay (well, sort of), problem is, when I stream audio too this has a
delay of little less than one second, resulting in audio and video not in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;So came the idea to force interleaving of
packets (that is, using container.writePacket(packet, true)). This meant
adjusting dsts by hand, since my packets had no timestamps to start with. This
brought two problems: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt'&gt;&lt;span lang=EN-US&gt;1)&lt;/span&gt;&lt;span lang=EN-US style='font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span lang=EN-US&gt;I know how to adjust timestamps on video packets (since
I have one frame per packet), but I had to guess on audio packets;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt'&gt;&lt;span lang=EN-US&gt;2)&lt;/span&gt;&lt;span lang=EN-US style='font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span lang=EN-US&gt;My best guess resulted in audio and video in sync (at
least for the first minutes), but with a delay of one second which grew when insufficient
bandwidths came out (streaming locally). Which is no good at all.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;What I&amp;#8217;d really like would be to minimize
and balance the delays when non interleaving packets in xuggle, because that&amp;#8217;s
the way I have had the best results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Also to note: if I stream video only at
15fps instead of 30fps the delay grows from .3 to .8 seconds (which, as a side
effect, make audio and video in sync if I add it).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;d really love to figure out where these
delays come out from.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Thanks in advance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Daniele&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;P.S.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;m sending this on osflash for now, since
my membership on the official group is pending&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=25&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=26&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26531498&amp;i=27&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/unequal-delay-on-audio-and-video-tp26476221p26531498.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26530342</id>
	<title>R:  R:  R:  unequal delay on audio and video</title>
	<published>2009-11-26T06:36:17Z</published>
	<updated>2009-11-26T06:36:17Z</updated>
	<author>
		<name>Daniele Bettella</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;
&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=IT link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Let me see if I
understood this..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;The mp3 header says a
frame duration is:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;576/(22050*0.001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;You talked about
sample count, in fact my coder says I have by default 576 samples per frame and
I suppose that&amp;#8217;s where the 576 on the mp3header comes out.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;If I take that value
of frame duration I have timestamps spaced by 23 mseconds, that don&amp;#8217;t
look right because:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'&gt;&lt;![if !supportLists]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;span style='mso-list:Ignore'&gt;1)&lt;span style='font:7.0pt &quot;Times New Roman&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Audio won&amp;#8217;t be in sync with video (then
maybe is video that has wrong timestamps?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo1'&gt;&lt;![if !supportLists]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;span style='mso-list:Ignore'&gt;2)&lt;span style='font:7.0pt &quot;Times New Roman&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;If I send audio only with those timestamps it
goes on for a bit (two or three minutes) and then dies.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy
Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; giovedì 26 novembre 2009 8.22&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] R: R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;10000
samples/ second&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp; 100 bits/ sample = 1000000 bits
/second&amp;nbsp; &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;1000000
bits/second&amp;nbsp; *&amp;nbsp; 1 byte / 8 bits&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
125000&amp;nbsp; bytes per second&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:
&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;But
forget all of that!&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
you count the frame durations calculated by the mp3 header then you should be
fine. If&amp;nbsp;its not fine, then you are doing something else not right.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Here
is my situation. I get 3 mp3 frames for every one h264 frame, yet I can still
take the calculated values from the mp3 header add all of them up, and my
stream&amp;nbsp;will still be synchronized after 24 hours.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Something
you are doing is not right. Yes the duration will calculate to a double
precision value and the timestamp will take an integer, but if you keep the
double precision around for the whole process, you will be good to go.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
fact, if your client is running windows, windows will adjust the system clock
to fill those micro gaps, just as FLV video framerate is determined by the
audio sample counts. &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Wednesday, November
25, 2009 10:58 PM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] R: R: unequal
delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I thank you very much
for helping me; let&amp;#8217;s see if I had this right:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Let&amp;#8217;s say I
have 100 byte per packet, at 100 bit per sample, with a sample rate of 10000
samples per second; this means I have 8 samples per packet and so 8/10000
seconds per packet&amp;#8230; and this is my timestamp interval.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Is this correct?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; mercoledì 25 novembre 2009 18.57&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;wrong,&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;audio
duration is an equation without guesses. that is your only error.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;You
have sample rate, you have bits per sample, you have bits per second. You can
take that info and calulate to the 100 nano-second accuracy if you need too.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Now,
caviot!&amp;nbsp; FLV frame rate is determined by audio sample count per frame, not
time of frame.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
you count duration correctly you will not have lag problems.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;I
do it with both mp3 and aac based on number of bytes in the buffer and sample
rate/bits per sample. Works perfect every time.&lt;/span&gt;&lt;span style='font-size:
12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Wednesday, November
25, 2009 1:06 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] R: unequal
delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I need help on
understanding how this works..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;In the current
solution I set the interval between audio timestamps by guess,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;It is 2080 on a
stream timebase of 1/90000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;This way audio and
video are in sync, at least for a while; there are some other &amp;nbsp;problems,
but with this not being a correct solution I don&amp;#8217;t bother.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;So what if I calculate
the audio frame duration? It comes out at 26ish msecs; I set the timestamp
interval based on the stream timebase. The logs say my audio rtmp packets are
correctly spaced at 26 msecs, but the end result is audio and video not in sync
and lagging.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;With my guess of 2080
the rtmp audio packets are every 23 msecs, but this doesn&amp;#8217;t make much
sense&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele
Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; martedì 24 novembre 2009 18.11&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Cancel the previous
message, I forgot to enable the interleaving of packets&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Apparently I still
need to understand how to correlate the stream timebase and the audio frame
duration&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; martedì 24 novembre 2009 17.58&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Ok, I was able to calculate my timestamps based on the code in the mp3 header; it all works fine for the first minutes, but after a while I begin to notice a little delay on audio. I think this could be because the frame duration is calculated as &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;576 / (getSampleRate() * 0.001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Inevitably this is not an integer, but the set dts requires one.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;So whatever I do (and based on the stream timebase, which is 1/90000) I&amp;#8217;ll need to transform a double into a long and hence introduce error&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;And my audio will not be in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;I suppose there&amp;#8217;s a solution to this, but what is it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Daniele&lt;/span&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy
Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; lunedì 23 novembre 2009 17.14&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;You
should base your timestamps on the mp3 frame durations, not guesses.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Look
at the MP3Header class in the red5.io.mp3 package. Use the class to determine
each duration. &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Monday, November 23,
2009 3:05 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] unequal delay
on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;m using Xuggle to publish an H264/mp3
live stream on red5. Audio and video are already encoded when they get to
xuggle, so I do no transcoding, I just pass the packets on to red5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Now, if I stream video only I have a small
delay, around 0.3 secs, I don&amp;#8217;t know where it comes from, but it&amp;#8217;s
either in xuggle/red5 or the player (which has a buffer of zero, btw). I could
live with this delay (well, sort of), problem is, when I stream audio too this
has a delay of little less than one second, resulting in audio and video not in
sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;So came the idea to force interleaving of
packets (that is, using container.writePacket(packet, true)). This meant
adjusting dsts by hand, since my packets had no timestamps to start with. This
brought two problems: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt'&gt;&lt;span lang=EN-US&gt;1)&lt;/span&gt;&lt;span lang=EN-US style='font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span lang=EN-US&gt;I know how to adjust timestamps on video packets (since
I have one frame per packet), but I had to guess on audio packets;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt'&gt;&lt;span lang=EN-US&gt;2)&lt;/span&gt;&lt;span lang=EN-US style='font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span lang=EN-US&gt;My best guess resulted in audio and video in sync (at
least for the first minutes), but with a delay of one second which grew when
insufficient bandwidths came out (streaming locally). Which is no good at all.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;What I&amp;#8217;d really like would be to
minimize and balance the delays when non interleaving packets in xuggle,
because that&amp;#8217;s the way I have had the best results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Also to note: if I stream video only at
15fps instead of 30fps the delay grows from .3 to .8 seconds (which, as a side
effect, make audio and video in sync if I add it).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;d really love to figure out where
these delays come out from.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Thanks in advance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Daniele&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;P.S.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;m sending this on osflash for now,
since my membership on the official group is pending&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26530342&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/unequal-delay-on-audio-and-video-tp26476221p26530342.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26525977</id>
	<title>R:  R:  R:  unequal delay on audio and video</title>
	<published>2009-11-26T00:28:47Z</published>
	<updated>2009-11-26T00:28:47Z</updated>
	<author>
		<name>Daniele Bettella</name>
	</author>
	<content type="html">&lt;META HTTP-EQUIV=&quot;Content-Type&quot; CONTENT=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;

&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;
&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=IT link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I&amp;#8217;m using a modified
version of steamStream, which does no transcoding and processes audio and video
on different threads&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy
Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; giovedì 26 novembre 2009 8.32&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] R: R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;what
is the broadcasting source program?&lt;/span&gt;&lt;span style='font-size:12.0pt;
font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Using
xuggler but how?&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bowljoman@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Wednesday, November
25, 2009 11:21 PM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Re: [Red5] R: R:
unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;10000
samples/ second&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp; 100 bits/ sample = 1000000 bits /second&amp;nbsp;
&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;1000000
bits/second&amp;nbsp; *&amp;nbsp; 1 byte / 8 bits&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
125000&amp;nbsp; bytes per second&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:
&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;But
forget all of that!&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
you count the frame durations calculated by the mp3 header then you should be
fine. If&amp;nbsp;its not fine, then you are doing something else not right.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Here
is my situation. I get 3 mp3 frames for every one h264 frame, yet I can still
take the calculated values from the mp3 header add all of them up, and my
stream&amp;nbsp;will still be synchronized after 24 hours.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Something
you are doing is not right. Yes the duration will calculate to a double
precision value and the timestamp will take an integer, but if you keep the
double precision around for the whole process, you will be good to go.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
fact, if your client is running windows, windows will adjust the system clock
to fill those micro gaps, just as FLV video framerate is determined by the
audio sample counts. &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Wednesday, November
25, 2009 10:58 PM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] R: R: unequal
delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I thank you very much
for helping me; let&amp;#8217;s see if I had this right:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Let&amp;#8217;s say I have 100
byte per packet, at 100 bit per sample, with a sample rate of 10000 samples per
second; this means I have 8 samples per packet and so 8/10000 seconds per
packet&amp;#8230; and this is my timestamp interval.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Is this correct?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; mercoledì 25 novembre 2009 18.57&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;wrong,&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;audio
duration is an equation without guesses. that is your only error.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;You
have sample rate, you have bits per sample, you have bits per second. You can
take that info and calulate to the 100 nano-second accuracy if you need too.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Now,
caviot!&amp;nbsp; FLV frame rate is determined by audio sample count per frame, not
time of frame.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
you count duration correctly you will not have lag problems.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;I
do it with both mp3 and aac based on number of bytes in the buffer and sample
rate/bits per sample. Works perfect every time.&lt;/span&gt;&lt;span style='font-size:
12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Wednesday, November
25, 2009 1:06 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] R: unequal
delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I need help on
understanding how this works..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;In the current
solution I set the interval between audio timestamps by guess,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;It is 2080 on a stream
timebase of 1/90000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;This way audio and
video are in sync, at least for a while; there are some other &amp;nbsp;problems,
but with this not being a correct solution I don&amp;#8217;t bother.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;So what if I
calculate the audio frame duration? It comes out at 26ish msecs; I set the
timestamp interval based on the stream timebase. The logs say my audio rtmp
packets are correctly spaced at 26 msecs, but the end result is audio and video
not in sync and lagging.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;With my guess of 2080
the rtmp audio packets are every 23 msecs, but this doesn&amp;#8217;t make much sense&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele
Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; martedì 24 novembre 2009 18.11&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Cancel the previous
message, I forgot to enable the interleaving of packets&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Apparently I still
need to understand how to correlate the stream timebase and the audio frame
duration&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele
Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; martedì 24 novembre 2009 17.58&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Ok, I was able to calculate my timestamps based on the code in the mp3 header; it all works fine for the first minutes, but after a while I begin to notice a little delay on audio. I think this could be because the frame duration is calculated as &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;576 / (getSampleRate() * 0.001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Inevitably this is not an integer, but the set dts requires one.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;So whatever I do (and based on the stream timebase, which is 1/90000) I&amp;#8217;ll need to transform a double into a long and hence introduce error&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;And my audio will not be in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;I suppose there&amp;#8217;s a solution to this, but what is it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Daniele&lt;/span&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;
[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; lunedì 23 novembre 2009 17.14&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;You
should base your timestamps on the mp3 frame durations, not guesses.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Look
at the MP3Header class in the red5.io.mp3 package. Use the class to determine
each duration. &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Monday, November 23,
2009 3:05 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] unequal delay
on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;m using Xuggle to publish an H264/mp3
live stream on red5. Audio and video are already encoded when they get to
xuggle, so I do no transcoding, I just pass the packets on to red5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Now, if I stream video only I have a small
delay, around 0.3 secs, I don&amp;#8217;t know where it comes from, but it&amp;#8217;s either in
xuggle/red5 or the player (which has a buffer of zero, btw). I could live with
this delay (well, sort of), problem is, when I stream audio too this has a
delay of little less than one second, resulting in audio and video not in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;So came the idea to force interleaving of
packets (that is, using container.writePacket(packet, true)). This meant
adjusting dsts by hand, since my packets had no timestamps to start with. This
brought two problems: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt'&gt;&lt;span lang=EN-US&gt;1)&lt;/span&gt;&lt;span lang=EN-US style='font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span lang=EN-US&gt;I know how to adjust timestamps on video packets (since
I have one frame per packet), but I had to guess on audio packets;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt'&gt;&lt;span lang=EN-US&gt;2)&lt;/span&gt;&lt;span lang=EN-US style='font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span lang=EN-US&gt;My best guess resulted in audio and video in sync (at
least for the first minutes), but with a delay of one second which grew when
insufficient bandwidths came out (streaming locally). Which is no good at all.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;What I&amp;#8217;d really like would be to minimize
and balance the delays when non interleaving packets in xuggle, because that&amp;#8217;s
the way I have had the best results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Also to note: if I stream video only at
15fps instead of 30fps the delay grows from .3 to .8 seconds (which, as a side
effect, make audio and video in sync if I add it).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;d really love to figure out where these
delays come out from.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Thanks in advance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Daniele&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;P.S.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;m sending this on osflash for now, since
my membership on the official group is pending&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=25&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=26&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525977&amp;i=27&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/unequal-delay-on-audio-and-video-tp26476221p26525977.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26525448</id>
	<title>Re: R:  R:  unequal delay on audio and video</title>
	<published>2009-11-25T23:32:03Z</published>
	<updated>2009-11-25T23:32:03Z</updated>
	<author>
		<name>Andy Shaules</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML xmlns=&quot;http://www.w3.org/TR/REC-html40&quot; xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot;&gt;&lt;HEAD&gt;
&lt;META http-equiv=Content-Type content=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;META content=&quot;MSHTML 6.00.2900.5890&quot; name=GENERATOR&gt;&lt;!--[if !mso]&gt;
&lt;STYLE&gt;v\:* {
	BEHAVIOR: url(#default#VML)
}
o\:* {
	BEHAVIOR: url(#default#VML)
}
w\:* {
	BEHAVIOR: url(#default#VML)
}
.shape {
	BEHAVIOR: url(#default#VML)
}
&lt;/STYLE&gt;
&lt;![endif]--&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;&lt;/HEAD&gt;
&lt;BODY lang=IT vLink=purple link=blue bgColor=white&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;what is the broadcasting source 
program?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;Using xuggler but how?&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;BLOCKQUOTE style=&quot;PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px&quot;&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;----- Original Message ----- &lt;/DIV&gt;
  &lt;DIV style=&quot;BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black&quot;&gt;&lt;B&gt;From:&lt;/B&gt; 
  &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bowljoman@...&lt;/a&gt; &lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;To:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;Sent:&lt;/B&gt; Wednesday, November 25, 2009 11:21 
  PM&lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;Subject:&lt;/B&gt; Re: [Red5] R: R: unequal delay 
  on audio and video&lt;/DIV&gt;
  &lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;10000 samples/ second&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp; 
  100 bits/ sample = 1000000 bits /second&amp;nbsp; &lt;/FONT&gt;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;1000000 bits/second&amp;nbsp; *&amp;nbsp; 1 byte / 8 
  bits&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 125000&amp;nbsp; bytes per 
second&lt;/FONT&gt;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;But forget all of that!&lt;/FONT&gt;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;If you count the frame durations calculated by 
  the mp3 header then you should be fine. If&amp;nbsp;its not fine, then you are 
  doing something else not right.&lt;/FONT&gt;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;Here is my situation. I get 3 mp3 frames for 
  every one h264 frame, yet I can still take the calculated values from the mp3 
  header add all of them up, and my stream&amp;nbsp;will still be synchronized after 
  24 hours.&lt;/FONT&gt;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;Something you are doing is not right. Yes the 
  duration will calculate to a double precision value and the timestamp will 
  take an integer, but if you keep the double precision around for the whole 
  process, you will be good to go.&lt;/FONT&gt;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;If fact, if your client is running windows, 
  windows will adjust the system clock to fill those micro gaps, just as FLV 
  video framerate is determined by the audio sample counts. &lt;/FONT&gt;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
  &lt;BLOCKQUOTE style=&quot;PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px&quot;&gt;
    &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;----- Original Message ----- &lt;/DIV&gt;
    &lt;DIV style=&quot;BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black&quot;&gt;&lt;B&gt;From:&lt;/B&gt; 
    &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;/DIV&gt;
    &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;To:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;/DIV&gt;
    &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;Sent:&lt;/B&gt; Wednesday, November 25, 2009 
    10:58 PM&lt;/DIV&gt;
    &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;Subject:&lt;/B&gt; [Red5] R: R: unequal delay on 
    audio and video&lt;/DIV&gt;
    &lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
    &lt;DIV class=Section1&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;I thank you very 
    much for helping me; lets see if I had this right:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;Lets say I have 
    100 byte per packet, at 100 bit per sample, with a sample rate of 10000 
    samples per second; this means I have 8 samples per packet and so 8/10000 
    seconds per packet and this is my timestamp interval.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;Is this 
    correct?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;DIV&gt;
    &lt;DIV style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none&quot;&gt;
    &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt;Da:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; 
    [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;B&gt;Per conto di &lt;/B&gt;Andy 
    Shaules&lt;BR&gt;&lt;B&gt;Inviato:&lt;/B&gt; mercoledì 25 novembre 2009 18.57&lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; 
    &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;BR&gt;&lt;B&gt;Oggetto:&lt;/B&gt; Re: [Red5] R: unequal delay on audio and 
    video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;wrong,&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;audio duration is 
    an equation without guesses. that is your only error.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;You have sample 
    rate, you have bits per sample, you have bits per second. You can take that 
    info and calulate to the 100 nano-second accuracy if you need 
    too.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Now, 
    caviot!&amp;nbsp; FLV frame rate is determined by audio sample count per frame, 
    not time of frame.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;If you count 
    duration correctly you will not have lag problems.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;I do it with both 
    mp3 and aac based on number of bytes in the buffer and sample rate/bits per 
    sample. Works perfect every time.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;BLOCKQUOTE style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0cm; MARGIN: 5pt 0cm 5pt 3.75pt; BORDER-LEFT: black 1.5pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none&quot;&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;----- Original 
      Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal style=&quot;BACKGROUND: #e4e4e4&quot;&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;From:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; 
      &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;To:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; 
      &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Sent:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; Wednesday, 
      November 25, 2009 1:06 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Subject:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; [Red5] R: 
      unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;I need help on 
      understanding how this works..&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;In the current 
      solution I set the interval between audio timestamps by 
      guess,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;It is 2080 on a 
      stream timebase of 1/90000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;This way audio 
      and video are in sync, at least for a while; there are some other 
      &amp;nbsp;problems, but with this not being a correct solution I dont 
      bother.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;So what if I 
      calculate the audio frame duration? It comes out at 26ish msecs; I set the 
      timestamp interval based on the stream timebase. The logs say my audio 
      rtmp packets are correctly spaced at 26 msecs, but the end result is audio 
      and video not in sync and lagging.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;With my guess 
      of 2080 the rtmp audio packets are every 23 msecs, but this doesnt make 
      much sense&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;DIV&gt;
      &lt;DIV style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none&quot;&gt;
      &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt;Da:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt; 
      &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;B&gt;Per conto di 
      &lt;/B&gt;Daniele Bettella&lt;BR&gt;&lt;B&gt;Inviato:&lt;/B&gt; martedì 24 novembre 2009 
      18.11&lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;BR&gt;&lt;B&gt;Oggetto:&lt;/B&gt; [Red5] R: R: 
      unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;Cancel the 
      previous message, I forgot to enable the interleaving of 
      packets&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;Apparently I 
      still need to understand how to correlate the stream timebase and the 
      audio frame duration&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;DIV&gt;
      &lt;DIV style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none&quot;&gt;
      &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt;Da:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt; 
      &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;B&gt;Per conto di 
      &lt;/B&gt;Daniele Bettella&lt;BR&gt;&lt;B&gt;Inviato:&lt;/B&gt; martedì 24 novembre 2009 
      17.58&lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;BR&gt;&lt;B&gt;Oggetto:&lt;/B&gt; [Red5] R: unequal 
      delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;Ok, I was able to calculate my timestamps based on the code in the mp3 header; it all works fine for the first minutes, but after a while I begin to notice a little delay on audio. I think this could be because the frame duration is calculated as &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;576 / (getSampleRate() * 0.001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;Inevitably this is not an integer, but the set dts requires one.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;So whatever I do (and based on the stream timebase, which is 1/90000) Ill need to transform a double into a long and hence introduce error&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;And my audio will not be in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;I suppose theres a solution to this, but what is it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;Daniele&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;DIV&gt;
      &lt;DIV style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none&quot;&gt;
      &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt;Da:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt; 
      &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;B&gt;Per conto di 
      &lt;/B&gt;Andy Shaules&lt;BR&gt;&lt;B&gt;Inviato:&lt;/B&gt; lunedì 23 novembre 2009 
      17.14&lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;BR&gt;&lt;B&gt;Oggetto:&lt;/B&gt; Re: [Red5] unequal 
      delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;You should base 
      your timestamps on the mp3 frame durations, not guesses.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Look at the 
      MP3Header class in the red5.io.mp3 package. Use the class to determine 
      each duration. &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;BLOCKQUOTE style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0cm; MARGIN: 5pt 0cm 5pt 3.75pt; BORDER-LEFT: black 1.5pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none&quot;&gt;
        &lt;DIV&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;----- 
        Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
        &lt;DIV&gt;
        &lt;P class=MsoNormal style=&quot;BACKGROUND: #e4e4e4&quot;&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;From:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; 
        &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
        &lt;DIV&gt;
        &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;To:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; 
        &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
        &lt;DIV&gt;
        &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Sent:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; Monday, 
        November 23, 2009 3:05 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
        &lt;DIV&gt;
        &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Subject:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; [Red5] 
        unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
        &lt;DIV&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Im using Xuggle to publish an 
        H264/mp3 live stream on red5. Audio and video are already encoded when 
        they get to xuggle, so I do no transcoding, I just pass the packets on 
        to red5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Now, if I stream video only I have a 
        small delay, around 0.3 secs, I dont know where it comes from, but its 
        either in xuggle/red5 or the player (which has a buffer of zero, btw). I 
        could live with this delay (well, sort of), problem is, when I stream 
        audio too this has a delay of little less than one second, resulting in 
        audio and video not in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;So came the idea to force 
        interleaving of packets (that is, using container.writePacket(packet, 
        true)). This meant adjusting dsts by hand, since my packets had no 
        timestamps to start with. This brought two problems: 
        &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoListParagraph style=&quot;TEXT-INDENT: -18pt&quot;&gt;&lt;SPAN lang=EN-US&gt;1)&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 7pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
        &lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;I know how to adjust timestamps on video packets 
        (since I have one frame per packet), but I had to guess on audio 
        packets;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoListParagraph style=&quot;TEXT-INDENT: -18pt&quot;&gt;&lt;SPAN lang=EN-US&gt;2)&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 7pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
        &lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;My best guess resulted in audio and video in 
        sync (at least for the first minutes), but with a delay of one second 
        which grew when insufficient bandwidths came out (streaming locally). 
        Which is no good at all.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;What Id really like would be to 
        minimize and balance the delays when non interleaving packets in xuggle, 
        because thats the way I have had the best 
results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Also to note: if I stream video only 
        at 15fps instead of 30fps the delay grows from .3 to .8 seconds (which, 
        as a side effect, make audio and video in sync if I add 
        it).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Id really love to figure out where 
        these delays come out from.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Thanks in 
        advance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Daniele&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;P.S.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Im sending this on osflash for now, 
        since my membership on the official group is 
        pending&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
        &lt;DIV class=MsoNormal style=&quot;TEXT-ALIGN: center&quot; align=center&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;
        &lt;HR align=center width=&quot;100%&quot; SIZE=2&gt;
        &lt;/SPAN&gt;&lt;/DIV&gt;
        &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;_______________________________________________&lt;BR&gt;Red5 
        mailing 
        list&lt;BR&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;BR&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
      &lt;DIV class=MsoNormal style=&quot;TEXT-ALIGN: center&quot; align=center&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;
      &lt;HR align=center width=&quot;100%&quot; SIZE=2&gt;
      &lt;/SPAN&gt;&lt;/DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;_______________________________________________&lt;BR&gt;Red5 
      mailing 
      list&lt;BR&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;BR&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;
    &lt;P&gt;
    &lt;HR&gt;

    &lt;P&gt;&lt;/P&gt;_______________________________________________&lt;BR&gt;Red5 mailing 
    list&lt;BR&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=22&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;BR&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;BR&gt;&lt;/BLOCKQUOTE&gt;
  &lt;P&gt;
  &lt;HR&gt;

  &lt;P&gt;&lt;/P&gt;_______________________________________________&lt;BR&gt;Red5 mailing 
  list&lt;BR&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=23&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;BR&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;BR&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525448&amp;i=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/unequal-delay-on-audio-and-video-tp26476221p26525448.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26525247</id>
	<title>Re: R:  R:  unequal delay on audio and video</title>
	<published>2009-11-25T23:21:59Z</published>
	<updated>2009-11-25T23:21:59Z</updated>
	<author>
		<name>Andy Shaules</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML xmlns=&quot;http://www.w3.org/TR/REC-html40&quot; xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot;&gt;&lt;HEAD&gt;
&lt;META http-equiv=Content-Type content=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;META content=&quot;MSHTML 6.00.2900.5890&quot; name=GENERATOR&gt;&lt;!--[if !mso]&gt;
&lt;STYLE&gt;v\:* {
	BEHAVIOR: url(#default#VML)
}
o\:* {
	BEHAVIOR: url(#default#VML)
}
w\:* {
	BEHAVIOR: url(#default#VML)
}
.shape {
	BEHAVIOR: url(#default#VML)
}
&lt;/STYLE&gt;
&lt;![endif]--&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;&lt;/HEAD&gt;
&lt;BODY lang=IT vLink=purple link=blue bgColor=white&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;10000 samples/ second&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp; 100 
bits/ sample = 1000000 bits /second&amp;nbsp; &lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;1000000 bits/second&amp;nbsp; *&amp;nbsp; 1 byte / 8 
bits&amp;nbsp; =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 125000&amp;nbsp; bytes per second&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;But forget all of that!&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;If you count the frame durations calculated by the 
mp3 header then you should be fine. If&amp;nbsp;its not fine, then you are doing 
something else not right.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;Here is my situation. I get 3 mp3 frames for every 
one h264 frame, yet I can still take the calculated values from the mp3 header 
add all of them up, and my stream&amp;nbsp;will still be synchronized after 24 
hours.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;Something you are doing is not right. Yes the 
duration will calculate to a double precision value and the timestamp will take 
an integer, but if you keep the double precision around for the whole process, 
you will be good to go.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;If fact, if your client is running windows, windows 
will adjust the system clock to fill those micro gaps, just as FLV video 
framerate is determined by the audio sample counts. &lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;BLOCKQUOTE style=&quot;PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px&quot;&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;----- Original Message ----- &lt;/DIV&gt;
  &lt;DIV style=&quot;BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black&quot;&gt;&lt;B&gt;From:&lt;/B&gt; 
  &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;To:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;Sent:&lt;/B&gt; Wednesday, November 25, 2009 10:58 
  PM&lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;Subject:&lt;/B&gt; [Red5] R: R: unequal delay on 
  audio and video&lt;/DIV&gt;
  &lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
  &lt;DIV class=Section1&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;I thank you very 
  much for helping me; lets see if I had this right:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;Lets say I have 
  100 byte per packet, at 100 bit per sample, with a sample rate of 10000 
  samples per second; this means I have 8 samples per packet and so 8/10000 
  seconds per packet and this is my timestamp interval.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;Is this 
  correct?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;DIV&gt;
  &lt;DIV style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none&quot;&gt;
  &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt;Da:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; 
  [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;B&gt;Per conto di &lt;/B&gt;Andy 
  Shaules&lt;BR&gt;&lt;B&gt;Inviato:&lt;/B&gt; mercoledì 25 novembre 2009 18.57&lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; 
  &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;BR&gt;&lt;B&gt;Oggetto:&lt;/B&gt; Re: [Red5] R: unequal delay on audio and 
  video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;wrong,&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;audio duration is 
  an equation without guesses. that is your only error.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;You have sample 
  rate, you have bits per sample, you have bits per second. You can take that 
  info and calulate to the 100 nano-second accuracy if you need too.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Now, caviot!&amp;nbsp; 
  FLV frame rate is determined by audio sample count per frame, not time of 
  frame.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;If you count 
  duration correctly you will not have lag problems.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;I do it with both 
  mp3 and aac based on number of bytes in the buffer and sample rate/bits per 
  sample. Works perfect every time.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;BLOCKQUOTE style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0cm; MARGIN: 5pt 0cm 5pt 3.75pt; BORDER-LEFT: black 1.5pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none&quot;&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;----- Original 
    Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal style=&quot;BACKGROUND: #e4e4e4&quot;&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;From:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; 
    &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;To:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; 
    &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Sent:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; Wednesday, 
    November 25, 2009 1:06 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Subject:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; [Red5] R: 
    unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;I need help on 
    understanding how this works..&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;In the current 
    solution I set the interval between audio timestamps by 
    guess,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;It is 2080 on a 
    stream timebase of 1/90000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;This way audio 
    and video are in sync, at least for a while; there are some other 
    &amp;nbsp;problems, but with this not being a correct solution I dont 
    bother.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;So what if I 
    calculate the audio frame duration? It comes out at 26ish msecs; I set the 
    timestamp interval based on the stream timebase. The logs say my audio rtmp 
    packets are correctly spaced at 26 msecs, but the end result is audio and 
    video not in sync and lagging.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;With my guess of 
    2080 the rtmp audio packets are every 23 msecs, but this doesnt make much 
    sense&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;DIV&gt;
    &lt;DIV style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none&quot;&gt;
    &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt;Da:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt; 
    &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;B&gt;Per conto di 
    &lt;/B&gt;Daniele Bettella&lt;BR&gt;&lt;B&gt;Inviato:&lt;/B&gt; martedì 24 novembre 2009 
    18.11&lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;BR&gt;&lt;B&gt;Oggetto:&lt;/B&gt; [Red5] R: R: unequal 
    delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;Cancel the 
    previous message, I forgot to enable the interleaving of 
    packets&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;Apparently I 
    still need to understand how to correlate the stream timebase and the audio 
    frame duration&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;DIV&gt;
    &lt;DIV style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none&quot;&gt;
    &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt;Da:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt; 
    &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;B&gt;Per conto di 
    &lt;/B&gt;Daniele Bettella&lt;BR&gt;&lt;B&gt;Inviato:&lt;/B&gt; martedì 24 novembre 2009 
    17.58&lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;BR&gt;&lt;B&gt;Oggetto:&lt;/B&gt; [Red5] R: unequal 
    delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;Ok, I was able to calculate my timestamps based on the code in the mp3 header; it all works fine for the first minutes, but after a while I begin to notice a little delay on audio. I think this could be because the frame duration is calculated as &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;576 / (getSampleRate() * 0.001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;Inevitably this is not an integer, but the set dts requires one.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;So whatever I do (and based on the stream timebase, which is 1/90000) Ill need to transform a double into a long and hence introduce error&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;And my audio will not be in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;I suppose theres a solution to this, but what is it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;Daniele&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;DIV&gt;
    &lt;DIV style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none&quot;&gt;
    &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt;Da:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt; 
    &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;B&gt;Per conto di 
    &lt;/B&gt;Andy Shaules&lt;BR&gt;&lt;B&gt;Inviato:&lt;/B&gt; lunedì 23 novembre 2009 
    17.14&lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;BR&gt;&lt;B&gt;Oggetto:&lt;/B&gt; Re: [Red5] unequal 
    delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;You should base 
    your timestamps on the mp3 frame durations, not guesses.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Look at the 
    MP3Header class in the red5.io.mp3 package. Use the class to determine each 
    duration. &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;BLOCKQUOTE style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0cm; MARGIN: 5pt 0cm 5pt 3.75pt; BORDER-LEFT: black 1.5pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none&quot;&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;----- Original 
      Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal style=&quot;BACKGROUND: #e4e4e4&quot;&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;From:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; 
      &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;To:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; 
      &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Sent:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; Monday, 
      November 23, 2009 3:05 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Subject:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; [Red5] unequal 
      delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Im using Xuggle to publish an 
      H264/mp3 live stream on red5. Audio and video are already encoded when 
      they get to xuggle, so I do no transcoding, I just pass the packets on to 
      red5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Now, if I stream video only I have a 
      small delay, around 0.3 secs, I dont know where it comes from, but its 
      either in xuggle/red5 or the player (which has a buffer of zero, btw). I 
      could live with this delay (well, sort of), problem is, when I stream 
      audio too this has a delay of little less than one second, resulting in 
      audio and video not in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;So came the idea to force interleaving 
      of packets (that is, using container.writePacket(packet, true)). This 
      meant adjusting dsts by hand, since my packets had no timestamps to start 
      with. This brought two problems: &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoListParagraph style=&quot;TEXT-INDENT: -18pt&quot;&gt;&lt;SPAN lang=EN-US&gt;1)&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 7pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
      &lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;I know how to adjust timestamps on video packets 
      (since I have one frame per packet), but I had to guess on audio 
      packets;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoListParagraph style=&quot;TEXT-INDENT: -18pt&quot;&gt;&lt;SPAN lang=EN-US&gt;2)&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 7pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
      &lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;My best guess resulted in audio and video in sync 
      (at least for the first minutes), but with a delay of one second which 
      grew when insufficient bandwidths came out (streaming locally). Which is 
      no good at all.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;What Id really like would be to 
      minimize and balance the delays when non interleaving packets in xuggle, 
      because thats the way I have had the best results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Also to note: if I stream video only 
      at 15fps instead of 30fps the delay grows from .3 to .8 seconds (which, as 
      a side effect, make audio and video in sync if I add 
      it).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Id really love to figure out where 
      these delays come out from.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Thanks in 
      advance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Daniele&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;P.S.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Im sending this on osflash for now, 
      since my membership on the official group is pending&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
      &lt;DIV class=MsoNormal style=&quot;TEXT-ALIGN: center&quot; align=center&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;
      &lt;HR align=center width=&quot;100%&quot; SIZE=2&gt;
      &lt;/SPAN&gt;&lt;/DIV&gt;
      &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;_______________________________________________&lt;BR&gt;Red5 
      mailing 
      list&lt;BR&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;BR&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
    &lt;DIV class=MsoNormal style=&quot;TEXT-ALIGN: center&quot; align=center&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;
    &lt;HR align=center width=&quot;100%&quot; SIZE=2&gt;
    &lt;/SPAN&gt;&lt;/DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;_______________________________________________&lt;BR&gt;Red5 
    mailing 
    list&lt;BR&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=19&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;BR&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;
  &lt;P&gt;
  &lt;HR&gt;

  &lt;P&gt;&lt;/P&gt;_______________________________________________&lt;BR&gt;Red5 mailing 
  list&lt;BR&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=20&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;BR&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;BR&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525247&amp;i=21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/unequal-delay-on-audio-and-video-tp26476221p26525247.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26525057</id>
	<title>R:  R:  unequal delay on audio and video</title>
	<published>2009-11-25T22:58:09Z</published>
	<updated>2009-11-25T22:58:09Z</updated>
	<author>
		<name>Daniele Bettella</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;
&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=IT link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I thank you very much
for helping me; let&amp;#8217;s see if I had this right:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Let&amp;#8217;s say I
have 100 byte per packet, at 100 bit per sample, with a sample rate of 10000
samples per second; this means I have 8 samples per packet and so 8/10000 seconds
per packet&amp;#8230; and this is my timestamp interval.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Is this correct?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy
Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; mercoledì 25 novembre 2009 18.57&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;wrong,&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;audio
duration is an equation without guesses. that is your only error.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;You
have sample rate, you have bits per sample, you have bits per second. You can
take that info and calulate to the 100 nano-second accuracy if you need too.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Now,
caviot!&amp;nbsp; FLV frame rate is determined by audio sample count per frame, not
time of frame.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;If
you count duration correctly you will not have lag problems.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;I
do it with both mp3 and aac based on number of bytes in the buffer and sample
rate/bits per sample. Works perfect every time.&lt;/span&gt;&lt;span style='font-size:
12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Wednesday, November
25, 2009 1:06 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] R: unequal
delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I need help on
understanding how this works..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;In the current
solution I set the interval between audio timestamps by guess,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;It is 2080 on a
stream timebase of 1/90000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;This way audio and
video are in sync, at least for a while; there are some other &amp;nbsp;problems,
but with this not being a correct solution I don&amp;#8217;t bother.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;So what if I
calculate the audio frame duration? It comes out at 26ish msecs; I set the
timestamp interval based on the stream timebase. The logs say my audio rtmp
packets are correctly spaced at 26 msecs, but the end result is audio and video
not in sync and lagging.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;With my guess of 2080
the rtmp audio packets are every 23 msecs, but this doesn&amp;#8217;t make much
sense&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele
Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; martedì 24 novembre 2009 18.11&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Cancel the previous message,
I forgot to enable the interleaving of packets&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Apparently I still
need to understand how to correlate the stream timebase and the audio frame
duration&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele
Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; martedì 24 novembre 2009 17.58&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Ok, I was able to calculate my timestamps based on the code in the mp3 header; it all works fine for the first minutes, but after a while I begin to notice a little delay on audio. I think this could be because the frame duration is calculated as &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;576 / (getSampleRate() * 0.001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Inevitably this is not an integer, but the set dts requires one.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;So whatever I do (and based on the stream timebase, which is 1/90000) I&amp;#8217;ll need to transform a double into a long and hence introduce error&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;And my audio will not be in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;I suppose there&amp;#8217;s a solution to this, but what is it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Daniele&lt;/span&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy
Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; lunedì 23 novembre 2009 17.14&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;You
should base your timestamps on the mp3 frame durations, not guesses.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Look
at the MP3Header class in the red5.io.mp3 package. Use the class to determine
each duration. &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Monday, November 23,
2009 3:05 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] unequal delay
on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;m using Xuggle to publish an
H264/mp3 live stream on red5. Audio and video are already encoded when they get
to xuggle, so I do no transcoding, I just pass the packets on to red5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Now, if I stream video only I have a small
delay, around 0.3 secs, I don&amp;#8217;t know where it comes from, but it&amp;#8217;s
either in xuggle/red5 or the player (which has a buffer of zero, btw). I could
live with this delay (well, sort of), problem is, when I stream audio too this
has a delay of little less than one second, resulting in audio and video not in
sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;So came the idea to force interleaving of
packets (that is, using container.writePacket(packet, true)). This meant
adjusting dsts by hand, since my packets had no timestamps to start with. This
brought two problems: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt'&gt;&lt;span lang=EN-US&gt;1)&lt;/span&gt;&lt;span lang=EN-US style='font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span lang=EN-US&gt;I know how to adjust timestamps on video packets (since
I have one frame per packet), but I had to guess on audio packets;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt'&gt;&lt;span lang=EN-US&gt;2)&lt;/span&gt;&lt;span lang=EN-US style='font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span lang=EN-US&gt;My best guess resulted in audio and video in sync (at
least for the first minutes), but with a delay of one second which grew when
insufficient bandwidths came out (streaming locally). Which is no good at all.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;What I&amp;#8217;d really like would be to minimize
and balance the delays when non interleaving packets in xuggle, because
that&amp;#8217;s the way I have had the best results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Also to note: if I stream video only at
15fps instead of 30fps the delay grows from .3 to .8 seconds (which, as a side
effect, make audio and video in sync if I add it).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;d really love to figure out where
these delays come out from.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Thanks in advance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Daniele&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;P.S.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;m sending this on osflash for now,
since my membership on the official group is pending&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=16&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=17&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26525057&amp;i=18&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/unequal-delay-on-audio-and-video-tp26476221p26525057.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26523516</id>
	<title>Re: xuggle - how to dynamically add/remove audio input in/froman outputStream</title>
	<published>2009-11-25T18:20:12Z</published>
	<updated>2009-11-25T18:20:12Z</updated>
	<author>
		<name>J W</name>
	</author>
	<content type="html">Thanks for the clarification.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Nov 26, 2009 at 1:43 AM, Andy Shaules &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523516&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bowljoman@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;






&lt;div bgcolor=&quot;#ffffff&quot;&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;IT doesnt.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;You will have to learn that one and create 
it.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;When you have a buffer of un compressed smaples, 
yes, smaples heheh. You must combine two or more of them to get your desired 
output.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;While possible for sure, nobody said it would be 
easy. &lt;/font&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;You must clearly understand PCM audio samples and 
how to combine two of them.  &lt;/font&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;16 bit audio sample is a value between 0 and 2^16, 
If you have two samples for the same point in time, you add them together 
with addition, and check for ceiling.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;If a smaple starts on time .0001 and you have 
another sample that starts at .0100, you must line up sample by sample 
according to time offset and add their sample values.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;Both very easy in combining and very difficult to 
do it right.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot; face=&quot;Arial&quot;&gt;It is far from impossible and Im sure a rewarding 
experience once finished.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;blockquote style=&quot;border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;
  &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;----- Original Message ----- &lt;/div&gt;
  &lt;div style=&quot;background: rgb(228, 228, 228) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;
&lt;b&gt;From:&lt;/b&gt; 
  &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523516&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jingwei.yang@...&lt;/a&gt; &lt;/div&gt;
  &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523516&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;/div&gt;

  &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 24, 2009 11:29 
  PM&lt;/div&gt;
  &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;&lt;b&gt;Subject:&lt;/b&gt; [Red5] xuggle - how to 
  dynamically add/remove audio input in/froman outputStream&lt;/div&gt;
  &lt;div&gt;&lt;br&gt;&lt;/div&gt;Hi Guys,&lt;br&gt;&lt;br&gt;I&amp;#39;m looking into a xuggle utility to combine 
  multiple audio input streams into one OutputStream. I&amp;#39;ve checked 
  AudioTranscoderDemo and found here&amp;#39;s the line to link the streams:&lt;br&gt;&lt;br&gt;
  &lt;div style=&quot;margin-left: 40px;&quot;&gt;&lt;b&gt;Transcoder transcoder = new 
  Transcoder(aStream,&lt;br&gt;        
  outputStream, outputStreamInfo);&lt;/b&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;Then I checked the 
  Transcoder class, but found it supports only one InputStream.&lt;br&gt;&lt;br&gt;
  &lt;div style=&quot;margin-left: 40px;&quot;&gt;&lt;b&gt;private final IBroadcastStream 
  mInputStream;&lt;/b&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;How should Xuggle add inputs into the output 
  and later remove from it? And once there&amp;#39;re no inputs any more, stop the 
  output?&lt;br&gt;&lt;br&gt;Thanks and best regards,&lt;br&gt;-Jingwei&lt;br&gt;
  &lt;/div&gt;&lt;/div&gt;&lt;p&gt;
  &lt;/p&gt;&lt;hr&gt;

  &lt;p&gt;&lt;/p&gt;_______________________________________________&lt;br&gt;Red5 mailing 
  list&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523516&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;
&lt;br&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523516&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523516&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/xuggle---how-to-dynamically-add-remove-audio-input-in-from-an-outputStream-tp26508562p26523516.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26523518</id>
	<title>Re: screen share with Xuggler</title>
	<published>2009-11-25T18:19:33Z</published>
	<updated>2009-11-25T18:19:33Z</updated>
	<author>
		<name>J W</name>
	</author>
	<content type="html">Thanks Richard.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Nov 25, 2009 at 11:24 PM, Richard Alam &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523518&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ritzalam@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Just go through the archive&lt;br&gt;
(&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;) for Oct and Nov&lt;br&gt;
then search for Desktop Sharing. There&amp;#39;s several implementations of&lt;br&gt;
what you want to accomplish.&lt;br&gt;
&lt;br&gt;
And send your mail to &lt;a href=&quot;http://groups.google.com/group/red5interest&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/red5interest&lt;/a&gt; as&lt;br&gt;
all the Red5 dev team has&lt;br&gt;
moved there. Not sure if this list is still being monitored by them.&lt;br&gt;
&lt;br&gt;
Richard&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
On Wed, Nov 25, 2009 at 4:05 AM, Jingwei Yang &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523518&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jingwei.yang@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hi Guys,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I believe this topic has been discussed many times in the forum. Is there a&lt;br&gt;
&amp;gt; conclusion? As far as I understand, here&amp;#39;s the whole process:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; 1. Client A captures his screen using applet (taking advantage of&lt;br&gt;
&amp;gt; java.awt.Robot)&lt;br&gt;
&amp;gt; 2. Xuggler encodes the serial screen shots into a video (within the applet)&lt;br&gt;
&amp;gt; 3. Client A broadcasts the video via red5&lt;br&gt;
&amp;gt; 4. Client B subscribes to the stream and watches the video&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; But how does Client A broadcast the video? The Video info is still handled&lt;br&gt;
&amp;gt; by the java applet. How does the applet inform red5? Any thoughts or advise&lt;br&gt;
&amp;gt; are highly appreciated.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks and best regards,&lt;br&gt;
&amp;gt; -Jingwei&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;im&quot;&gt;&amp;gt; _______________________________________________&lt;br&gt;
&amp;gt; Red5 mailing list&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523518&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;font color=&quot;#888888&quot;&gt;--&lt;br&gt;
---&lt;br&gt;
BigBlueButton&lt;br&gt;
&lt;a href=&quot;http://www.bigbluebutton.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.bigbluebutton.org&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://code.google.com/p/bigbluebutton&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/bigbluebutton&lt;/a&gt;&lt;br&gt;
&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523518&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26523518&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/screen-share-with-Xuggler-tp26509446p26523518.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26516108</id>
	<title>Re: R:  unequal delay on audio and video</title>
	<published>2009-11-25T08:44:24Z</published>
	<updated>2009-11-25T08:44:24Z</updated>
	<author>
		<name>Andy Shaules</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML xmlns=&quot;http://www.w3.org/TR/REC-html40&quot; xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot;&gt;&lt;HEAD&gt;
&lt;META http-equiv=Content-Type content=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;META content=&quot;MSHTML 6.00.2900.5890&quot; name=GENERATOR&gt;&lt;!--[if !mso]&gt;
&lt;STYLE&gt;v\:* {
	BEHAVIOR: url(#default#VML)
}
o\:* {
	BEHAVIOR: url(#default#VML)
}
w\:* {
	BEHAVIOR: url(#default#VML)
}
.shape {
	BEHAVIOR: url(#default#VML)
}
&lt;/STYLE&gt;
&lt;![endif]--&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;&lt;/HEAD&gt;
&lt;BODY lang=IT vLink=purple link=blue bgColor=white&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;wrong,&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;audio duration is an equation without guesses. that 
is your only error.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;You have sample rate, you have bits per sample, you 
have bits per second. You can take that info and calulate to the 100 nano-second 
accuracy if you need too.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;Now, caviot!&amp;nbsp; FLV frame rate is determined by 
audio sample count per frame, not time of frame.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;If you count duration correctly you will not have 
lag problems.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;I do it with both mp3 and aac based on number of 
bytes in the buffer and sample rate/bits per sample. Works perfect every 
time.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;BLOCKQUOTE style=&quot;PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px&quot;&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;----- Original Message ----- &lt;/DIV&gt;
  &lt;DIV style=&quot;BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black&quot;&gt;&lt;B&gt;From:&lt;/B&gt; 
  &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;To:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;Sent:&lt;/B&gt; Wednesday, November 25, 2009 1:06 
  AM&lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;Subject:&lt;/B&gt; [Red5] R: unequal delay on audio 
  and video&lt;/DIV&gt;
  &lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;
  &lt;DIV class=Section1&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;I need help on 
  understanding how this works..&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;In the current 
  solution I set the interval between audio timestamps by 
  guess,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;It is 2080 on a 
  stream timebase of 1/90000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;This way audio and 
  video are in sync, at least for a while; there are some other &amp;nbsp;problems, 
  but with this not being a correct solution I dont 
  bother.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;So what if I 
  calculate the audio frame duration? It comes out at 26ish msecs; I set the 
  timestamp interval based on the stream timebase. The logs say my audio rtmp 
  packets are correctly spaced at 26 msecs, but the end result is audio and 
  video not in sync and lagging.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;With my guess of 
  2080 the rtmp audio packets are every 23 msecs, but this doesnt make much 
  sense&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;DIV&gt;
  &lt;DIV style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none&quot;&gt;
  &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt;Da:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt; 
  &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;B&gt;Per conto di 
  &lt;/B&gt;Daniele Bettella&lt;BR&gt;&lt;B&gt;Inviato:&lt;/B&gt; martedì 24 novembre 2009 
  18.11&lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;BR&gt;&lt;B&gt;Oggetto:&lt;/B&gt; [Red5] R: R: unequal 
  delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;Cancel the previous 
  message, I forgot to enable the interleaving of packets&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;Apparently I still 
  need to understand how to correlate the stream timebase and the audio frame 
  duration&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;DIV&gt;
  &lt;DIV style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none&quot;&gt;
  &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt;Da:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt; 
  &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;B&gt;Per conto di 
  &lt;/B&gt;Daniele Bettella&lt;BR&gt;&lt;B&gt;Inviato:&lt;/B&gt; martedì 24 novembre 2009 
  17.58&lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;BR&gt;&lt;B&gt;Oggetto:&lt;/B&gt; [Red5] R: unequal delay 
  on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;Ok, I was able to calculate my timestamps based on the code in the mp3 header; it all works fine for the first minutes, but after a while I begin to notice a little delay on audio. I think this could be because the frame duration is calculated as &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;576 / (getSampleRate() * 0.001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;Inevitably this is not an integer, but the set dts requires one.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;So whatever I do (and based on the stream timebase, which is 1/90000) Ill need to transform a double into a long and hence introduce error&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;And my audio will not be in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;I suppose theres a solution to this, but what is it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'&quot;&gt;Daniele&lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US style=&quot;COLOR: #1f497d&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
  &lt;DIV&gt;
  &lt;DIV style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none&quot;&gt;
  &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt;Da:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Segoe UI','sans-serif'&quot;&gt; 
  &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;B&gt;Per conto di 
  &lt;/B&gt;Andy Shaules&lt;BR&gt;&lt;B&gt;Inviato:&lt;/B&gt; lunedì 23 novembre 2009 17.14&lt;BR&gt;&lt;B&gt;A:&lt;/B&gt; 
  &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;BR&gt;&lt;B&gt;Oggetto:&lt;/B&gt; Re: [Red5] unequal delay on audio and 
  video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/P&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;You should base 
  your timestamps on the mp3 frame durations, not guesses.&lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;DIV&gt;
  &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Look at the 
  MP3Header class in the red5.io.mp3 package. Use the class to determine each 
  duration. &lt;/SPAN&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
  &lt;BLOCKQUOTE style=&quot;BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0cm; MARGIN: 5pt 0cm 5pt 3.75pt; BORDER-LEFT: black 1.5pt solid; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none&quot;&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;----- Original 
    Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal style=&quot;BACKGROUND: #e4e4e4&quot;&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;From:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; 
    &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;To:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; 
    &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Sent:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; Monday, November 
    23, 2009 3:05 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt;Subject:&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'&quot;&gt; [Red5] unequal 
    delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Im using Xuggle to publish an H264/mp3 
    live stream on red5. Audio and video are already encoded when they get to 
    xuggle, so I do no transcoding, I just pass the packets on to 
    red5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Now, if I stream video only I have a 
    small delay, around 0.3 secs, I dont know where it comes from, but its 
    either in xuggle/red5 or the player (which has a buffer of zero, btw). I 
    could live with this delay (well, sort of), problem is, when I stream audio 
    too this has a delay of little less than one second, resulting in audio and 
    video not in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;So came the idea to force interleaving 
    of packets (that is, using container.writePacket(packet, true)). This meant 
    adjusting dsts by hand, since my packets had no timestamps to start with. 
    This brought two problems: &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoListParagraph style=&quot;TEXT-INDENT: -18pt&quot;&gt;&lt;SPAN lang=EN-US&gt;1)&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 7pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    &lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;I know how to adjust timestamps on video packets 
    (since I have one frame per packet), but I had to guess on audio 
    packets;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoListParagraph style=&quot;TEXT-INDENT: -18pt&quot;&gt;&lt;SPAN lang=EN-US&gt;2)&lt;/SPAN&gt;&lt;SPAN lang=EN-US style=&quot;FONT-SIZE: 7pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
    &lt;/SPAN&gt;&lt;SPAN lang=EN-US&gt;My best guess resulted in audio and video in sync 
    (at least for the first minutes), but with a delay of one second which grew 
    when insufficient bandwidths came out (streaming locally). Which is no good 
    at all.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;What Id really like would be to 
    minimize and balance the delays when non interleaving packets in xuggle, 
    because thats the way I have had the best results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Also to note: if I stream video only at 
    15fps instead of 30fps the delay grows from .3 to .8 seconds (which, as a 
    side effect, make audio and video in sync if I add 
it).&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Id really love to figure out where 
    these delays come out from.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Thanks in advance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Daniele&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;P.S.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN lang=EN-US&gt;Im sending this on osflash for now, 
    since my membership on the official group is pending&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
    &lt;DIV class=MsoNormal style=&quot;TEXT-ALIGN: center&quot; align=center&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;
    &lt;HR align=center width=&quot;100%&quot; SIZE=2&gt;
    &lt;/SPAN&gt;&lt;/DIV&gt;
    &lt;P class=MsoNormal&gt;&lt;SPAN style=&quot;FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'&quot;&gt;_______________________________________________&lt;BR&gt;Red5 
    mailing 
    list&lt;BR&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;BR&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;
  &lt;P&gt;
  &lt;HR&gt;

  &lt;P&gt;&lt;/P&gt;_______________________________________________&lt;BR&gt;Red5 mailing 
  list&lt;BR&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;BR&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;BR&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26516108&amp;i=15&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/unequal-delay-on-audio-and-video-tp26476221p26516108.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26515887</id>
	<title>Re: xuggle - how to dynamically add/remove audio input in/froman outputStream</title>
	<published>2009-11-25T08:31:56Z</published>
	<updated>2009-11-25T08:31:56Z</updated>
	<author>
		<name>Andy Shaules</name>
	</author>
	<content type="html">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;
&lt;HTML&gt;&lt;HEAD&gt;
&lt;META http-equiv=Content-Type content=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;META content=&quot;MSHTML 6.00.2900.5890&quot; name=GENERATOR&gt;

&lt;/HEAD&gt;
&lt;BODY bgColor=#ffffff&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;IT doesnt.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;You will have to learn that one and create 
it.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;When you have a buffer of un compressed smaples, 
yes, smaples heheh. You must combine two or more of them to get your desired 
output.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;While possible for sure, nobody said it would be 
easy. &lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;You must clearly understand PCM audio samples and 
how to combine two of them.&amp;nbsp; &lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;16 bit audio sample is a value between 0 and 2^16, 
If you&amp;nbsp;have two samples for the same point in time, you add them together 
with addition, and check for ceiling.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;If a smaple starts on time .0001 and you have 
another sample that starts at .0100, you must line up&amp;nbsp;sample by sample 
according to time offset and add their sample values.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;Both very easy in combining and very difficult to 
do it right.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face=Arial size=2&gt;It is far from impossible and Im sure a rewarding 
experience once finished.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;BLOCKQUOTE style=&quot;PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px&quot;&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;----- Original Message ----- &lt;/DIV&gt;
  &lt;DIV style=&quot;BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black&quot;&gt;&lt;B&gt;From:&lt;/B&gt; 
  &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26515887&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jingwei.yang@...&lt;/a&gt; &lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;To:&lt;/B&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26515887&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;Sent:&lt;/B&gt; Tuesday, November 24, 2009 11:29 
  PM&lt;/DIV&gt;
  &lt;DIV style=&quot;FONT: 10pt arial&quot;&gt;&lt;B&gt;Subject:&lt;/B&gt; [Red5] xuggle - how to 
  dynamically add/remove audio input in/froman outputStream&lt;/DIV&gt;
  &lt;DIV&gt;&lt;BR&gt;&lt;/DIV&gt;Hi Guys,&lt;BR&gt;&lt;BR&gt;I'm looking into a xuggle utility to combine 
  multiple audio input streams into one OutputStream. I've checked 
  AudioTranscoderDemo and found here's the line to link the streams:&lt;BR&gt;&lt;BR&gt;
  &lt;DIV style=&quot;MARGIN-LEFT: 40px&quot;&gt;&lt;B&gt;Transcoder transcoder = new 
  Transcoder(aStream,&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
  outputStream, outputStreamInfo);&lt;/B&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;BR&gt;Then I checked the 
  Transcoder class, but found it supports only one InputStream.&lt;BR&gt;&lt;BR&gt;
  &lt;DIV style=&quot;MARGIN-LEFT: 40px&quot;&gt;&lt;B&gt;private final IBroadcastStream 
  mInputStream;&lt;/B&gt;&lt;BR&gt;&lt;/DIV&gt;&lt;BR&gt;How should Xuggle add inputs into the output 
  and later remove from it? And once there're no inputs any more, stop the 
  output?&lt;BR&gt;&lt;BR&gt;Thanks and best regards,&lt;BR&gt;-Jingwei&lt;BR&gt;
  &lt;P&gt;
  &lt;HR&gt;

  &lt;P&gt;&lt;/P&gt;_______________________________________________&lt;BR&gt;Red5 mailing 
  list&lt;BR&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26515887&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;BR&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;BR&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26515887&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/xuggle---how-to-dynamically-add-remove-audio-input-in-from-an-outputStream-tp26508562p26515887.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26514718</id>
	<title>Re: screen share with Xuggler</title>
	<published>2009-11-25T07:24:29Z</published>
	<updated>2009-11-25T07:24:29Z</updated>
	<author>
		<name>Richard Alam</name>
	</author>
	<content type="html">Just go through the archive
&lt;br&gt;(&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;) for Oct and Nov
&lt;br&gt;then search for Desktop Sharing. There's several implementations of
&lt;br&gt;what you want to accomplish.
&lt;br&gt;&lt;br&gt;And send your mail to &lt;a href=&quot;http://groups.google.com/group/red5interest&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/red5interest&lt;/a&gt;&amp;nbsp;as
&lt;br&gt;all the Red5 dev team has
&lt;br&gt;moved there. Not sure if this list is still being monitored by them.
&lt;br&gt;&lt;br&gt;Richard
&lt;br&gt;&lt;br&gt;On Wed, Nov 25, 2009 at 4:05 AM, Jingwei Yang &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26514718&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jingwei.yang@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Guys,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I believe this topic has been discussed many times in the forum. Is there a
&lt;br&gt;&amp;gt; conclusion? As far as I understand, here's the whole process:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 1. Client A captures his screen using applet (taking advantage of
&lt;br&gt;&amp;gt; java.awt.Robot)
&lt;br&gt;&amp;gt; 2. Xuggler encodes the serial screen shots into a video (within the applet)
&lt;br&gt;&amp;gt; 3. Client A broadcasts the video via red5
&lt;br&gt;&amp;gt; 4. Client B subscribes to the stream and watches the video
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; But how does Client A broadcast the video? The Video info is still handled
&lt;br&gt;&amp;gt; by the java applet. How does the applet inform red5? Any thoughts or advise
&lt;br&gt;&amp;gt; are highly appreciated.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks and best regards,
&lt;br&gt;&amp;gt; -Jingwei
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Red5 mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26514718&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;---
&lt;br&gt;BigBlueButton
&lt;br&gt;&lt;a href=&quot;http://www.bigbluebutton.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.bigbluebutton.org&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://code.google.com/p/bigbluebutton&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/bigbluebutton&lt;/a&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26514718&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/screen-share-with-Xuggler-tp26509446p26514718.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26510103</id>
	<title>Re: Red5 0.9.0 RC3 - trunk Rev 3967</title>
	<published>2009-11-25T01:57:32Z</published>
	<updated>2009-11-25T01:57:32Z</updated>
	<author>
		<name>ヨンニ　ベリィストロム</name>
	</author>
	<content type="html">It was just a matter of exporting the flash/trunk/deploy/* files from 
&lt;br&gt;the repository, putting them in a folder and editing the path to it at 
&lt;br&gt;build.xml:322.
&lt;br&gt;&lt;br&gt;Now, the 3967 build still has the severe seek problem :-(
&lt;br&gt;&lt;br&gt;Is the seeking problem in the bug ticket system?
&lt;br&gt;&lt;br&gt;ヨンニ　ベリィストロム wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I get the same:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;quot;BUILD FAILED
&lt;br&gt;&amp;gt; /home/unigent/red5/0.9_3967/build.xml:226: The following error 
&lt;br&gt;&amp;gt; occurred while executing this line:
&lt;br&gt;&amp;gt; /home/unigent/red5/0.9_3967/build.xml:321: /home/flash/trunk/deploy 
&lt;br&gt;&amp;gt; not found.&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; And I tried it also as root. I think the path on line 322 is not 
&lt;br&gt;&amp;gt; correct, as Carlos suggests.
&lt;br&gt;&amp;gt; I guess I'll temporarily create the /home/flash/ tree...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; J
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; devon girard wrote:
&lt;br&gt;&amp;gt;&amp;gt; have you tried
&lt;br&gt;&amp;gt;&amp;gt; sudo ant
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; from within the trunk directory?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; could be permissions...
&lt;br&gt;&amp;gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26510103&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Red5-0.9.0-RC3---trunk-Rev-3967-tp26506934p26510103.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26509677</id>
	<title>Re: Red5 0.9.0 RC3 - trunk Rev 3967</title>
	<published>2009-11-25T01:23:24Z</published>
	<updated>2009-11-25T01:23:24Z</updated>
	<author>
		<name>ヨンニ　ベリィストロム</name>
	</author>
	<content type="html">I get the same:
&lt;br&gt;&lt;br&gt;&amp;quot;BUILD FAILED
&lt;br&gt;/home/unigent/red5/0.9_3967/build.xml:226: The following error occurred 
&lt;br&gt;while executing this line:
&lt;br&gt;/home/unigent/red5/0.9_3967/build.xml:321: /home/flash/trunk/deploy not 
&lt;br&gt;found.&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;And I tried it also as root. I think the path on line 322 is not 
&lt;br&gt;correct, as Carlos suggests.
&lt;br&gt;I guess I'll temporarily create the /home/flash/ tree...
&lt;br&gt;&lt;br&gt;&lt;br&gt;J
&lt;br&gt;&lt;br&gt;devon girard wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; have you tried 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; sudo ant
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; from within the trunk directory?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; could be permissions...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tue, Nov 24, 2009 at 7:06 PM, carlosl &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509677&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;carlosl@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509677&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;carlosl@...&lt;/a&gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Hello Everybody,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; FYI.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; I updated my dev version with trunk revision 3967 few minuted ago.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; it failed
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; compiling because of build.xml line 322 (../../flash/trunk/deploy).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; I tried several times with same results. I had to create the
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; folder tree
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; for /flash/trunk/deploy to compile sucessfully (BTW. My current trunk
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; installation is at /opt/Red5-development/red5_server_trunk in case
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; it is
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; relevant)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; While it is not critical, just wanted to let you know.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Carlos Lozano
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; CAX IT Services
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Houston, TX
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; _______________________________________________
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Red5 mailing list
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509677&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509677&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Red5 mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509677&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509677&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Red5-0.9.0-RC3---trunk-Rev-3967-tp26506934p26509677.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26509718</id>
	<title>Re: How to secure red5?</title>
	<published>2009-11-25T01:19:48Z</published>
	<updated>2009-11-25T01:19:48Z</updated>
	<author>
		<name>Yann JAMAR-2</name>
	</author>
	<content type="html">Ok thanks , so the token exchange between server and client seems to be the 
&lt;br&gt;best solution ... but why red5 don't implement swf verification like FMS ? 
&lt;br&gt;In my opinion it's a very important feature !
&lt;br&gt;&lt;br&gt;I am going to explain you how i am going to do token exchange , you can tell 
&lt;br&gt;me if i am right :
&lt;br&gt;On webserver :
&lt;br&gt;When user loggued in my application with login and password and the 
&lt;br&gt;verification is ok, i insert a php authentification session in a mySql 
&lt;br&gt;database.
&lt;br&gt;&lt;br&gt;On my swf :
&lt;br&gt;I get the php session generated by my php server, in my netconnection param 
&lt;br&gt;i put this phpsession and i send it to my java red5 server code, in my 
&lt;br&gt;server code i check if the phpsession is ok using mysql request.
&lt;br&gt;&lt;br&gt;But in this case user can loggued in to get a valid session and use it in 
&lt;br&gt;his own swf ...So i have to change the token everytime !
&lt;br&gt;&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: &amp;quot;???????????&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509718&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jonny@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509718&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Wednesday, November 25, 2009 9:44 AM
&lt;br&gt;Subject: Re: [Red5] How to secure red5?
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I'm thinking of this same thing.
&lt;br&gt;&amp;gt; A webserver generates tokens per client request - puts them along with the 
&lt;br&gt;&amp;gt; client IP in a local database table, then pass the token to the client, 
&lt;br&gt;&amp;gt; which has to use the token when connecting (and also has to connect from 
&lt;br&gt;&amp;gt; same ip). The Red5 app checks the database table upon client connection.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm thinking of the greatest weakneses in such a setup.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Naicu Octavian wrote:
&lt;br&gt;&amp;gt;&amp;gt; FMS has swf verification which at least protects you from someone making 
&lt;br&gt;&amp;gt;&amp;gt; its own swf to call functions on your Red5 app!
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; referer verification can be easily bypassed
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; you can also use verification tokens which are generated on your 
&lt;br&gt;&amp;gt;&amp;gt; webserver send to the swf then to red5 then red5 verifies them against 
&lt;br&gt;&amp;gt;&amp;gt; the web server again
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 2009/11/24 Yann JAMAR &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509718&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;yann.jamar@...&lt;/a&gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509718&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;yann.jamar@...&lt;/a&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Hi all,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; Everything works fine in my videoconference application BUT now ,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; i would like to secure all that.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; So i have implement Stream playback security , Stream publishing
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; security,ISharedObjectSecurity describe here :
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.joachim-bauch.de/tutorials/red5/HOWTO-Security.txt&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.joachim-bauch.de/tutorials/red5/HOWTO-Security.txt&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;Now the problem is that i would like to secure invoke methods. At
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; this moment , if someone is allowed to connect to my red5
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; application (using login and password registered during
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; registration), decomple my swf and show my call methods ,he can
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; change arguments of the client side call methods and send bad data
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; to my server.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;I was thinking about check referer of the client side application,
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; but the referer can be easily falsified ...
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;Any ideas?
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;Regards , Yann.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Red5 mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509718&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&amp;nbsp;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509718&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Tv-like-red5-application-tp26465019p26509718.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26509466</id>
	<title>R:  unequal delay on audio and video</title>
	<published>2009-11-25T01:06:37Z</published>
	<updated>2009-11-25T01:06:37Z</updated>
	<author>
		<name>Daniele Bettella</name>
	</author>
	<content type="html">&lt;html xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:m=&quot;http://schemas.microsoft.com/office/2004/12/omml&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=iso-8859-1&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 12 (filtered medium)&quot;&gt;
&lt;!--[if !mso]&gt;
&lt;style&gt;
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapedefaults v:ext=&quot;edit&quot; spidmax=&quot;1026&quot; /&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;o:shapelayout v:ext=&quot;edit&quot;&gt;
  &lt;o:idmap v:ext=&quot;edit&quot; data=&quot;1&quot; /&gt;
 &lt;/o:shapelayout&gt;&lt;/xml&gt;&lt;![endif]--&gt;
&lt;/head&gt;

&lt;body bgcolor=white lang=IT link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;I need help on
understanding how this works..&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;In the current
solution I set the interval between audio timestamps by guess,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;It is 2080 on a stream
timebase of 1/90000.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;This way audio and
video are in sync, at least for a while; there are some other  problems, but
with this not being a correct solution I don&amp;#8217;t bother.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;So what if I
calculate the audio frame duration? It comes out at 26ish msecs; I set the
timestamp interval based on the stream timebase. The logs say my audio rtmp
packets are correctly spaced at 26 msecs, but the end result is audio and video
not in sync and lagging.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;With my guess of 2080
the rtmp audio packets are every 23 msecs, but this doesn&amp;#8217;t make much
sense&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele
Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; martedì 24 novembre 2009 18.11&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Cancel the previous
message, I forgot to enable the interleaving of packets&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;Apparently I still
need to understand how to correlate the stream timebase and the audio frame
duration&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Daniele
Bettella&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; martedì 24 novembre 2009 17.58&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; [Red5] R: unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Ok, I was able to calculate my timestamps based on the code in the mp3 header; it all works fine for the first minutes, but after a while I begin to notice a little delay on audio. I think this could be because the frame duration is calculated as &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;576 / (getSampleRate() * 0.001)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Inevitably this is not an integer, but the set dts requires one.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;So whatever I do (and based on the stream timebase, which is 1/90000) I&amp;#8217;ll need to transform a double into a long and hence introduce error&amp;#8230;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;And my audio will not be in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;I suppose there&amp;#8217;s a solution to this, but what is it?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span lang=EN-US style='font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D'&gt;Daniele&lt;/span&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US style='color:#1F497D'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div&gt;

&lt;div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;Da:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Segoe UI&quot;,&quot;sans-serif&quot;'&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5-bounces@...&lt;/a&gt;] &lt;b&gt;Per conto di &lt;/b&gt;Andy
Shaules&lt;br&gt;
&lt;b&gt;Inviato:&lt;/b&gt; lunedì 23 novembre 2009 17.14&lt;br&gt;
&lt;b&gt;A:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Oggetto:&lt;/b&gt; Re: [Red5] unequal delay on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;You
should base your timestamps on the mp3 frame durations, not guesses.&lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Look
at the MP3Header class in the red5.io.mp3 package. Use the class to determine
each duration. &lt;/span&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;blockquote style='border:none;border-left:solid black 1.5pt;padding:0cm 0cm 0cm 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt'&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;-----
Original Message ----- &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal style='background:#E4E4E4'&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;daniele.bettella@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;To:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Sent:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; Monday, November 23,
2009 3:05 AM&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt;Subject:&lt;/span&gt;&lt;/b&gt;&lt;span style='font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;'&gt; [Red5] unequal delay
on audio and video&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;m using Xuggle to publish an
H264/mp3 live stream on red5. Audio and video are already encoded when they get
to xuggle, so I do no transcoding, I just pass the packets on to red5.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Now, if I stream video only I have a small
delay, around 0.3 secs, I don&amp;#8217;t know where it comes from, but it&amp;#8217;s
either in xuggle/red5 or the player (which has a buffer of zero, btw). I could live
with this delay (well, sort of), problem is, when I stream audio too this has a
delay of little less than one second, resulting in audio and video not in sync.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;So came the idea to force interleaving of packets
(that is, using container.writePacket(packet, true)). This meant adjusting dsts
by hand, since my packets had no timestamps to start with. This brought two
problems: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt'&gt;&lt;span lang=EN-US&gt;1)&lt;/span&gt;&lt;span lang=EN-US style='font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span lang=EN-US&gt;I know how to adjust timestamps on video packets (since
I have one frame per packet), but I had to guess on audio packets;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoListParagraph style='text-indent:-18.0pt'&gt;&lt;span lang=EN-US&gt;2)&lt;/span&gt;&lt;span lang=EN-US style='font-size:7.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;span lang=EN-US&gt;My best guess resulted in audio and video in sync (at
least for the first minutes), but with a delay of one second which grew when
insufficient bandwidths came out (streaming locally). Which is no good at all.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;What I&amp;#8217;d really like would be to
minimize and balance the delays when non interleaving packets in xuggle,
because that&amp;#8217;s the way I have had the best results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Also to note: if I stream video only at
15fps instead of 30fps the delay grows from .3 to .8 seconds (which, as a side
effect, make audio and video in sync if I add it).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;d really love to figure out where
these delays come out from.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Thanks in advance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;Daniele&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;P.S.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;span lang=EN-US&gt;I&amp;#8217;m sending this on osflash for now,
since my membership on the official group is pending&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div class=MsoNormal align=center style='text-align:center'&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;

&lt;hr size=2 width=&quot;100%&quot; align=center&gt;

&lt;/span&gt;&lt;/div&gt;

&lt;p class=MsoNormal&gt;&lt;span style='font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;'&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
http://osflash.org/mailman/listinfo/red5_osflash.org&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509466&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/unequal-delay-on-audio-and-video-tp26476221p26509466.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26509446</id>
	<title>screen share with Xuggler</title>
	<published>2009-11-25T01:05:09Z</published>
	<updated>2009-11-25T01:05:09Z</updated>
	<author>
		<name>J W</name>
	</author>
	<content type="html">Hi Guys,&lt;br&gt;&lt;br&gt;I believe this topic has been discussed many times in the forum. Is there a conclusion? As far as I understand, here&amp;#39;s the whole process:&lt;br&gt;&lt;br&gt;1. Client A captures his screen using applet (taking advantage of &lt;b&gt;java.awt.Robot&lt;/b&gt;)&lt;br&gt;
2. Xuggler encodes the serial screen shots into a video (within the applet)&lt;br&gt;3. Client A broadcasts the video via red5&lt;br&gt;4. Client B subscribes to the stream and watches the video&lt;br&gt;&lt;br&gt;But how does Client A broadcast the video? The Video info is still handled by the java applet. How does the applet inform red5? Any thoughts or advise are highly appreciated.&lt;br&gt;
&lt;br&gt;Thanks and best regards,&lt;br&gt;-Jingwei&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509446&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/screen-share-with-Xuggler-tp26509446p26509446.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26509434</id>
	<title>Re: Red5 0.9.0 RC3 - trunk Rev 3967</title>
	<published>2009-11-25T01:04:12Z</published>
	<updated>2009-11-25T01:04:12Z</updated>
	<author>
		<name>dsgirard</name>
	</author>
	<content type="html">have you tried &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;sudo ant&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;from within the trunk directory?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;could be permissions...&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Tue, Nov 24, 2009 at 7:06 PM, carlosl &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509434&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;carlosl@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;Hello Everybody,&lt;br&gt;
&lt;br&gt;
FYI.&lt;br&gt;
I updated my dev version with trunk revision 3967 few minuted ago. it failed&lt;br&gt;
compiling because of build.xml line 322 (../../flash/trunk/deploy).&lt;br&gt;
&lt;br&gt;
I tried several times with same results. I had to create the folder tree&lt;br&gt;
for /flash/trunk/deploy to compile sucessfully (BTW. My current trunk&lt;br&gt;
installation is at /opt/Red5-development/red5_server_trunk in case it is&lt;br&gt;
relevant)&lt;br&gt;
&lt;br&gt;
While it is not critical, just wanted to let you know.&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
&lt;br&gt;
Carlos Lozano&lt;br&gt;
CAX IT Services&lt;br&gt;
Houston, TX&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509434&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509434&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Red5-0.9.0-RC3---trunk-Rev-3967-tp26506934p26509434.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26509254</id>
	<title>Re: How to secure red5?</title>
	<published>2009-11-25T00:44:59Z</published>
	<updated>2009-11-25T00:44:59Z</updated>
	<author>
		<name>ヨンニ　ベリィストロム</name>
	</author>
	<content type="html">I'm thinking of this same thing.
&lt;br&gt;A webserver generates tokens per client request - puts them along with 
&lt;br&gt;the client IP in a local database table, then pass the token to the 
&lt;br&gt;client, which has to use the token when connecting (and also has to 
&lt;br&gt;connect from same ip). The Red5 app checks the database table upon 
&lt;br&gt;client connection.
&lt;br&gt;&lt;br&gt;I'm thinking of the greatest weakneses in such a setup.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Naicu Octavian wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; FMS has swf verification which at least protects you from someone 
&lt;br&gt;&amp;gt; making its own swf to call functions on your Red5 app!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; referer verification can be easily bypassed
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; you can also use verification tokens which are generated on your 
&lt;br&gt;&amp;gt; webserver send to the swf then to red5 then red5 verifies them against 
&lt;br&gt;&amp;gt; the web server again
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 2009/11/24 Yann JAMAR &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509254&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;yann.jamar@...&lt;/a&gt; &amp;lt;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509254&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;yann.jamar@...&lt;/a&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Hi all,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Everything works fine in my videoconference application BUT now ,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; i would like to secure all that.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; So i have implement Stream playback security , Stream publishing
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; security,ISharedObjectSecurity describe here :
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.joachim-bauch.de/tutorials/red5/HOWTO-Security.txt&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.joachim-bauch.de/tutorials/red5/HOWTO-Security.txt&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Now the problem is that i would like to secure invoke methods. At
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; this moment , if someone is allowed to connect to my red5
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; application (using login and password registered during
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; registration), decomple my swf and show my call methods ,he can
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; change arguments of the client side call methods and send bad data
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; to my server.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; I was thinking about check referer of the client side application,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; but the referer can be easily falsified ...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Any ideas?
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Regards , Yann.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26509254&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Tv-like-red5-application-tp26465019p26509254.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26508991</id>
	<title>Re: How to secure red5?</title>
	<published>2009-11-25T00:22:21Z</published>
	<updated>2009-11-25T00:22:21Z</updated>
	<author>
		<name>Naicu Octavian</name>
	</author>
	<content type="html">FMS has swf verification which at least protects you from someone making its own swf to call functions on your Red5 app!&lt;br&gt;&lt;br&gt;referer verification can be easily bypassed&lt;br&gt;&lt;br&gt;you can also use verification tokens which are generated on your webserver send to the swf then to red5 then red5 verifies them against the web server again&lt;br&gt;

&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;2009/11/24 Yann JAMAR &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;yann.jamar@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;






&lt;div bgcolor=&quot;#ffffff&quot;&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;Hi all,&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;Everything works fine in my videoconference 
application BUT now , i would like to secure all that.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;So i have implement Stream playback security , 
Stream publishing security,ISharedObjectSecurity describe here :&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;a href=&quot;http://www.joachim-bauch.de/tutorials/red5/HOWTO-Security.txt&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.joachim-bauch.de/tutorials/red5/HOWTO-Security.txt&lt;/a&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;Now the problem is that i would like to secure 
invoke methods. At this moment , if someone is allowed to connect to my red5 
application (using login and password registered during 
registration), decomple my swf and show my call methods ,he can change 
arguments of the client side call methods and send bad data to my 
server.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;I was thinking about check referer of the client 
side application, but the referer can be easily falsified ...&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;Any ideas?&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;Regards , Yann.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;/font&gt; &lt;/div&gt;
&lt;blockquote style=&quot;border-left: 2px solid rgb(0, 0, 0); padding-left: 5px; padding-right: 0px; margin-left: 5px; margin-right: 0px;&quot;&gt;&lt;div class=&quot;im&quot;&gt;
  &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;----- Original Message ----- &lt;/div&gt;
  &lt;div style=&quot;background: rgb(228, 228, 228) none repeat scroll 0% 0%; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&quot;&gt;
&lt;b&gt;From:&lt;/b&gt; 
  &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;setyr@...&lt;/a&gt; &lt;/div&gt;
  &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;/div&gt;

  &lt;/div&gt;&lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 24, 2009 7:52 
  AM&lt;/div&gt;
  &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;&lt;b&gt;Subject:&lt;/b&gt; Re: [Red5] Tv-like red5 
  application&lt;/div&gt;
  &lt;div&gt;&lt;br&gt;&lt;/div&gt;
  &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;And here is a third Tv-like demo using only 
  red5 and php+ajax :&lt;/font&gt;&lt;/div&gt;
  &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;a href=&quot;http://www.nielsenaa.com/TV/tv.php&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.nielsenaa.com/TV/tv.php&lt;/a&gt;&lt;/font&gt;&lt;/div&gt;
  &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;/font&gt; &lt;/div&gt;
  &lt;blockquote style=&quot;border-left: 2px solid rgb(0, 0, 0); padding-left: 5px; padding-right: 0px; margin-left: 5px; margin-right: 0px;&quot;&gt;&lt;div class=&quot;im&quot;&gt;
    &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;----- Original Message ----- &lt;/div&gt;
    &lt;div style=&quot;background: rgb(228, 228, 228) none repeat scroll 0% 0%; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&quot;&gt;
&lt;b&gt;From:&lt;/b&gt; 
    &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bowljoman@...&lt;/a&gt; &lt;/div&gt;
    &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;/div&gt;

    &lt;/div&gt;&lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;&lt;b&gt;Sent:&lt;/b&gt; Sunday, November 22, 2009 5:57 
    PM&lt;/div&gt;
    &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;&lt;b&gt;Subject:&lt;/b&gt; Re: [Red5] Tv-like red5 
    application&lt;/div&gt;
    &lt;div&gt;&lt;br&gt;&lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;Another method:&lt;/font&gt;&lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;/font&gt; &lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;red5 .9 rc1&lt;/font&gt;&lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;/font&gt; &lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;shoutcasth264 jar&lt;/font&gt;&lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;/font&gt; &lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;nsvtools with x264 encoding- Use flask from 
    nsvtools to convert your files to NSV format with h264 vid and 
    aac audio.&lt;/font&gt;&lt;/div&gt;
    &lt;div&gt; &lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;from &lt;a href=&quot;http://scvi.net&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;scvi.net&lt;/a&gt; get nsvscsrcGUI.exe and stream 
    files from client-side playlist. You can add,remove,arrange the playlist 
    while in action.&lt;/font&gt;&lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;&lt;/font&gt; &lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;Have fun! &lt;/font&gt;&lt;/div&gt;
    &lt;div&gt;&lt;font face=&quot;Arial&quot; size=&quot;2&quot;&gt;Andy&lt;/font&gt;&lt;/div&gt;
    &lt;blockquote style=&quot;border-left: 2px solid rgb(0, 0, 0); padding-left: 5px; padding-right: 0px; margin-left: 5px; margin-right: 0px;&quot;&gt;&lt;div class=&quot;im&quot;&gt;
      &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;----- Original Message ----- &lt;/div&gt;

      &lt;div style=&quot;background: rgb(228, 228, 228) none repeat scroll 0% 0%; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;&quot;&gt;
&lt;b&gt;From:&lt;/b&gt; 
      &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;imdogma@...&lt;/a&gt; &lt;/div&gt;
      &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;red5@...&lt;/a&gt; &lt;/div&gt;

      &lt;/div&gt;&lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;&lt;b&gt;Sent:&lt;/b&gt; Sunday, November 22, 2009 6:14 
      AM&lt;/div&gt;
      &lt;div style=&quot;font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;&quot;&gt;&lt;b&gt;Subject:&lt;/b&gt; Re: [Red5] Tv-like red5 
      application&lt;/div&gt;
      &lt;div&gt;&lt;br&gt;&lt;/div&gt;Thanks, i will try!&lt;br&gt;22.11.09, 13:58, &amp;quot;Manuel Raña&amp;quot; 
      &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;info@...&lt;/a&gt;&amp;gt;: 
      &lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1em;&quot;&gt;Hi, 
        take a look at the second commented code block (2nd &amp;quot;if&amp;quot; ) from:&lt;br&gt;&lt;a href=&quot;http://red5.googlecode.com/svn/java/example/trunk/oflaDemo/src/org/red5/demos/oflaDemo/Application.java&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://red5.googlecode.com/svn/java/example/trunk/oflaDemo/src/org/red5/demos/oflaDemo/Application.java&lt;/a&gt;&lt;br&gt;
&lt;br&gt;This 
        creates a ServerStream which do what you want&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
        &lt;div class=&quot;gmail_quote&quot;&gt;2009/11/22 Tipugin Alexander &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;imdogma@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;
        &lt;blockquote style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot; class=&quot;gmail_quote&quot;&gt;Hello friends! Can anybody suggest any tutorial, how 
          to create a tv-like application (or any tutorial, there described how 
          to work with prerecored video and playlists)? I mean, i need 
          application, there videos are playing in playlist order, and then user 
          connects to the stream, he starts watching video from the moment, 
          which is currently on the server.&lt;br&gt;I&amp;#39;ve spended 3-4 days of 
          searching, but haven&amp;#39;t get any results :((( Please help 
          mates!&lt;br&gt;&lt;br&gt;p.s. sry for my poor english 
          :(&lt;div class=&quot;im&quot;&gt;&lt;br&gt;&lt;br&gt;_______________________________________________&lt;br&gt;Red5 
          mailing list&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;br&gt;&lt;br&gt;-- 
      &lt;br&gt;Яндекс.Почта. Письма есть. Спама - нет. 
      &lt;a href=&quot;http://mail.yandex.ru/nospam/sign&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://mail.yandex.ru/nospam/sign&lt;/a&gt;&lt;div class=&quot;im&quot;&gt; 
      &lt;p&gt;
      &lt;/p&gt;&lt;hr&gt;

      &lt;p&gt;&lt;/p&gt;_______________________________________________&lt;br&gt;Red5 mailing 
      list&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;&lt;/blockquote&gt;
    &lt;p&gt;
    &lt;/p&gt;&lt;hr&gt;&lt;div class=&quot;im&quot;&gt;

    &lt;p&gt;&lt;/p&gt;_______________________________________________&lt;br&gt;Red5 mailing 
    list&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;

    &lt;/div&gt;&lt;p&gt;
    &lt;/p&gt;&lt;hr&gt;

    &lt;p&gt;&lt;/p&gt;&lt;br&gt;No virus found in this incoming message.&lt;br&gt;Checked by AVG - 
    &lt;a href=&quot;http://www.avg.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;www.avg.com&lt;/a&gt; &lt;br&gt;Version: 8.5.425 / Virus Database: 270.14.76/2518 - Release 
    Date: 11/21/09 19:41:00&lt;br&gt;&lt;/blockquote&gt;
  &lt;p&gt;
  &lt;/p&gt;&lt;hr&gt;

  &lt;p&gt;&lt;/p&gt;&lt;br&gt;No virus found in this outgoing message.&lt;br&gt;Checked by AVG - 
  &lt;a href=&quot;http://www.avg.com&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;www.avg.com&lt;/a&gt; &lt;br&gt;Version: 8.5.425 / Virus Database: 270.14.79/2522 - Release 
  Date: 11/23/09 19:45:00&lt;br&gt;
  &lt;p&gt;
  &lt;/p&gt;&lt;hr&gt;&lt;div class=&quot;im&quot;&gt;

  &lt;p&gt;&lt;/p&gt;_______________________________________________&lt;br&gt;Red5 mailing 
  list&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;
&lt;br&gt;_______________________________________________&lt;br&gt;
Red5 mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=13&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508991&amp;i=14&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Tv-like-red5-application-tp26465019p26508991.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26508562</id>
	<title>xuggle - how to dynamically add/remove audio input in/from an outputStream</title>
	<published>2009-11-24T23:29:13Z</published>
	<updated>2009-11-24T23:29:13Z</updated>
	<author>
		<name>J W</name>
	</author>
	<content type="html">Hi Guys,&lt;br&gt;&lt;br&gt;I&amp;#39;m looking into a xuggle utility to combine multiple audio input streams into one OutputStream. I&amp;#39;ve checked AudioTranscoderDemo and found here&amp;#39;s the line to link the streams:&lt;br&gt;&lt;br&gt;&lt;div style=&quot;margin-left: 40px;&quot;&gt;
&lt;b&gt;Transcoder transcoder = new Transcoder(aStream,&lt;br&gt;        outputStream, outputStreamInfo);&lt;/b&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;Then I checked the Transcoder class, but found it supports only one InputStream.&lt;br&gt;&lt;br&gt;&lt;div style=&quot;margin-left: 40px;&quot;&gt;
&lt;b&gt;private final IBroadcastStream mInputStream;&lt;/b&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;How should Xuggle add inputs into the output and later remove from it? And once there&amp;#39;re no inputs any more, stop the output?&lt;br&gt;&lt;br&gt;Thanks and best regards,&lt;br&gt;
-Jingwei&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26508562&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/xuggle---how-to-dynamically-add-remove-audio-input-in-from-an-outputStream-tp26508562p26508562.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26507750</id>
	<title>Recording live audio stream problem</title>
	<published>2009-11-24T21:28:47Z</published>
	<updated>2009-11-24T21:28:47Z</updated>
	<author>
		<name>ping jiang-2</name>
	</author>
	<content type="html">&lt;p&gt;Hi, I got some problem when recording live audio stream, below is my code, my problem is, if the live audio stream is not continuous(eg. has data in second 1-3, silence in secend 4-8, has data in second 9-10 etc.), when I play the recording file, it will skip from second 3 to second 9. but If I record with ClientBroadcastStream.saveAs method, it will play correctly. Pls help, Thx.&lt;br&gt;
 &lt;br&gt;Ping&lt;br&gt; &lt;br&gt;===========code in streamManager.java=======&lt;br&gt;public void recordShow(IConnection conn) {&lt;br&gt;  System.out.println(&amp;quot;Recording show for: {}&amp;quot;+conn.getScope().getContextPath());&lt;br&gt;  String streamName = String.valueOf(System.currentTimeMillis());&lt;br&gt;
  try {&lt;br&gt;   &lt;br&gt;   ClientBroadcastStream stream = (ClientBroadcastStream) app.getBroadcastStream(conn.getScope(), &amp;quot;BartiAudioStream&amp;quot;);&lt;br&gt;   FileOutputStream fos = new FileOutputStream(&amp;quot;d://temp//testScreen1.flv&amp;quot;);&lt;br&gt;
   FLVWriter flvWriter = new FLVWriter(fos,false);&lt;br&gt;   if(flvWriter!=null)&lt;br&gt;      writerlist.put(roomName,flvWriter);&lt;br&gt;   flvWriter.writeHeader();&lt;br&gt;    &lt;br&gt;   // Save the stream to disk.&lt;br&gt;   //stream.saveAs(streamName, false);&lt;br&gt;
   long now = System.currentTimeMillis();&lt;br&gt;   MyAudioStreamListener audioListener = new MyAudioStreamListener (flvWriter);&lt;br&gt;    stream.addStreamListener(audioListener);&lt;br&gt;    audioListener.setStartTimestamp(now);&lt;br&gt;
    &lt;br&gt;  } catch (Exception e) {&lt;br&gt;   e.printStackTrace();&lt;br&gt;   logger.error(&amp;quot;Error while saving stream: {}&amp;quot;, streamName);&lt;br&gt;  }&lt;br&gt; &lt;br&gt;public void stopRecordingShow(IConnection conn) {&lt;br&gt;  System.out.println(&amp;quot;Stop recording show for: {}&amp;quot;+ conn.getScope().getContextPath());&lt;br&gt;
  FLVWriter flvWriter = (FLVWriter)writerlist.get(&amp;quot;roomName&amp;quot;);&lt;br&gt;  flvWriter.close();&lt;br&gt;  }&lt;br&gt; &lt;br&gt;===========code in MyAudioStreamListener.java ================&lt;br&gt;public class ScreenAudioStreamListener implements IStreamListener&lt;br&gt;
{&lt;br&gt; final private Logger log = Red5LoggerFactory.getLogger(ScreenAudioStreamListener.class, &amp;quot;deskshare&amp;quot;);&lt;br&gt; private long sTimeStamp = -1;&lt;br&gt; FLVWriter flvWriter;&lt;br&gt; private final static byte audioTagType = 0x08;&lt;/p&gt;

&lt;p&gt; &lt;br&gt; public ScreenAudioStreamListener(FLVWriter flvWriter){&lt;br&gt;  this.flvWriter = flvWriter;&lt;br&gt; }&lt;br&gt;  public void setStartTimestamp(long startTimestamp) {&lt;br&gt;   this.sTimeStamp = startTimestamp;&lt;br&gt;  }&lt;br&gt;  public void packetReceived(IBroadcastStream aStream, IStreamPacket aPacket) {&lt;br&gt;
    &lt;br&gt;    if (sTimeStamp == -1) return;&lt;br&gt;   try&lt;br&gt;    {&lt;br&gt;      IoBuffer buf = aPacket.getData();&lt;br&gt;     //System.out.println(buf.toString());&lt;br&gt;      if (buf != null)&lt;br&gt;        buf.rewind();&lt;br&gt;      if ((buf == null) || (buf.remaining() == 0))&lt;br&gt;
      {&lt;br&gt;        this.log.debug(&amp;quot;skipping empty packet with no data&amp;quot;);&lt;br&gt;        return;&lt;br&gt;      }&lt;br&gt;      if (aPacket instanceof AudioData)&lt;br&gt;      {&lt;br&gt;       ITag tag = new Tag();&lt;br&gt;        tag.setDataType(audioTagType);&lt;br&gt;
        tag.setTimestamp(getTimeStamp());&lt;br&gt;        tag.setBodySize(buf.limit());&lt;br&gt;        tag.setBody(buf);&lt;br&gt;        synchronized(flvWriter)&lt;br&gt;        {&lt;br&gt;          flvWriter.writeTag(tag);&lt;br&gt;        }&lt;br&gt;      }&lt;br&gt;
    }catch (IOException e) {&lt;br&gt;     e.printStackTrace();&lt;br&gt;  }  &lt;br&gt;    &lt;br&gt;  }&lt;br&gt;  &lt;br&gt;  private int getTimeStamp() {&lt;br&gt;  long now = System.currentTimeMillis();&lt;br&gt;  int ret = new Long(now - sTimeStamp).intValue();&lt;br&gt;
    return ret;&lt;br&gt; }&lt;/p&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26507750&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Recording-live-audio-stream-problem-tp26507750p26507750.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26507345</id>
	<title>0.8.0 seek problem</title>
	<published>2009-11-24T20:16:15Z</published>
	<updated>2009-11-24T20:16:15Z</updated>
	<author>
		<name>ヨンニ　ベリィストロム</name>
	</author>
	<content type="html">(Sent this to the new list, however it doesn't seem to show up there, so 
&lt;br&gt;sending to the old list.)
&lt;br&gt;&lt;br&gt;I'm using the Linux red5 0.8.0 release, streaming vp6 flv using rmtp.
&lt;br&gt;&lt;br&gt;Using the Flex &amp;quot;VideoDisplay&amp;quot; client.
&lt;br&gt;&lt;br&gt;It behaves a bit strange. During playback, I do a seek - sometimes the 
&lt;br&gt;player seeks for a while (I'm using a pretty slow connection atm, the 
&lt;br&gt;seeking/buffering until playback resumes can take several seconds) and, 
&lt;br&gt;even if the playback (and obviously buffering) does not actually stop, 
&lt;br&gt;the stateChange comes back with a &amp;quot;VideoEvent.STOPPED&amp;quot;, which means the 
&lt;br&gt;player thinks the video has stopped. The Flex component is designed so 
&lt;br&gt;that when VideoEvent.STOPPED is received, no further update events like 
&lt;br&gt;time etc are retrieved anymore.
&lt;br&gt;&lt;br&gt;I'm a bit confused now if this is a problem of the server (like Red5 
&lt;br&gt;incorrectly sends a stopped or similar event), or with the Flex 
&lt;br&gt;component (like it &amp;quot;times out&amp;quot;, waiting, at some point).
&lt;br&gt;I'm really confused why this stop event comes up at all, because the 
&lt;br&gt;playback resumes normally after the buffering completes - the video 
&lt;br&gt;playback continues but some of the describing data stops coming.
&lt;br&gt;&lt;br&gt;/J
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26507345&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Red5-0.9.0-RC3---trunk-Rev-3967-tp26506934p26507345.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26506934</id>
	<title>Red5 0.9.0 RC3 - trunk Rev 3967</title>
	<published>2009-11-24T19:06:27Z</published>
	<updated>2009-11-24T19:06:27Z</updated>
	<author>
		<name>carlosl</name>
	</author>
	<content type="html">Hello Everybody, 
&lt;br&gt;&lt;br&gt;FYI. 
&lt;br&gt;I updated my dev version with trunk revision 3967 few minuted ago. it failed 
&lt;br&gt;compiling because of build.xml line 322 (../../flash/trunk/deploy). 
&lt;br&gt;&lt;br&gt;I tried several times with same results. I had to create the folder tree 
&lt;br&gt;for /flash/trunk/deploy to compile sucessfully (BTW. My current trunk 
&lt;br&gt;installation is at /opt/Red5-development/red5_server_trunk in case it is 
&lt;br&gt;relevant)
&lt;br&gt;&lt;br&gt;While it is not critical, just wanted to let you know.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Carlos Lozano
&lt;br&gt;CAX IT Services
&lt;br&gt;Houston, TX
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Red5 mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26506934&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Red5@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://osflash.org/mailman/listinfo/red5_osflash.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://osflash.org/mailman/listinfo/red5_osflash.org&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Red5-0.9.0-RC3---trunk-Rev-3967-tp26506934p26506934.html" />
</entry>

</feed>
