Avidemux Forum

Participate => Avidemux Wiki => Topic started by: bobibrown on November 06, 2017, 09:23:42 PM

Title: x264 RGB24 instead of YV12?
Post by: bobibrown 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.
Title: Re: x264 RGB24 instead of YV12?
Post by: bobibrown 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 :
(http://gamecritz.com/lagarethRGB24-lossless.png)

Lagareth YV12 to lossless x.264 :
(http://gamecritz.com/x264-lossless.png)

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:

(http://gamecritz.com/zoom.png)

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?
Title: Re: x264 RGB24 instead of YV12?
Post by: mean 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