View Full Version : audio encoding fundamentals
Dave1024
24th September 2011, 19:48
Hi,
I would like to understand few concepts relate to the audio encoding.
1. What is mean by an audio frame ? - [What are the components and measuring parameters for an audio frame in general]
2. What is mean by a track of an audio data ?
Thanks
Dave
pandy
27th September 2011, 11:23
frame is smallest chunk of compressed data - depend from particular codec ie AC3 use own frame sizes and organization, MPEG use own etc
track is audio signal as a sequence of frames 9samples for non compressed audio) - see magnetic or optical recording - audio signal is stored as a track
LoRd_MuldeR
27th September 2011, 13:03
A frame usually contains information for a certain (fixed) number of audio samples. For example in MP3, each frame contains the data for exactly 1152 samples. Also, in the compressed bitstream, each frame usually starts with some kind of "sync" sequence (or "magic" number) followed by a small header and then the actual (compressed) audio data. The data contained in a frame usually (but not necessarily) is "self-contained", i.e. it can be decompressed without data from other frames. In the MP3 format (not in AAC though), the frames also have a fixed size in bytes, depending on the nominal bitrate. That is: for each bitrate (128 kbps, 192 kbps, etc) the standard defines fixed frame size. Another obscurity of the MP3 format is the so-called "reservoir": If a frame doesn't use all of its bytes you can't simply make it smaller (because the size is fixed), but you can share the unused space with the next frame. The frame then obviously isn't self-contained anymore...
Frames:
http://www.mp3s.name/uploads/pics/frames.png
Header:
http://www.mp3s.name/uploads/pics/header.png
I would say "track" refers to the whole audio (a sequence of "frames" that belong together). However there can be several "tracks" (or "streams") multiplexed in the same file. For example a video DVD usually contains a single video stream/track, but various audio streams/tracks (for the different languages).
Dave1024
27th September 2011, 18:15
:goodpost:
understanding about the frame is fine but i would like to clarify few of my doubts with respect to track. This is to develop some baseline concepts of audio
1. There is a master header [concept] which have common information eg: frequency.?
2. I have a stream which have 8 tracks. that is it is equal to 8 streams each have one track. ?
3. The advantage of using track is to limit the meta data or headers and increase the compression ratio?
Please correct me to build up.
-Dave
LoRd_MuldeR
27th September 2011, 19:19
If you have several "tracks" (audio streams) stored in the same file, they are usually muxed together on the container level (MPEG-TS, Matroska, MP4, etc).
And in this case the individual streams/tracks are pretty much independent, each having its own header(s). And each can have a different number of channels and/or sampling rate.
About "global" (master) headers: I think MP3 does not have any global header for the whole stream/track, only the headers that are stored in the individual frames.
AAC does have a single global header, but only when using the "ADIF" format.
When using AAC with the "ADTS" format, however, there is a 1:1 copy of the so-called fixed header in each frame - plus a variable header that may vary between different frames.
(Also note that the term "track" is often used for streams or files that are played consecutively. Think about the tracks on an Audio CD, for example!)
Dave1024
28th September 2011, 17:20
:goodpost:
I understand the concept. Based on this i want to know how the time code information is managed in the audio visual data.
There is time information which stored in the container or inside the stream for eg: i am considering linear time code. I am considering a sample of audio visual data which is encoded as MPEG 2 video and MPEG 2 part 3 audio. I am considering digital time code and not looking about analog time code. i want to know how this digital information coded and distributed along with different tracks.
Thanks
Dave
Ghitulescu
28th September 2011, 17:48
There is no such thing as analog time code. Even on analog tapes the signal is digital (like the teletext).
There is also no linear time code as LTC in the digital domain, everything is time stamp (TS). TC is for editing, TS (PTS, DTS etc.) are for displaying/replaying.
TC is one for all tracks (if exists) of a file, TS is for each stream/sample/frame in part to keep them in synch.
I think you should buy yourself some of the "Demystified xxxx" books, or google a bit for specific issues. Since most standards are not free, you'll probably find only second-hand infos on the net, but [almost] correct infos are in those books.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.