10
$\begingroup$

What are the best settings to render if I want lossless compression of the video and audio?

(I'm rendering a small clip that will be added to the Video Editor of multiple Blender files)

$\endgroup$
11
$\begingroup$

I couldn't get DNxHD to work (which isn't lossless, but very close to it), so I suggest the following options, which work for me:

  • Output Format H.264 (RGB)
  • Encoding Preset H264
  • Lossless Output (none of the values in the panel matter)
  • Audio Codec FLAC (bitrate doesn't matter again)

    Lossless Audio and Video Render Settings

This will give you great quality at a relatively small filesize.

$\endgroup$
  • 2
    $\begingroup$ It appears that even with these settings, the bitrate does matter (for the video, but not audio). As an extreme example, I rendered once with bitrate 6000 and once with bitrate 50. This first file was 559KB and seemed lossless to the eye. The second was 266KB and clearly had undergone lossy compression (as seen be playing in VLC or importing into VSE). You can see a comparison of a single frame here. Should I report his as a bug? $\endgroup$ – Garrett Feb 16 '14 at 2:30
  • $\begingroup$ Definately, that shouldn't happen. The options should also be grayed out, so you know they won't do anything. $\endgroup$ – CoDEmanX Feb 16 '14 at 2:40
  • $\begingroup$ The bug has been fixed and although the boxes don't get grayed out, I've confirmed that your answer works. $\endgroup$ – Garrett Feb 18 '14 at 1:57
  • $\begingroup$ That screenshot is from an old version of Blender (2.78 or older) $\endgroup$ – dr. Sybren Sep 20 '17 at 21:55
4
$\begingroup$

There is a preset for "AVI Raw" which is lossless, when a video format is selected you have some options within the Encoding panel. When H.264 is selected for Format you get a Lossless output option, when avi, quicktime, ogg or matroska are selected for Format you have several Codec options - of which PNG should be lossless. For audio, FLAC and PCM would appear to be the lossless options.

Normally to keep video in a lossless quality an image sequence is used, PNG, TIFF and OpenEXR are common formats used. If the audio length matches the entire video then it is easy to align both to the same start frame when adding to a new blend file. Once added they can be merged a a meta strip to keep them together.

$\endgroup$
  • 4
    $\begingroup$ Garrett asked for Audio+Video, AVI Raw does not output any audio. $\endgroup$ – CoDEmanX Feb 15 '14 at 14:30
2
$\begingroup$

The best quality option for lossless video output with audio would be HuffYUV or H.264 w/ Lossless Output mentioned previously.

Filesize with H.264 lossless output is dramatically smaller than HuffYUV. I'm not sure exactly how lossless it really is. Use PCM or FLAC to preserve audio quality.

I've gotten DNxHD to work in the past by using values from this table of supported resolutions. Blender fails to encode unless a compatible set of values is used. Albeit lossy, DNxHD is a pretty nice compression format for size/quality ratio.

Depending on your needs and preferences, it might be a good idea to render animations to lossless image sequences (e.g. PNG, OpenEXR, or TIFF, etc.). That way, you can tweak small portions of your animation or stop and resume rendering at a later time, without needing to re-render the whole sequence.

$\endgroup$
  • $\begingroup$ Lossless means lossless, doesn't it? h264 lossless coding $\endgroup$ – CoDEmanX Apr 23 '14 at 19:42
  • $\begingroup$ There may be some loss in precision during conversion from RGB to YUV, H.264's native colorspace. It may not be visually significant however, and the space savings may be well worth it. I like to use H.264 lossless for final output, and HuffYUV for portions that go into VSE or other NLE. $\endgroup$ – mantlepro Apr 25 '14 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.