» FAQ Codecs
You were redirected to the new location of this resource. Please update your bookmarks.
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

~2d ago

joreg: vvvvTv S02E01 is out: Buttons & Sliders with Dear ImGui: https://www.youtube.com/live/PuuTilbqd9w

~8d ago

joreg: vvvvTv S02E00 is out: Sensors & Servos with Arduino: https://visualprogramming.net/blog/2024/vvvvtv-is-back-with-season-2/

~9d ago

fleg: hey there! What's the best tool for remote work? Teamviewer feels terrible. Thanks!

~22d ago

joreg: Last call: 6-session vvvv beginner course starting November 4: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-i/

~1mth ago

joreg: Missed the last meetup? You can rewatch it here: https://www.youtube.com/live/MdvTa58uxB0?si=Fwi-9hHoCmo794Ag

~1mth ago

theurbankind: When is the next big event, like node festival ?

~1mth ago

~1mth ago

joreg: Join us for the next vvvv meetup on Oktober 17th: https://visualprogramming.net/blog/2024/25.-vvvv-worldwide-meetup/

~1mth ago

joreg: 6 session beginner course part 2 "Deep Dive" starts January 13th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-ii/