View Single Post
Old 12th June 2019, 12:21   #3  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
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)
Please note that PointResize is a pretty basic resizing kernel, so I would suggest you either Lanczos or Spline.
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)
By the way, in your case, your content is a videogame, so it doesn't really matter, but in case one day you'll have to encode a real live footage, you may wanna do a color matrix conversion with 16bit precision. In case you wanna do it in 16bit interleaved:
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)
FranceBB is offline   Reply With Quote