• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 5.1 AC-3 WAVs recognized as 2 channels?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 5.1 AC-3 WAVs recognized as 2 channels?


  • Subject: Re: 5.1 AC-3 WAVs recognized as 2 channels?
  • From: Brian Willoughby <email@hidden>
  • Date: Thu, 15 Jun 2006 12:06:48 -0700

Stephen,

A few comments:

AC-3 is lossy, FLAC is lossless.  You would be expanding the amount of space
used to store the audio without gaining any quality.  I suggest continuing to
store the file as AC-3, either in the makeshift WAV that you have, or perhaps a
more appropriate container for AC-3 data.

I have not decoded the header bytes quoted below, but I'll take your word that
they indicate stereo 16-bit audio.  This convention is historical.  Such
formats are typically delivered over an existing audio transport, like 48 kHz
or 44.1 kHz 16-bit stereo audio.  I believe there is a "magic number" which
appears in the audio stream so that decoders can distinguish true stereo audio
from compressed surround.  I imagine that VLC is detecting this magic number
and decoding the AC-3.  In other words, VLC is not decoding the file format,
because the file format wrongly states stereo uncompressed.  Instead, VLC is
taking a 16-bit stereo audio stream from the file, as marked, and decoding it
outside the file format.

I've seen some convention to use .ac3 as a file extension for audio in
surround format.  I have no idea what the format is, but it's likely some kind
of MPEG-2 stream with magic numbers in the bit stream to indicate surround
audio.  You might be better to convert your WAV to a format like this which
correctly indicates the type of data in the stream.

P.S.  The story is similar for DTS surround, which was originally found over
48 kHz 16-bit stereo audio transports (1,536 kb Digital LD), then 44.1 kHz
16-bit stereo (1,411 kb CD), and more recently half-rate data files (768 kb
DVD).

Brian Willoughby
Sound Consulting


Begin forwarded message:

I recently downloaded a 5.1 AC-3 sample WAV from http://
www.kellyindustries.com/sounds.html

Background: Opening the file with QuickTime Player results in static-
the file is shown as stereo.  However, VLC correctly opens and plays
the file.

If I open the file with ExtAudioFileOpen(), and then get information
using ExtAudioFileGetProperty(), the resulting
AudioStreamBasicDescription is filled in with 44.1 kHz, 2-channel
audio at 16 bits per sample.  Obviously any operations performed on
the 5.1 file treating it as 2 channels result in audio garbage (I
primarily want to convert to FLAC).

The WAVE header looks like (starting at the 'fmt ' chunk): 66 6D 74
20 10 00 00 00 01 00 02 00 44 AC 00 00 10 B1 02 00 04 00 10 00.  With
this header, the Core Audio interpretation seems to be correct- the
header implies 2-channel audio (I referred to the WAVE header info at
http://ccrma.stanford.edu/courses/422/projects/WaveFormat/).

I couldn't find any information on 5.1 WAVE format, but assuming the
same as regular WAVE, I am stumped how this file plays correctly in
VLC but generates static in QuickTime Plyaer.  Have I done something
wrong or does Core Audio not support this type of WAV?

Thanks,
Stephen
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >5.1 AC-3 WAVs recognized as 2 channels? (From: "Stephen F. Booth" <email@hidden>)

  • Prev by Date: Re: Audio/Video synchronization
  • Next by Date: getting num of output channels for a device
  • Previous by thread: Re: 5.1 AC-3 WAVs recognized as 2 channels?
  • Next by thread: Re: 5.1 AC-3 WAVs recognized as 2 channels?
  • Index(es):
    • Date
    • Thread