» FAQ Codecs
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

FAQ Codecs

What is the best video codec?

the answer depends on the purpose:

  • quality
  • performance
  • small filesize

below we try to collect basic facts about different codecs and UserComments. read on to find out your best bet.

General

External Link: Everything you ever wanted to know about video codecs.

Random Seeking

When seeking, vvvv tries to seek to the exact position in the file. how fast this will happen is very much dependant on the codec and the number of keyframes you use. the standard windows codecs all have their problems with fast seeking.

It seems that codecs based on MJPG and codecs of the WMV9 series seek fastest. Read through the UserComments of the list of codecs below to learn of some experience with different codecs.

Alpha Channel

Most probably all codecs on windows dont properly deal with alpha channels. So you wont get any alpha channels on videos the easy way. This is a well known windows annoyance.

You can use pixel shaders to implement a chroma-key blue-screen alpha channel, or to combine two videos which you play back at the same time.

Reverse Playing

We dont think there is a windows codec, where "speed = -1" works. Please prove us wrong.

If you need to playback your video in reverse one way could be to encode it in reverse and append it to your video. when you need to play in reverse seek to the according position at the second half of your video and play from there.

u7angel wrote here:

the technique i use for reverse video is using the indeo 5 codec with keyframes set to every frame. then set filestream seek mode to 1 forever and control the playback with the seek position. works on every machine i have but never tried insane resolutions though.

Hardware Accelerated Decoding, dxva, decoding on GPU

recent graphic cards have support for hardware accelerated decoding on the gpu via microsofts dxva api. this reduces cpu usage.

there are 3 types of codecs that can make use of dxva:

  • Windows Medias WMV9 series
  • H.264 aka MPEG4/AVC
  • MPEG2

Windows Media

Encoder
available for free:

Decoder
decoder ships with windows and uses hardware accelerated decoding if your card supports it. make sure you have installed the latest version of windows mediaplayer 10. (older versions of wmp10 still lacked dxva support!)

UserComments

If playback of WMV9 files crashes or stalls your machine try setting the TextureSizeMode of the videotexture to NonPow2. eventually this should be a driver-bug of either graphiccards or the wmv9 decoder and hopefully be resolved with one of their future releases.

wmv9 seems very fast for seeking even in videos with hd resolution you can nearly loop without pause. but then, wmv9 != wmv9. a lot of compression details to consider. seemed to work best when files had no sound-channel.

  • January, 06

additional thoughts by user nbd

one of the main drawbacks I have found with this codec is you can't run at a speed other than 1. For this reason I have switched to MJPEG for performance work

MPEG2

Encoder
not aware of any free. lots of commercial:

Decoder
free decoders are available. for example one comes with MediaPlayer Classic. but probably none is freely available that uses dxva for hardware accelerated decoding.

commercial decoders using dxva

here's a free mpeg2 decoder that supports dxva

    http://www.softsland.com/bitcontrolr_MPEG2_decoder.html

K-Lite Mega Codec Pack 1.70version supports dxva too
by Cyberlink MPEG-2 decoder

    http://www.softpedia.com/get/Multimedia/Video/Codec-Packs-Video-Codecs/KLite-Mega-Codec-Pack.shtml

H.264 aka MPEG4/AVC

Encoder
x264 a free h.264 encoder

Traditional CPU decoding

all the older codecs make no use of the dxva api and therefore decoding can be quite demanding for the cpu.

Quicktime

Decoder
vvvv cannot playback quicktime files natively but also via the directshow pipeline. therefore you need one of the freely available quicktime directshow filters coming with quicktime-alternative versions <= 1.81. version 1.90 and above no longer include directshowfilters.
or you can try with QuickTime DirectShow Filter for WMP 1.0.16
http://www.riverpast.com/en/prod/quicktime/download/

UserComments

different versions of quicktime-alternative shipped with different quicktime directshow filters that seem to work differently with different quicktime codecs. beware of version 1.70 which definitely had a memory leak. i recently found version 1.56 working with soerenson and soerenson3 compressed movies.

ffdshow

Encoder/Decoder
fastest free available video decoder for cpu based codecs, perfect dshow integration, so in vvvv. it provides encoder and decoder for the most codec types, including H.264 and Motion JPEG. unfourtunately, the Motion JPEG decoder doesn't work in vvvv in fullscreen mode --> joreg?
ffdshow

Motion JPEG

Encoder/Decoder
PICVideo M-JPEG Codec v3

UserComments

Seems quite good for random seeking with material up to PAL resolution

  • aze, Mars 2, 09

720p works fine too and encoding is fast. great codec!

Good live performance even with HD, and the ability to change speed on the fly... now my preferred codec over WMV. Plus if you shoot video on your SLR to SD card, no need to convert.

Midivid

Encoder/Decoder
JPeg and MV3 codec by midivid are both free codecs targeted for vj use

Indeo

Encoder/Decoder
The Indeo codec was a sugestion on resolume forum.
indeo codec by ligos

XviD

still a good codec :)

Lossless Codecs

If quality is the matter.

HuffYuv

Encoder/Decoder
If you have clean graphic material as a source HUFFYUV is always worth a try, it's lossless.

UserComments

  • old

be aware, that HuffYuv only supports 4:3 or 5:4 frameratio and you cant stream two (or more) HuffYuvs with different codec settings (like left, gradient or median)

CorePNG

Encoder
Lossless PNG compression, smaller output file size than Huffyuv. Essentially, each frame is compressed as a PNG, so if PNG does it, this codec does too. (RGBA) The new version has the ability to write P frames and to autodetect when it should. The P frame takes the difference of the previous frame and the current frame and encodes that as a PNG. CorePNG

Decoder
Use ffdshow to decode (play) the video, its more than twice as fast as the provided decoder!

UserComments
i used the CorePNG/ffdshow combination sucessfully in a recent project. the videos are in 10:16, 800x1280 30fps format. the videos play very smooth with 30-40% CPU usage on a 2.13 GHz Intel Core 2 Duo.

LZO

Encoder
Another superbe lossless codec. LZO is a lossless compression algorithm, which is especially optimized for high speed decoding! besides that, the encoding perfomance is also great.
Two LZO codecs are available: the recommended CamStudio Codec and the LZOCodec, which isn't supported by ffdshow, hence has worse playback performance.

Decoder
Use ffdshow to decode the video.

UserComments
i was looking since some months for a LZO based codec. this codec may be the best lossless codec for playback, because of its very fast decompression algorithm. for me, the camstudio/ffdshow (i used the clsid_sse_icl9 build rev1006) combination beats all other lossless codecs in playback performance. 10-30% CPU usage with a 800x1280 30fps video on a 2.13 GHz Intel Core 2 Duo.

anonymous user login

Shoutbox

~12h ago

ravazquez: @catweasel it was late when I wrote that, it's probably not the case, will test and report

~12h ago

catweasel: @ravazquez in separate instances of vvvv? Awesome if so!

~3d ago

ravazquez: @karistouf you can use my Global S&R contribution for this purpose

~4d ago

joreg: yes, no S/R. OSC is one way to communicate btw. instnces.

~4d ago

karistouf: @joreg: between 2 differents instances of VVVV on same computer,no S and R (values) possible ? only OSC way ?

~6d ago

tonfilm: glad to share the second update on the #vl #xenko #3d library: #vvvv #visualprogramming #creativecoding vl-xenko-3d-engine-update-2

~8d ago

joreg: rather toot then tweet? follow the hype and us on mastodon: https://mastodon.xyz/@vvvv #vvvv

~8d ago

ggml: any recommendation for renting visuals-grade pcs in berlin ?

~8d ago

metrowave: Structure Sensor Core now for Windows: https://store.structure.io/buy/structure-core cool features, could be useful in vvvv