1

I am using handbrake to compress 250mb of 3d animation stored in .mov. This is how the mov looks:

enter image description here

The compressed version has some artifacts. Like it doesn't have enough shades of grey:

enter image description here

How can I avoid that? Should I render in a .mov file in the first place?

  • You need to remember that compressing is "Lossy" and you are removing information to make it smaller. – Adam Mann Pro Aug 8 '17 at 7:20
  • Is there some compression method for video that would be suitable for what I am trying to achieve? – sanjihan Aug 8 '17 at 7:25
  • well the best quality is going to be what you export from. have you tried exporting using a different codec from the app you are using ? Otherwise you can play with the settings (bit rate mainly I believe) in handbrake to achieve a better result – Adam Mann Pro Aug 8 '17 at 7:26
1

You are indeed right about shades of grey. You're encoding in 8-bit 4:2:0 (standard h.264 settings) which means that there are only 256 possible shades of grey. Think about it. If your RGB* values go from [0, 0, 0] to [255, 255, 255] and the red green and blue channels are equal, because grey, then your pixels will be one of these values: [0,0,0], [1,1,1], [2,2,2]… [255,255,255]. Meaning 256 possible colours.

If your gradient went from full black to full white and was 256 pixels across there would be one pixel per colour, so you'd be fine. But if it was say, 1024px wide, then there would have to be four pixels of each colour next to each other, meaning bands. And that's a gradient going from full black to full white—a subtle gradient from 45% grey to 55% grey might only have 25 possible values available–it's going to be banding city.

And just to explain what is going on in your image–especially in the middle–there's an unfortunate optical illusion that makes those bands super obvious, by making the squares where the same colour is repeated look like gradients going the opposite way.

Two possible workarounds:

  • You can encode using 10 bit h.264, but a lot fewer people will be able to play it back, and you'll need to get a 10 bit build of ffmpeg or x.264 (I don't know of any other 10-bit h.264 software)

  • You can add some noise. Sounds crazy, but it will break up the bands into fuzz so they'll be less noticeable. Justify it to yourself by believing it gives it a more filmy look. It's called dithering, it was a big thing back in the days of 8-bit colour.

*Actually it's YUV, but that's not important right now.

  • Thanks for a detailed answer. I plan to use this clips on youtube, which uses h.264 encoding. I haven't been able to identify how many bits they use for color encoding support.google.com/youtube/answer/1722171?hl=en. I am using cinema 4d to redner this clips. There is a checkbox: enable 8-bit dithering, and it is already turned on. – sanjihan Aug 11 '17 at 8:08
  • Youtube will be 8-bit. Browsers don't yet support 10-bit h.264. I'm not sure about the cinema4d thing, but you might want to try extra noise in post. – stib Sep 23 '17 at 5:02

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.