Hi Torsten,

On Sun, 2003-01-19 at 21:40, Torsten Mohr wrote:
> When i open that stream and read out the informations in it i get:
> 
> Video frames: 438
> Video rate: 25.00000 frames per second
> 
> Audio channels: 1
> Audio Bits: 16
> Audio Rate: 11025
> Audio Samples: 192413
> 
> I try to check the audio sample number now:
> 
> 438*11025/25 is 193158, that's higher than the number in the stream.
> 
> 437*11025/25 is 192717, that's still too high, though i took one
> frame less.

You don't know the exact practical sample rate. The requested sample
rate is 11025, but audio card clocks are often biased a bit.

> So when i read in video frames from TWO streams, the audio size
> of the first one may be 438, the second one 440.  This leads
> to complicated algorithms for mixing the audio data.

Well, yes. You'd need to either resample the audio or just accept that
audio can be slightly time-biased within frames (just try to keep this
in track by using a total_audio_samples counter). Mixing audio isn't
that simple, I fear.

Anyway, I don't have much experience here either, others might be able
to give much better advice.

Ronald

-- 
Ronald Bultje <[EMAIL PROTECTED]>
Linux Video/Multimedia developer



-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to