VideoProcessWithMetal
VideoProcessWithMetal copied to clipboard
A problem in attributes for AVPlayerItemVideoOutput in LocalFileViewController
in this declaration when I make this code as it is
lazy var playerItemVideoOutput: AVPlayerItemVideoOutput = {
let attributes = [kCVPixelBufferPixelFormatTypeKey as String: Int(kCVPixelFormatType_32BGRA)]
return AVPlayerItemVideoOutput(pixelBufferAttributes: attributes)
}()
nothing is showin on the screen I think It doesn't know how to make a texture from the CVPixelbuffer
but when I pass nil to the constructor
lazy var playerItemVideoOutput: AVPlayerItemVideoOutput = {
let attributes = [kCVPixelBufferPixelFormatTypeKey as String: Int(kCVPixelFormatType_32BGRA)]
return AVPlayerItemVideoOutput(pixelBufferAttributes: nil)
}()
it show like this
https://i.imgur.com/iWqu592.png

any help @tomisacat