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. |
12th June 2019, 04:39 | #1 | Link | ||||
None
Join Date: Jul 2007
Location: The Background
Posts: 307
|
RGB to YV12 video encoding - colors are off...
I recorded a game with MAME's native recorder. The output video (sf2.avi) is in the following format:
Quote:
Quote:
Quote:
Quote:
Example: Screenshot taken directly from game. Looks good: http://u.cubeupload.com/ClearSky/2ma...6102241334.png Screenshot taken from AviSynth script above. Looks a bit lower quality, but colors are the same. http://u.cubeupload.com/ClearSky/3FromVideo.png Screenshot taken from final x264 encode. Red color is slightly off: http://u.cubeupload.com/ClearSky/3fu.png Is this color conversion normal, the way it should be, or is there a way to fix this? Thanks. Last edited by orion44; 12th June 2019 at 04:43. Reason: clarification... |
||||
12th June 2019, 12:21 | #3 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
|
Try with:
Code:
#Indexing OpenDMLSource("D:\Project\sf2.avi") #From BGR24 to 4:2:0 planar Converttoyv12(interlaced=false) #Resize Spline36Resize(960, 720) Since you recorded in RGB, when you are gonna convert it to yv12 you are gonna lose something, while by converting it to yv24 you are gonna preserve chroma. Are you sure you wanna encode in H.264 4:2:0 planar? As to the color matrix, I don't know whether it has been recorded in BT601 or BT709, but in case it was recorded in BT601 and you wanna convert it to BT709, just use: Code:
#Indexing OpenDMLSource("D:\Project\sf2.avi") #From BGR24 to 4:2:0 planar Converttoyv12(interlaced=false) #From BT601 to BT709 ColorMatrix(mode="Rec.601->Rec.709", clamp=true, interlaced=false, threads=0, thrdmthd=0, opt=3) #Resize Spline36Resize(960, 720) Code:
Matrix(from=601, to=709, rg=1.0, gg=1.0, bg=1.0, a=16, b=235, ao=16, bo=235, bitdepth=16) |
12th June 2019, 15:36 | #4 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
Quote:
Code:
converttoyv12(interlaced = false, matrix = "rec709") |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|