AWS Thinkbox Discussion Forums

DNxHD to PNG

Hey,

I’m having quite a bit of trouble getting the colour space correct when converting from DNxHD to PNG. Here the code;

[code]import sys
import os

import Draft
from DraftParamParser import *

The argument name/types we’re expecting from the command line arguments

expectedTypes = dict()
expectedTypes[‘inFile’] = ‘’ # expects a path like “path/movie.mov”
expectedTypes[‘outFile’] = ‘’ # expects a path like “path/image.####.jpeg”
expectedTypes[‘sourceIn’] = ‘’ # expects a frame number
expectedTypes[‘sourceOut’] = ‘’ # expects a frame number
expectedTypes[‘colourSpace’] = ‘’ # expects a frame number

Parse the command line arguments

params = ParseCommandLine(expectedTypes, sys.argv)

in_file = params[‘inFile’]
out_file = params[‘outFile’]
source_in = int(params[‘sourceIn’])
source_out = int(params[‘sourceOut’])
colour_space = params[‘colourSpace’]

colour = None
if colour_space == ‘rec709’:
colour = Draft.LUT.CreateRec709()

Main encoding loop

decoder = Draft.VideoDecoder(in_file)
frame = Draft.Image.CreateImage(1, 1)

for count in range(source_in, source_out + 1):
decoder.DecodeFrame(count, frame)
f = ReplaceFilenameHashesWithNumber(out_file, count)

frame.WriteToFile(f)

[/code]

Should it not just be a straight forward transcode?

Forgot to say that the DNxHD were originally converted from mxf files. But the mxf and DNxHD files match in AE.

It seems like the footage needs some specific export parameters.

I’ve exported from Hiero, where I needed to set the Pixel Format to “RGBA 8-bit”, where a default is “YCbCr 8-bit 422 (2vuy)”.

I don’t really know what all this means, but its closer. Although not as close as when just exporting in AE directly.

Thank you for your report!

Would it be possible for you to please send us a DNxHD file that reproduces this problem? You can send us files using our ticket system. Please note that you may need to ZIP the file to get it through.

Privacy | Site terms | Cookie preferences