Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Concept about Multimedia Codecs (Container,Format, Codec,Muxer,Demuxer) [closed]

I have gone thorugh lot of multimedia stuff last week and now messed up in few questions.These are related to my work on Developing a Media Player.My questions below are based on that only. I am also looking out for ebook/resource on Multimedia codecs?

I am looking for the following info ?

  1. What is the difference between container, format,codec, packet, frame? I believe it is Container -> Audio(streams) + Video (streams)

Streams are encoded/decoded using the codecs Streams -> Packets Packets -> Frames

(2) How the muxer,demuxer,coder,decoder ladder works?On which side which lies?

(3) When we say a new codec - What does that means? - Coder/decoder or a new file format.AVI is a codec or format?Is there any relation between the codec we are using and the file format.

(4)In what sense does one codec differs from another codec? Playing bit rate,size,quality,fps?

(5) If we are developing a new codec what has to be different?- The Algorithm for encoder and decoder?

(6) Blu ray and DVD rip ? What are they new format?or new Codecs?

(7) If I want to provide the support for the above Codecs in my media player how will I integrate the various Codecs?In the form of some libraries or direct source code reference?

(8)How does the different multimedia framework(Gstremaer,ffmpeg,stagefright, OpenCore) differs with respect to the codec.

Following is/are the links i have gone through :

http://dranger.com/ffmpeg/tutorial01.html

like image 384
Raulp Avatar asked Mar 31 '12 14:03

Raulp


1 Answers

Here's a free online resource to start with (full disclosure: I run the site :-) ): MultimediaWiki. Further, here is a document I wrote a long time ago which might help with a lot of your question: Multimedia Technology Basics. I'll try to answer your questions here.

1) A container format (like AVI or QuickTime/MOV) generally holds (contains) various streams, usually at least one video stream and one audio stream. These video and audio streams are usually encoded using a codec, which is an algorithm that describes a more efficient method for encoding data. Packets and frames: Sometimes, chunks of video or audio data is broken up into packets or frames as defined by their codec specifications, but this tends to get down to semantics-- packets, frames, chunks, they're all just pieces.

2) When you create a multimedia file, you use a coder algorithms to encode the video and audio data, then you use a muxer to put the streams together into a file (container). To play the file, a demuxer takes apart the streams and feeds them into decoders to obtain the video and audio data.

3) Codec means coder/decoder, and is a separate concept from the container format. Many container formats can hold lots of different types of format (AVI and QuickTime/MOV are very general). Other formats are restricted to one or two media types.

4) Codecs compete on many factors and are designed for many purposes. One big difference is lossy vs. lossless. If you need to retain all the original information, you choose a lossless format, but you won't get the best compression. If you can afford to lose some data, you can choose a lossy format which will sacrifice (hopefully imperceptible, to humans) information in exchange for greater compression. Some codecs are optimized for different kinds of data, such as speech codecs which assume the input data is humans talking, or screen video codecs, which assume the input video is relatively static computer desktop sessions.

5) Creating a new codec would imply a new algorithm which would require a new encoder AND decoder.

6) I think these would count as containers. A DVD rip is likely to be something called an MPEG program stream (MPEG-PS), which would likely contain MPEG-2 video data and one of a few different audio types.

7) There are lots of libraries for playing this stuff. First and foremost, you need to consider your platform (Windows, Mac OS X, Linux, iOS, Android, etc.). There are appropriate libraries and frameworks on each.

8) Again, many of those frameworks and libraries will probably serve your needs. It depends on your platform and licensing needs.

I hope this has given you something to work with. As you can see from my handle, I love talking about this stuff. :-)

like image 188
Multimedia Mike Avatar answered Nov 02 '22 00:11

Multimedia Mike