Post subject: x264: rgb 8bit vs yuv444 10 bit
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
Compare x264 encoding with 8 bit per channel RGB to 10 bit per channel YUV 4:4:4. For lossless (--qp 0), RGB generally makes smaller files from sources that were originally RGB. For lossy, RGB doesn't stand up to YUV. A short example test: encoding commands (here x264_10 is a 10 bit executable)
x264  --bitrate 500 --pass 1 --preset placebo --rc-lookahead 120 --keyint 400 --me umh --subme 10 --merange 32 --output-csp rgb -o foo.mp4 testin.avi
x264  --bitrate 500 --pass 2 --preset placebo --rc-lookahead 120 --keyint 400 --me umh --subme 10 --merange 32 --output-csp rgb -o newtest_rgb.mp4 testin.avi


x264_10  --bitrate 500 --pass 1 --preset placebo --rc-lookahead 120 --keyint 400 --me umh --subme 10 --merange 32 --output-csp i444 --range pc -o foo2.mp4 testin.avi
x264_10  --bitrate 500 --pass 2 --preset placebo --rc-lookahead 120 --keyint 400 --me umh --subme 10 --merange 32 --output-csp i444 --range pc -o newtest_10bit444.mp4 testin.avi
The original source is two minutes of GBA footage. The output files are here: http://www.mediafire.com/?vbjvitb1j4io22r You can see by watching the two directly, that RGB doesn't even come close to YUV in image quality at the same bitrate. Note: If the colors&ranges in the two videos look different, it's your player's fault. Both encodes are properly set as full range. If anyone has any comments or criticisms on this test, I would love to hear it.
Lex
Joined: 6/25/2007
Posts: 732
Location: Vancouver, British Columbia, Canada
You're definitely right. YUV 4:4:4 10-bit is far better for lossy compression. I agree with your conclusion here. I would still like to see a comparison using -qp 18 (or some other qp value), as I said in the channel, just for an numerical way to compare.
Editor, Experienced player (852)
Joined: 8/12/2008
Posts: 845
Location: Québec, Canada
I must admit, I saw no difference between both files.
Player (65)
Joined: 4/21/2011
Posts: 232
--me umh --subme 10
Why these instead of placebos defaults of tesa, 11?
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
nanogyth wrote:
--me umh --subme 10
Why these instead of placebos defaults of tesa, 11?
The parameters I used are for the most part my normal encoding parameters. The reason why my normal encoding parameters use --me umh --subme 10 comes from a few different input sources, including Grunt's command line reccomendation, some people on the tasvideos irc, and doom9/doom10. I verified their claims myself for two runs (so six encodes): comparing commands that are identical otherwise (--preset placebo, etc) and differ only in --me umh --subme 10 vs --me tesa --subme 11, the results are visually indistinguishable (to me), same filesize (<1% difference), but the straight placebo encode takes 2x-3x as long to run. That's a pretty bad tradeoff, and supports the claim that --me umh is pretty damn good and results in very few errant motion vectors.
Player (65)
Joined: 4/21/2011
Posts: 232
natt wrote:
That's a pretty bad tradeoff
Yep, it is called placebo for a reason. --preset veryslow --slow-firstpass --no-fast-pskip --bframes 16 would be the same as --preset placebo --me umh --subme 10 but might convey the intent better. Weakening the --preset seems odd to me.
Player (65)
Joined: 4/21/2011
Posts: 232
Has anyone gotten youtube to take x264 rgb lossless? .avs
AviSource("C:\Users\vehi\Desktop\comp.avs")
SelectEven
PointResize(8 * width, 8 * height)
command line
x264_8 y.avs -o y.mp4 --qp 0 --keyint infinite --output-csp rgb
file http://www.mediafire.com/?oad9m8dfjzz962i YT http://www.youtube.com/watch?v=JN1rnhZe270 File seems to play ok, but youtube greys out.
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
nanogyth wrote:
Has anyone gotten youtube to take x264 rgb lossless? .avs
AviSource("C:\Users\vehi\Desktop\comp.avs")
SelectEven
PointResize(8 * width, 8 * height)
command line
x264_8 y.avs -o y.mp4 --qp 0 --keyint infinite --output-csp rgb
file http://www.mediafire.com/?oad9m8dfjzz962i YT http://www.youtube.com/watch?v=JN1rnhZe270 File seems to play ok, but youtube greys out.
I haven't gotten that to work, no. I don't think I'd use it even if it did; I know youtube is going to convert RGB->YUV during the transcode process, so might as well take control over that part. If you want to send youtube RGB for testing something, camstudio works.