Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to start learning about audio or video codecs? [closed]

Tags:

I am very much confused to know what happens inside the codecs. I want to learn about the elements inside audio encoders and decoders. Would be very happy if you can provide me some links where i can find some good study material.

Precisely I would like to know how the codec parses the a media file.

like image 685
Vamsi Avatar asked Mar 26 '10 11:03

Vamsi


People also ask

What are audio and video codecs?

Codecs are compression technologies and have two components, an encoder to compress the files, and a decoder to decompress. There are codecs for data (PKZIP), still images (JPEG, GIF, PNG), audio (MP3, AAC) and video (Cinepak, MPEG-2, H. 264, VP8). There are two kinds of codecs; lossless, and lossy.

How do I know which codec I need?

To determine what codec was used with a specific file, play the file in the Player, if possible. While the file is playing, right-click the file in the library, and then select Properties. On the File tab, look at the Audio codec and Video codec sections. Use a non-Microsoft codec identification tool.

What is the most popular video codec?

The most common codec includes h. 264, which is often used for high-definition digital video and distribution of video content.


1 Answers

Your title asks about A/V compression, but the rest of your comments talks about parsing the media file & identifying its codec. Those are very different tasks: spec'd & implemented by different organizations, performed by different APIs in most multimedia libraries, and above all requiring very different skill sets.

A/V file formats aren't too different from any other file format, which in turn are just formal grammars. Parsing, validation, and the resulting object graphs are conceptually no different from any other grammar -- and in practice, they tend to be far simpler than the grammars you encounter in a standard CS curriculum (compilers, finite automata). The AVI file format is kind of antiquated at this point, but I'd still recommend starting there because:

  • many of today's more complex formats resemble AVI in whole or in part, or at minimum assume you're familiar with its basic structures
  • AVI is a member of a larger family of multimedia formats known as RIFF, which you'll find used in many other places such as WAVs

Codecs, meanwhile, are some of the most complex algorithms you're likely to find among "consumer" software. They draw heavily on advancements in both the academic community and the R&D arms of large corporations (including their vast patent libraries). To be proficient in codecs you need to know the at least the basics of:

  • information theory
  • common entropy coding algorithms
  • Fourier analysis (and as much other DSP as possible)
  • psychoacoustic/psychovisual modeling
  • practical limitations imposed by the production/broadcast lifecycle, legacy video equipment & standards, and pesky old physics, including:
    • interlacing
    • fixed colorspaces
    • lens optics
  • practical limitations imposed by today's CPU architectures, especially:
    • SIMD optimization
    • cache line aliasing, prefetching, etc

If you have already have a decent background (eg, you've taken one or two undergraduate level "math for engineers"-type of classes) then I say dive right in. Many of the best A/V codecs are open source:

  • x264 (MPEG-4 part 10, aka AVC)
  • LAME (MPEG-1 layer 3, aka mp3)
  • Xvid (MPEG-4 part 2, same as Divx and many others)
  • Vorbis (alternative, patent-free audio codec)
  • Dirac (alternative, patent-free video codec based on a wavelet transform)
like image 190
Richard Berg Avatar answered Oct 14 '22 10:10

Richard Berg