Author Topic: x264 RGB24 instead of YV12?  (Read 244 times)

bobibrown

  • Newbie
  • *
  • Posts: 2
x264 RGB24 instead of YV12?
« on: November 06, 2017, 09:23:42 PM »
Hi everyone,

So, I'm recording lossless videos (old pixelated video games gameplay) using Lagarith in RGB mode. I'd like to convert them to mp4 and compress them now, but I need the original colors. Also it seems that recording using YV12 make the colors bleed, whereas RGB24 gives perfect results.

How could I convert my videos to x264 in RGB mode? I've read that x264 now support RGB.
Also, I've already set encoding mode to "constant quantiser" and "quantisation" to 0 for lossless conversion.
« Last Edit: November 07, 2017, 12:20:14 AM by bobibrown »

bobibrown

  • Newbie
  • *
  • Posts: 2
Re: x264 RGB24 instead of YV12?
« Reply #1 on: November 08, 2017, 08:22:44 AM »
Actually, what I would love to know is, how could I prevent aliasing/dithering to happen? If at least I could prevent this, color loss wouldn't be much of a problem.

Working on such small video resolution makes this a huge problem.

to illustrate my problem, some frames from my tests:

Lagareth RGB24 :


Lagareth YV12 to lossless x.264 :


It might not show correctly on a web browser, so here is a zoomed in side by side comparison, so you don't have to download the pictures above to see the details:



It is actually lossless, when I reencode from lossless YV12 to lossless x.264 but the picture has already been altered. Converting from RGB24 to YV12 gives very bad results.
Also, it seems like the problem occurs when there are black and dark colored pixels next to each others. As you can see, there is no such problem around "PRESS START". I'm sorry if I can't explain better I'm really not an expert.

EDIT: After a lot of researches, I believe x264 uses dithering to prevent banding? If so I really don't care about banding here. Is it possible to disable debanding?
« Last Edit: November 09, 2017, 03:45:36 PM by bobibrown »

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10950
Re: x264 RGB24 instead of YV12?
« Reply #2 on: November 23, 2017, 09:27:39 AM »
YV12 has 2x2 times less 'color' resolution than RGB24, so adjacent pixels have similar colors, closer than the original