File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Feature/Feature/SharedVideoEditView Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,10 @@ enum VideoMerger {
9999 videoComposition. frameDuration = CMTime ( value: 1 , timescale: frameRate)
100100 videoComposition. renderSize = resultSize
101101 videoComposition. instructions = layerInstructions
102+ //hdr무시
103+ videoComposition. colorPrimaries = AVVideoColorPrimaries_ITU_R_709_2
104+ videoComposition. colorTransferFunction = AVVideoTransferFunction_ITU_R_709_2
105+ videoComposition. colorYCbCrMatrix = AVVideoYCbCrMatrix_ITU_R_709_2
102106
103107 return ( composition, videoComposition)
104108 }
Original file line number Diff line number Diff line change @@ -63,6 +63,12 @@ extension VideoPlayerView {
6363 }
6464
6565 func replaceVideo( playerItem: AVPlayerItem ) {
66+ //hdr무시
67+ let videoComposition = AVMutableVideoComposition ( propertiesOf: playerItem. asset)
68+ videoComposition. colorPrimaries = AVVideoColorPrimaries_ITU_R_709_2
69+ videoComposition. colorTransferFunction = AVVideoTransferFunction_ITU_R_709_2
70+ videoComposition. colorYCbCrMatrix = AVVideoYCbCrMatrix_ITU_R_709_2
71+ playerItem. videoComposition = videoComposition
6672 player. pause ( )
6773 player. replaceCurrentItem ( with: playerItem)
6874 }
You can’t perform that action at this time.
0 commit comments