diff --git a/Sources/Upscaling/UpscalingExportSession.swift b/Sources/Upscaling/UpscalingExportSession.swift index 9937994..1e5215c 100644 --- a/Sources/Upscaling/UpscalingExportSession.swift +++ b/Sources/Upscaling/UpscalingExportSession.swift @@ -86,7 +86,12 @@ public class UpscalingExportSession { let videoInput = AVAssetWriterInput(mediaType: .video, outputSettings: [ AVVideoWidthKey: outputSize.width, AVVideoHeightKey: outputSize.height, - AVVideoCodecKey: videoCodec + AVVideoCodecKey: videoCodec, + AVVideoColorPropertiesKey: [ + AVVideoColorPrimariesKey: formatDescription?.colorPrimaries, + AVVideoTransferFunctionKey: formatDescription?.colorTransferFunction, + AVVideoYCbCrMatrixKey: formatDescription?.colorYCbCrMatrix + ] ]) videoInput.expectsMediaDataInRealTime = false if assetWriter.canAdd(videoInput) {