Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th January 2014, 03:28   #1  |  Link
sidspyker
Registered User
 
Join Date: Jun 2013
Posts: 61
Colour difference?

Hi there, recently I was playing with some game footage to practice some encoding and I'm having an issue, the colour of the original and the colour of the encoded file are different.

Original:


Encoded:


The source video 720p, lossless RGB, and I use MPC-HC with madVR as video player so I don't think it can be a renderer issue.

My settings are:
CRF18, Very slow
Code:
--level 4.1 --keyint 30 --open-gop --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --output-csp i444
What could be the issue? I tried to make sure the colourmatrix wasn't the issue, and the output was without chroma subsampling but still there still seems to be an issue and I'm out of my depth.
Thanks.

Last edited by sidspyker; 15th January 2014 at 03:36.
sidspyker is offline   Reply With Quote
Old 15th January 2014, 03:50   #2  |  Link
vivan
/人 ◕ ‿‿ ◕ 人\
 
Join Date: May 2011
Location: Russia
Posts: 648
x264 uses rec601 for rgb -> yuv conversion. Use avisynth for it.
Or you can change bt709 to bt470bg but that will work only with madVR, since other renderers are broken and ignore those flags.
vivan is offline   Reply With Quote
Old 15th January 2014, 04:13   #3  |  Link
sidspyker
Registered User
 
Join Date: Jun 2013
Posts: 61
Quote:
Originally Posted by vivan View Post
x264 uses rec601 for rgb -> yuv conversion. Use avisynth for it.
Or you can change bt709 to bt470bg but that will work only with madVR, since other renderers are broken and ignore those flags.
I just tried bt470bg and it worked! Thanks for that one.

But like you mentioned, it will only work with madVR so it isn't an ideal option. I've never used Avisynth, what exactly are you suggesting I use it for?

EDIT: I just checked with MediaInfo and the encoded file shows:

Is this normal? I set bt470bg for all of them when encoding

Last edited by sidspyker; 15th January 2014 at 04:24.
sidspyker is offline   Reply With Quote
Old 15th January 2014, 04:34   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,110
He' s suggesting to use avisynth for the RGB=>YUV conversion using a Rec709 matrix instead of the Rec601 that x264 uses. So you don't have to rely on madvr or flags (but you should still flag it bt709)

ConvertToYV24(matrix="rec709")
poisondeathray is offline   Reply With Quote
Old 15th January 2014, 04:54   #5  |  Link
sidspyker
Registered User
 
Join Date: Jun 2013
Posts: 61
Quote:
Originally Posted by poisondeathray View Post
He' s suggesting to use avisynth for the RGB=>YUV conversion using a Rec709 matrix instead of the Rec601 that x264 uses. So you don't have to rely on madvr or flags (but you should still flag it bt709)

ConvertToYV24(matrix="rec709")
Not PC.709?

I'll try it out, thanks.
sidspyker is offline   Reply With Quote
Old 15th January 2014, 05:27   #6  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,110
Quote:
Originally Posted by sidspyker View Post
Not PC.709?

PC matrix would actually be better quality wise (you're "mapping" 0-255 RGB to 0-255 Y'CbCr, instead of 0-255 to 16-235 Y' , 16-240 CbCr), but the majority of setups will convert back to RGB for display using Rec709 matrix and the levels will look incorrect. But the setups that obey full range flags will decode it correctly if you used a PC matrix for the actual RGB=>YUV conversion

The other option is to encode as RGB, but it's not as efficient as YUV 444 encoding for x264
poisondeathray is offline   Reply With Quote
Old 15th January 2014, 11:52   #7  |  Link
sidspyker
Registered User
 
Join Date: Jun 2013
Posts: 61
So after reading a lot of things about Avisynth today I finally tried what you suggested, ConvertTo function and it seems to have worked, thank you, everyone.
sidspyker is offline   Reply With Quote
Reply

Tags
color, colour, luminescence, x264

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:12.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.