VideoProcessWithMetal icon indicating copy to clipboard operation
VideoProcessWithMetal copied to clipboard

A problem in attributes for AVPlayerItemVideoOutput in LocalFileViewController

Open madadoux opened this issue 5 years ago • 0 comments

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 alt text

any help @tomisacat

madadoux avatar Dec 06 '20 20:12 madadoux