PDA

View Full Version : What is the difference between Codecs and Filters


Rangnarok
13th June 2005, 08:39
hi,

I am just curious about this. I haven't done a lot of video editing, and I haven't really tried to find out the difference between these two.

I vaguely know that CODECS are used to encode information of a file to make them smaller (similar to compression ? ) to transmit/store and o decode them to normal for playing/editing. Is this right ?

But I am still vague about Filters. In photo editing terms, these are to make the photos have difference effects, so in nature changing the pixels of the photo in a similar manners. But not sure about filters used for Video or audio though. Can you guys help me clarify ?

Like ffsshow. I've used this forever and just know that without this, i can't play a lot of movies because I don't have any other codecs ( Xvid, Dvix ) installed. But is this codecs or filters.

Thanks for sharing your knowledge.

gircobain
13th June 2005, 09:52
Codec is a portmanteau for coder/decoder. They use video for windows (VfW) engine to encode/decode, and usually are presented as dynamic linked libraries (dll). Certain applications, such as VirtualDub, are VfW based and therefore require VfW codecs to work

Filters (in this particular subject) use the DirectShow engine. They may be built for several purposes, one of these for decoding video and/or audio. They usually have an .ax extension. Most video players are DirectShow based, and as such, use DirectShow filters to do the decoding. Another application worth mentioning when it comes do DS filters is Microsoft's GraphEdit

Soulhunter
13th June 2005, 10:03
A filter transforms the input into something different, so a decoder is some sort of filter as well...

- A decoding filter transform coded data (ie. AC3) into raw data (ie. PCM)

- A deinterlacing filter transforms interlaced video into progreesive video

- A denoising filter transforms a noisy input into clean output

- [...]


Bye

bond
13th June 2005, 14:37
the term codec is used for describing a combination of decoder and encoder of a specific format
of course its also possible to offer only an encoder or a decoder seperated from each other

the codec can now be used in different "codec interfaces", like "video for windows"/vfw (as used in virtualdub) or directshow (as used by nero recode or lots of other commercial codecs) or own interfaces (as done in mencoder or videolan)

when talking about directshow you talk about codecs in terms of "filters". eg ffdshow is a decoder filter, which decodes streams in the directshow interface (as used by wmp10 or bsplayer or zoomplayer)
of course there are also encoder filters, as for example used in nero recode as mentioned already

[)370|\|470!2
13th June 2005, 14:51
Filter refers mainly to decoder afaik. The case with nero is only exeption, and
it's not a filter in terms of use, even though it appears in ds, but wont let you
to use it in any other progs but nero's. Looks like it is splitted in a few scripts,
and builds itself each time you start nerovision or recode. Imho.

bond
13th June 2005, 15:03
Filter refers mainly to decoder afaik. The case with nero is only exeption, and
it's not a filter in terms of use, even though it appears in ds, but wont let you
to use it in any other progs but nero's.
pretty much wrong :p

directshow of course lets you use/develop encoder filters too, examples are nero, xvid, 3ivx, faac, mainconcept, moonlight, lame and propably many others too

the reason why you cant use the nero encoder in any other tool than recode is that nero limits their filter to only be useable that way (some time ago you could use the filters also independantly of recode)

stephanV
13th June 2005, 17:28
hi,
I vaguely know that CODECS are used to encode information of a file to make them smaller (similar to compression ? ) to transmit/store and o decode them to normal for playing/editing. Is this right ?
Yes!

But I am still vague about Filters. In photo editing terms, these are to make the photos have difference effects, so in nature changing the pixels of the photo in a similar manners. But not sure about filters used for Video or audio though. Can you guys help me clarify ?
I think when most people talk about filtering video, they indeed mean putting effects on the video (sharpening, blurring, resizing, etc.) as can be done with for example AviSynth, Adobe Premiere and VirtualDub.

Like ffsshow. I've used this forever and just know that without this, i can't play a lot of movies because I don't have any other codecs ( Xvid, Dvix ) installed. But is this codecs or filters.
ffdshow is a little bit of an unlucky example, since it can do many things. But if you talk about the part that enables you to watch video, then you are talking about codecs.

In DirectShow terms, a filter is merely something that performs one or more operations. This can be encoding or decoding, but also parsing, muxing, stream switching, colorspace conversion...

Rangnarok
14th June 2005, 00:05
Ah yes, thanks for all the replies. Indeed now I see why ffdshow was a bad example, in fact it is what gave me the confusion in the first place. Now I know that ffdshow is a hybrid of both codecs and filters, I and just used the filters without knowing that they are there ( switching between audio streams and subtitles etc. ). Now if someone ask me what Codecsa dn Filters are, I at least know how the basics of these two work :)

Thank you all very much.

posix
19th June 2005, 18:20
uhm, congrats.
i must say i haven't really got it although i read through all this.
the thing is that you people, once explaining, start to throw new terms at us noobs which we've never heard.
as in, why come up with all the directoshow, nero, etc. blabla? i know it's somehow related and supposedly important, but it confused me.

so, yeah, where exactly lies the difference between a decoder and a filter?

bond
19th June 2005, 18:22
so, yeah, where exactly lies the difference between a decoder and a filter?
read my first post

posix
19th June 2005, 22:47
it decodes a stream to direct show.
why doesn't the decoder do that by itself? why is an additional filter necessary?

by the way, what exactly is direct show, heh.

Shinigami-Sama
19th June 2005, 23:29
it decodes it that way to make it able to apply stuff to it
like you have to run a picture though a decoder so you can alter it in photoshop and such
we all know a jpeg decoder can't change the image to teh level we'd liek it to for stuff like photoediting

bond
19th June 2005, 23:33
"filter" can be seen as another name for "plugin" for example

you have the directshow system for which people can write "plugins" (aka filters), eg a decoder plugin, which can be used for decoding a stream in the directshow system

now there are tools that use the directshow system, eg players (like windows media player, bsplayer or media player classic)
so if you have an avc decoder directshow plugin/filter you can decode in every directshow based player avc streams

you can also have encoder plugins for encoding streams, or muxer plugins for muxing files (eg .avi files) and many more...


regarding players, of course there are lots of systems similar to directshow. eg players can also use other systems than directshow, eg realplayer and quicktime use their own ones

posix
27th June 2005, 11:55
that made sense to me. thanks bond.

so i have a decoder to merely make a stream readable and then a filter to make it show in a certain application?

Inventive Software
27th June 2005, 11:59
Got it in 1!