Rendering Video Options

Hey guys, I need a little help with rendering videos. I don’t really understand how it works in blender because there are so many options and I’m still trying to wrap my head around all these different formats, codecs, and encodings :spin: and I’m just trying to figure out how they work and what they do. Normally I just render all my frames as pngs then put them together in the blender video editor and blindly pick options that will render it into a video. What I would like to know is like what options would I select and change to render my frames straight to mp4s and all those different formats.

if you render it off the bat as a video then it speeds up the render time quite a bit i’ve found. and usually AVI Codec is a pretty safe avenue to go with, in the first tab in the buttons dock under output.

True but I’ve tried avi raw and it render videos in the size of gigs and I’m not all to thrilled about all that memory hogging. What about mp4 or flv? how could I get those? What’s the difference between h.264 and mpeg too?

AVI is not a codec. Nor is Quicktime. Nor is FLV.

All of those are containers. This throws off a lot of people when they are first learning about video. You’ll often hear things like “I saved as quicktime, but its not opening!”. Or “I saved it as AVI and its huge!”

A video is actually two sets of data, a video stream (the picture) and an audio stream (the sound). In order to interact with these as one file, we wrap them up in a third piece of data, the container. This keeps the streams together and in sync. Usually, it provides for some metadata too, like a title for the video, names of people involved, etc. In order to play a video, the software has to be able to open the container, and then read both the video and audio inside.

So a video “format” is actually the combination of the compression format for the video, the compression format for the audio, and the container they are wrapped up in. Some containers, like mp4, have specific formatting rules for their contents. Others, like quicktime and avi, you can shove pretty much whatever you want in there. If you are encoding a video for distribution, you should be using one of the following two combos, depending on your tools and your feelings on software patents:

MPEG-4 container (.mp4) containing h.264 video and AAC audio


WebM container containing VP8 video and Ogg vorbis audio.

FLV is a flash container, usually it just carries h.264 and AAC as well, although it supports some older formats too. There is really no reason to use this unless you are preparing a flash stream. Uploading to youtube or something DOES NOT COUNT. All video streaming sites will re-encode your video prior to it being available to watch.

MPEG-2 is an older format, it’s used for DVDs. Unless your are encoding for DVD authoring, you should be using mpeg-4/h.264 instead.

MPEG-4 is also the name of a codec, don’t get it confused with the MPEG-4 container (.mp4). It’s full name is MPEG-4 layer 2. You should not use this codec either, you should use h.264 instead, which is MPEG-4 layer 10.

Ogg Theora is an old, creaky codec that doesn’t have a whole lot of merit besides being open and not being encumbered by patents. You should use VP8 in a WebM container instead, you will get better compression efficiency.

There’s also the matroska container. This is similar to webm, but it supports more formats. WebM container is only supposed to be vp8+vorbis, according to the spec. You can shove other things like h.264 with either AAC or MP3 audio in Matroska. Similarly, the Quicktime container (.mov) can accept pretty much anything. Useful for those times you want apple lossless audio with h.264 video or something.

For the love of $deity, STOP USING AVI!!!

Please use WebM/matroska or mp4/quicktime as your container format. (The MPEG-4 container format is derived from quicktime, the WebM container is derived from matroska).

tl;dr: Container /= codec, the difference is very important. Use one of these:

MPEG-4 container (.mp4) containing h.264 video and AAC audio


WebM container containing VP8 video and Ogg vorbis audio.

Ok thanks for the info but in my list of containters or formats I only have AVI JPEG, AVI RAW, H.264, MPEG, Ogg theora, and Xvid. I do not have an MPEG-4 contaiter. Is there a way to get it?

Use MPEG then choose audio and video codecs. There is an h.264 in the presets.

Ok so I set my output to MPEG and set the presents to h.264 and it renders in .avi not mp4. Why is that?

Bookmarking this one!

RE: encoding to h.264 in Blender. For reasons I don’t understand, this does not always work properly for me, so I found a good workaround that ends up being more versatile.

Handbrake is an Open Source video and a/v encoder that does an excellent job with h.264 and has options galore. It can save to various containers, .mp4 & .m4v being the more common. It can encode audio as well if it’s part of the data stream – not sure about using external audio sources, haven’t tried that yet.

It’s best to feed Handbrake a lossless video format, and it plays well with .avi, so as an intermediate output from Blender I use AVI raw, and if I also have audio tracks laid down in Blender’s VSE, I do a Mixdown to a WAV file. I then mux the raw AVI & the uncompressed audio in Virtual Dub, an external utility that targets the .avi container. The lossless mux I then feed to Handbrake, suitable settings for h.264 & audio compression are entered, and the final distributable video is encoded, usually to the .mp4 container.

While this may seem a bit more complex than needed, and you may have to deal with some very large intermediate files (raw AVI can be huge), the benefit is Handbrakes’ much more comprehensive feature set for the final encoding. Plus, I’ve found that videos output from Blender don’t always play as reliably as those from external utilities like Handbrake & Virtual Dub.

I work on PC platforms so I can’t vouch for this as a Mac pipeline.

I want to be able to upload my video to vimeo or youtube, and then post that video via facebook. Using my methods before facebook says the file format is not supported on the iphone so I can’t view it.

Which settings would I use if I wanted my video to be able to be viewed on facebook via an iphone?

So far i managed just once get usable h264video+sound out straight from blender. That was version 2.5x. All later attempts ended into that ol’ plain AVI, be it for downloaded from GA or self compiled blender…
However, once you have rendered image frames, there’s plenty of options to use besides ones blender provides (or doesn’t for different technical reasons).

ffmpeg being first one, as blender also relies on this. It’s available for both linux and win (no idea about 3rd breed tho).

There are 100ths of recipes on the web for different kind of tasks what ffmpeg can do with image sequences to movie formats or vice versa. Just look out for one for your specific needs or have it as a basis for further adoption.

ffmpeg helps for making screencasts also. David Revoy posted Nathan Wegdahl’s python scriptwhich works quite nicely. It allows for choosing window to capture and produces 15 fps video out of the box. No additional messing with ffmpeg command line, which could be miles long and confusing for all the bells and whistles sometimes. Output video is put where script resides, if not specified path.

For iphone specifics this article looks like covering most of the details. Then it’s just a matter of looking for ffmpeg conversion commands needed and checking output in vlc under Tools, Codec Details.

I did try to compile Handbrake (it’s available only as a source for linux) but this process run out to the internet and was seemingly trying to download and recompile all my distribution, kernel included, and what not. Ended abruptly on some unneeded for me subtitle utility, tg :). I’ll probably wait while dust settles down and make another go…

xVid is a usable alternate as well.
Just name your output file with a .AVI extension. Choose xVid for the container and codec. The bitrate of 6,000 is the default which is a little high (can cause stutter on some low end system during playback). This depends upon your final quality requirements. I typically lower this to 5200 or lower. But I rarely render a final “video” out of Blender. I typically render to an image sequence and make the final video using external software (quicktime, virtual dub or After Effects).

Awesome! I’ll take a look into this more.

Am I not able to produce h.264 on Ubuntu because I don’t have the proper codecs installed? I was messing around with various settings last night and the only thing I could get to work was MPG, MPG4 files.

Is there an opensource program good for rendering image sequences? I don’t anything close to After Effects, but is there anything somewhat comparable?

On Windows you can use VirtualDUB.
Quicktime Pro can do it, but does cost.
And, of course, you can use Blender to read in the frame sequence and render out a movie.

Hi Jason,
Perhaps you an help me out here. I was rendering to PNG (1080p, full antialiasing and other image specs etc.) then using the VSE to produce the video using the .mp4, h.264 and AAC formatting, and it worked very well this morning. downloaded an update later this morning, and all of a sudden there is an 'error initialising audio stream". Was working, download, not working. Now I need to fix it.


I have same problem but I use linux. Not sure how to fix it but the way around it that I found was to just use mp3 instead of AAC for the sound. unfortunatly I also used h.264 because I do not have .mp4 formatting in my build as much as I wish I had it.

Yeah, i found that too. But i want to maintain the AAC. My issue is more the fact that it was working fine, then a really small update meant it didn’t work anymore.
My video tech guy said to maintain mp4 and AAC as good specs though, so I’m a little annoyed I can’t anymore.

Can you find a way to downgrade? I’m not exactly sure how to make it work now either. But a little off topic how do you have .mp4 formating available? I don’t have it among the list of formats. I use the build straight off of

I’m using a build that I download via the apt get function. Means I never have to think about upgrading, it just does it any time there’s a modification.
Regarding the .mp4, I select MPEG from the output section, then MPEG-4 in the encoding section. I assumed everyone had this option.

Hope this helps.