Log in

View Full Version : Odd Ogg behavior using 44.1kHz and 48kHz tracks


FreakNGoat
6th November 2002, 11:18
I am experiencing some odd behavior playing back a movie I encoded using the 48kHz soundtrack from the movie, and a 44.1kHz track from a CD. Specifically, Wizard of Oz, and Pink Floyd's Dark Side of the Moon. I'm getting different behavior in Media Player and Zoom Player.

In Media Player, if the Ogg splitter is configured to NOT "always enable all streams" when I open the file and I select the CD sound track, the movie plays just a little bit too fast. The sound is obviously higher pitch, but the movie stays in sync with the audio. If Ogg splitter is configured to "always enable all streams" when I open the file and choose the CD audio sound track, the speed is normal and the sound is okay.

In Zoom Player, I'm getting something a little different. If the ogg splitter is configured to NOT "always enable all streams" when I open the file and select the CD sound track, it behaves exactly like Media player does under the same condition (plays too fast, audio higher pitch, but in sync). If ogg splitter is configured to "always enable all streams" when I open the file and select the CD sound track, no sound comes out. I then have to choose Audio Track -> Default DirectSound Device 0003 and then I get CD sound at the normal speed and normal pitch. If I then go back to the movie soundtrack, I have to select Audio Track -> Default DirectSound Device to get the sound back.

It's very weird, it's like ogg uses too different DirectSound sessions (for lack of a better descriptor) for each soundtrack if ogg splitter is set to "always enable all streams." If not, it seems it uses one DirectSound session set to 48kHz and therefore everything gets sped up when the 44.1kHz track is played to compensate.

I'm using the latest Ogg DirectShow filters, DirectX 8.1, Media Player 8.0, and Zoom Player 2.90 RC2.

I've put a clip on my ftp site (its about 13 megs) for anyone who's interested. ftp.cheatgoat.com (ftp://ftp.cheatgoat.com/)

Suzahara
7th November 2002, 13:59
Clip plays fine on my computer, but that could just be because it's not the full thing. However, if you want to combine two different frequency files, one of them will have to be changed to match the frequency of the other. This is the easiest way to solve your problem. I think that multiple frequencies is possible in ogg. However, at this point, it probably isn't 100% working.

Suiryc
7th November 2002, 14:43
Originally posted by Suzahara
Clip plays fine on my computer, but that could just be because it's not the full thing.
Yes clip plays fine (well not really for me but I have sometimes problems with DivX 5 clips ;)). But just look at the real framerates (Statistics in WMPlayer) : 23.976 for the first audio track, but near 26 for the second one. And of course first audio track = 48000Hz, second audio track = 44100Hz, and 23.976 * 48000/44100 ~ 26 ;) (yes it seems the same OggDecoder/DirectSound filters are used for both tracks when not enabling all streams, which makes the 44100Hz track being played at 48000Hz => speed up the video for compensate).