Best Lossless Video/Audio formats & Codecs to export anmations as?

Hi Guys,

I’ve done up a few really cool animations in Blender 2.69, which I’ve rendered out to PNG frames in 1440p, as I was going to sequence them into a video later, alongside some sound effects. I was just wondering what container/codec combination would give me lossless video/audio, and stil be editable in mainstream video editing software. I’m really keen to keep it to keep it at the highest-quality possible, as well as still work in the resolution I intended (2560x1440).
I’ve tried using H.264, as both a container and codec, but I can’t open the video in any video editing software, or even play it in Windows Media Player, although it does play in VLC Player.

This is my first post to this community, so forgive me if this thread is in the wrong place!

Cheers,
Artistic Infinity

H264 is a delivery format not a production format as it strips out to much data. QuickTime prores or animation codecs are good if you have them on your system. But Blender’s built in ffmpeg presets arent designed to do what you want. The frame sequences are the best way but does require conversion if your nle doesn’t recognise them.

I’m also interested in this topic. It’s true that the best way to do things, is rendering frame by frame in PNG, but using several sequences of hundreds of PNG’s simultaneously in the timeline of the video editor, can slow down performance.

By example, trying to edit a demo reel video with 5-6 clips created “on air” with 100-200 PNGs each one, can slow down the realtime playback of the timeline. I think converting PNGs sequences in lossless video clips can solve this problem.

Anyway, I’m actually using M2T format, but I don’t know if it’s the best choice.

How much data H.264 strips out depends on the encoder profile. Lossless 4:4:4 all-Intra H.264 is hardly a delivery format since it doesn’t strip out any data at all. ProRes doesn’t even offer a lossless mode.

Unfortunately Blender’s output format selector has several issues that make it impossible to export H.264 properly. For example, it insists on writing lossless H.264 to AVI containers, which makes no sense IMO. If you choose the correct format (MP4, labeled “Quicktime” in Blender), the lossless option disappears. Lossy encoding on the other hand wouldn’t be so bad if you could at least choose a target quality (aka. constant rate factor), but Blender only allows choosing a target bitrate, which is never ideal for 1-pass encoding.

Yes I’ve never understood that. It results in a poor I frame at the start generating heavily compressed initial frames.

Didn’t realise there was such a profile available in h264, thanks eye208.

so i saw this video once

I just discovered something interesting:

In Blender 2.69 for Windows, if you enable lossless H.264 and then switch the container format to MP4 (“Quicktime”), the lossless option will be hidden but still be effective (qp=0 will be passed to the encoder). So you can export a lossless MP4 file after all.

In Blender 2.69 for Linux, if you enable lossless H.264, Blender will use average bitrate mode anyway (rc=abr). This may be due to an older version of libx264 (core 118 on Linux vs. core 120 on Windows) being statically linked to the official binary (download.blender.org) which doesn’t support lossless mode.

Moved from “General Forums > Blender and CG Discussions” to “Support > Compositing and Post Processing”

If space is not an issue, then by all means go for HuffyUV as it’s lossless. The obvious drawback is humongous file sizes.

If you don’t want to get too paranoid about this, then DNxHD is a very good choice though not lossless. You can use any of the truly high bitrate profiles available. It should be more than enough, especially for animation.

You’ve got two main options here. The first is to reduce the resolution % to something like 20% or even less. It can be helpful but not if you really need to see any fine detail within the frame. Should be doable for a first rough cut though and should speed the process up a bit.
The second option - which I’d highly recommend - is to make meta strips for each image sequence and then create proxies for these metastrips. Editing will be lightning fast with proxies.

Oh and lots of ram would also come in handy if you’ve got the VSE configured properly.

Interesting observation indeed. May I ask how you determine if the bitrate is constant or variable in the case of Linux?

@eye208, never mind, I got it.
I also confirm that on 64bit linux setting the output to lossless apparently uses abr.
I think that ticking lossless should remove the rest of the sliders on the panel as they’re pretty useless -unless they can somehow override the lossless choice

Blender’s lossless h264 is still 4:2:0, well last time I checked it was. RGB PNG to 4:2:0 YCbCr is not lossless. Compression maybe but not chroma subsampling. Lossless 10bit 4:4:4 h264 profile is available via x264 for an intermediate but only if you frameserve from Blender. AFAIK.

I just generated a valid Quicktime Animation video using xVid as the container, Quicktime as the format and QT rle/ QT Animation as the codec. It is kind of a non-intuitive setup but there is your lossless if you want it.

The resulting Blender video file was completely readable by Quicktime Pro and After Effects.

NOTE: I do have Quicktime Pro installed and I have the xVid codec installed on my Windows 7 machine.

@yellow: does 4:2:0 also apply to Huffy?

Huffy, from memory can be 4:2:2 or RGB.

Right, just checked this thread… Umm, got a few conflicting answers…
I’m pretty new to the Blender scene (about 6 months exp.), and what I’m trying to do is use the VSE to sequence and render out a whole bunch of image clips for my demo reel. I don’t understand a lot of the video editing jargon you guys use, either…
If someone could just tell me how to get lossless audio and video, that’ll play in VLC Player, I’ll be very much obliged.

Don’t forget that lossless = high bit rate. So real time playback is unlikely.

“Lossless” is not really the aim for final delivery, a decent high ‘quality’ output with well honed encoder settings to suit your source ie: whether it’s got grain you want to keep, whether it has solid color areas of color like anime you don’t want smeared.

Suggest starting with x264, settings here:http://http://mewiki.project357.com/wiki/X264_Settings and use your image sequences or a lossless intermediate if you don’t want to work with lots of image sequences, via an NLE if it lets you access x264, rather than blender. It doesn’t expose many x264 options for you, well not the last time I looked or frameserve from blender to x264.

Encode a short sequence of images or a short lossless intermediate via x264, look at the output, decide if it’s good enough, if not tweak the encoder settings, rinse and repeat.

I’m sure others will suggest frontends to x264 with presets to work from as a simpler approach.

Welcome to the world of codecs and compression.

Well, to be honest, I had to make a decision within 15 minutes of my last post, so I went with MP4 container, H.264 codec with lossless enabled, and MP3 for audio. It only lags and has to buffer at one point in the video where I had the camera moving too fast. I will look into x264 though…