Jump to content
Sign in to follow this  
Leo Wattenberg

Rendering a video: The basics

Recommended Posts

Moin.

When rendering (or "exporting", "producing" or "save as video"-ing) a video, you'll be faced with a lot of options, some of which are pretty self-explanatory, others being a bit more obscure. I'll be going over the basic, most important ones here. The advice given here will be mostly be of the safe, boring "how to not fuck up" kind; I'll be covering more advanced options later on. 

Resolution

The video's resolution is what you usually see as "quality" option on websites. It's effectively the size of the mosaic the individual pixels of the video create, measured in width and height in Pixels (px). So for example, FullHD is 1920×1080px. Websites often call resolutions by their height, so FullHD is 1080p. 

You generally want to render your video in the same resolution as your source material.

Aspect ratio

The video's aspect ratio is what fraction you get if you divide the width by the height. So, for FullHD, you have 1920÷1080, which is the same as 16:9, which is the same as 1,77:1. Other common resolutions are 4:3 (old TVs) and 18:9 (modern smartphones, aka 2:1). 

As with the resolution, you generally want to render your video in the same aspect ratio as your source material. 

Bitrate

While the video's resolution is the size of the mosaic, the bitrate is the details within the mosaic. In other words, the bitrate is really what drives the quality in your video. It's usually measured in kilobits per second (kbps, kBit/s) or megabits per second (Mbps, MBit/s. 1MBit/s = 1000 kBit/s). As such, how high of a bitrate you need heavily depends on what you're filming: A blue sky can be perfectly captured with a low bitrate, while a bumpy ride through a forest on the same bitrate would be a pixelated brown-green mess. 

There often are two options to choose from for bitrates: Constant bitrates (CBR) and variable bitrates (VBR). It's a good idea to use less data where possible, so you can have some left over for difficult scenes, so VBR is what you want here. 

Your bitrate depends on your resolution, content, codec, as well as target website.

In general, you want to have your bitrates in this range:

  • SD (480p and anything below): 2-5 MBit/s
  • 720p: 5-10 MBit/s
  • 1080p: 8-20 MBit/s
  • 1440p: 15-30 MBit/s
  • 2160p (4K): 30-80 MBit/s

Codec

Codecs are a bit more complex to conceptualize, so I'll be explaining them in a bit more depth here than the rest. 

The codec is software made out of two parts: The encoder, that takes the video, does math to it ("encodes it") and makes the file size a lot smaller while keeping it on a similar quality, and the decoder, that takes the encoded data, does the math in reverse ("decodes it"), and gets your video out of it again. 

There are a lot of different codec standards: Some slower, but very good at making the video's file size tiny; some faster, but not as good in making the file size small. 

Slow, but efficient codec standards include VP9 and h.265 (aka HEVC). Fast, but not-as-efficient codec standards include h.264 (aka AVC). There are many more than these, both much more efficient and much less efficient, but they're either too new to be widely available, or too old to be really useful anymore (for the web anyways, you'll need the older ones for DVD creation and such). 

Each codec standard has a lot of different implementations.

The implementations are just different people and organizations making the standard into a real thing. It's basically like HTML being a standard, and browsers (Chrome, Firefox, Internet Explorer, Edge, Vivaldi, ...) being implementations of it. They mostly behave the same, but have some benefits and drawbacks. For h.264 and h.265, the most common codecs are x264 and x265, while for VP9, the codec usually used is libvpx-vp9. Now for a comparison between them:

vp9-x264-x265-encoding-quality.png

(source: rbultje's blog)

The x-axis shows the bitrate measured in kilobits per second, the y-axis shows structural similarity, a measure of quality,  in decibels. Note that both axis are logarithmic, so if an increase from 12 to 13 means that the quality (SSIM) increases 10x, an increase from 12 to 14 means that it increases 100x. As you can see, the differences are largest on the low-bitrate end and not nearly as important on the high bitrate end, and the difference between VP9 and h.265 is basically non-existent. 

So, to answer the question "What codec should I use?":

  • Slow PC, but fast internet? x264, with a higher bitrate.
  • Fast PC, but slow internet? x265/VP9, with a lower bitrate.
  • Slow PC and slow internet?  ¯\_(ツ)_/¯ (try testing which one of the above is quicker)
  • Fast PC and fast internet? Not willing to compromise quality for anything?  x265/VP9, with a higher bitrate (and slower preset, if possible) 

encoding_time.png

(source: ffmpeg)

Websites

Pretty much regardless to which website you upload your video to, the website will transcode it to their codecs, bitrates and resolutions. This means if you have a square (1:1) video in 480p at 100 MBit/s, viewing it on the website will have it in 16:9, either stretched or with huge black bars on the side, still in 480p, but at 2.5 MBit/s or so. So before you finalize your settings, you may want to do a few test renders lasting maybe a minute and see how they look on various platforms.

And, of course: If your video has an option called "upload to <website>" that actually works – just use that for now. It can save you a lot of headache.

See also: 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Member Statistics

    238
    Total Members
    3319
    Most Online
    Svitlana
    Newest Member
    Svitlana
    Joined
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.. You can find our privacy policy here Privacy Policy and our terms of service available here Terms of Use