Go Back   Tech Support Forum > Design Forum > Graphic Design, Digital Imaging, and Multimedia

Join Tech Support Forum Today

Reply
 
Thread Tools Search this Thread
 
Old 10-15-2009, 11:40 AM   #1
Registered Member
 
Join Date: Jul 2009
Location: pampanga, Philippines
Posts: 31
OS: win xp sp3


codec vs file format

hi,

what is the difference of codec and file format?
i know the basic but it's not enough to understand the two.

thanks.

__________________
I just want to learn computer. Please help me. All i can return is "thank".
Caleb11 is offline   Reply With Quote
Old 10-15-2009, 06:37 PM   #2
Team Manager, Design Forums
 
ebackhus's Avatar
 
Join Date: Apr 2005
Location: SATX
Posts: 17,079
OS: Windows 7 Ultimate x64 SP1

My System

Send a message via ICQ to ebackhus Send a message via AIM to ebackhus Send a message via MSN to ebackhus Send a message via Yahoo to ebackhus Send a message via Skype™ to ebackhus
Re: codec vs file format

Say you have a file called funny.avi. AVI is the container format, but does not dictate what codec was used. H264, XviD, and many other codecs could have been used to create the file.

__________________


-----------------------------
There are no dumb questions, unless a customer is asking them.

Help in the fight against cancer and other serious illnesses.
ebackhus is offline   Reply With Quote
Old 10-15-2009, 09:14 PM   #3
Moderator, Design Team
Moderator, Articles Team
 
zuluclayman's Avatar
 
Join Date: Dec 2005
Location: Newcastle, Australia
Posts: 10,318
OS: Windows Seven Home Premium

My System

Re: codec vs file format

to expand a little on what Koala says - the file format tells you which type of container the file uses as a transport medium. This may be avi (Audio Video Interleaved) or .mpg, .mov etc. This determines the way the information is stored and delivered.
The codec (Compression Decompression) is the algorithms used to firstly compress the video information then as you want to play it to decompress the information - a little bit like going on holidays - you get your clothes, squash them down to fit in your suitcase down then unpack again.
Video files (and to a much lesser extent audio files) are huge if uncompressed - just imagine how much information is needed to describe the position, colour, size etc of every pixel for every frame of a video! then add the audio stream and you would have massive file sizes, making it almost impossible to store and/or transport (either to have as portable files or as in streaming or downloading from the net) these files.
Codecs, to a large extent, determine the file size end quality of the video you watch. If some of the older codecs are used they will not have been able to bring the file size down and retain quality.
The newer codecs such as xVid, DivX, H.264 are able to bring file sizes down dramatically while keeping fairly high quality video - this allows us to store, transport, stream and download high quality video much, much more easily than ever before.

Hope this helps
zuluclayman is offline   Reply With Quote
Old 10-16-2009, 03:01 AM   #4
TSF Enthusiast
 
Join Date: Aug 2008
Posts: 2,439
OS: Windows 2000 SP4 and Windows XP SP3


Re: codec vs file format

container = wrapper (file format)
inside it you can have various streams (usually audio and video, but you could have multiple audio streams (diff languages), subtitles, or other kind of streams)
codec = compressor-decompressor. like previous poster said, uncompressed video is HUMONGOUS. a codec shrinks that data to a manageable size, and unshrinks it back when playing back. (I like the suitcase analogy).

and yes it's possible to put the same audio and video data in different containers. that's what lossless transcoding does. it rips the audio and video streams, and repackages them in a different container, without any loss of quality.
Note: The resulting file may or may not be playable, depending on the container/codec support. Some companies deliberately make their codec explicitly available to work only in one or a few containers (perhaps to protect their intellectual property) - for example Sorenson Video is designed to work in MOV only. And some codecs don't work well (or at all) in some containers (for instance H.264 in AVI - supposedly uses ugly tweaks, and doesn't work all the time).
__________________
blah789 is offline   Reply With Quote
Old 10-16-2009, 09:23 AM   #5
Registered Member
 
Join Date: Jul 2009
Location: pampanga, Philippines
Posts: 31
OS: win xp sp3


Re: codec vs file format

hm! these info are really helpful.

what about the quality of data, does it depend on the codec or on the file format?
__________________
I just want to learn computer. Please help me. All i can return is "thank".
Caleb11 is offline   Reply With Quote
Old 10-16-2009, 03:55 PM   #6
TSF Enthusiast
 
Join Date: Aug 2008
Posts: 2,439
OS: Windows 2000 SP4 and Windows XP SP3


Re: codec vs file format

almost entirely on codec. that's what affects the compression-to-quality ratio of the audio and video streams. container's just a wrapper (like the wrapping around your xmas presents).
you can sometimes hear about raw stream dump. that's when a programmer grabs a stream out of a media file and puts it in another file, but doesn't wrap it in any container. it'll just be raw data (could be audio or video), but it hasn't been packaged.
if it helps, you can think of one of the main roles of the container is to synchronize things. it makes sure the video, audio, (and maybe subtitle) streams are played with correct timing (could be multiple audio streams in various languages, such as in your VOB files on DVD's).

however as mentioned, sometimes you can't put certain codecs in certain containers (or with great difficulty, or without playable results)

sometimes the choice comes down to portability (can you play the file format/container on a windows, a mac, or a unix machine)

some containers are better for streaming, but may contain more overhead because of that. others are leaner. others can contain just about anything you can put into them, including the kitchen sink (matroska/mkv).

__________________
blah789 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is on
Smilies are on
[IMG] code is on
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Post a Question





Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

RV & Travel Trailer Communities

Our RV & Travel Trailer sites encompasses virtually all types of Recreational Vehicles, from brand-specific to general RV communities.

» More about our RV Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities


All times are GMT -7. The time now is 01:55 AM.


Copyright 2001 - 2010, Tech Support Forum

Windows 7 - Windows XP - Windows Vista - Trojan Removal - Spyware Removal - Virus Removal - Networking - Security