My code works for other video types (like h264 with .mp4), but it was the customer's camera that recorded this video with h265/hevc
in .mp4
format.
My code for playing the video:
let playerController: AVPlayerViewController = AVPlayerViewController()
playerController.player = AVPlayer(url: url)
DispatchQueue.main.async {
self.present(playerController, animated: true, completion: {
playerController.player?.play()
})
}
Screenshot with in-app with the screen open and view all black
Does anyone know how can I execute this video with these specifications?
Or could to explain to me why can't I execute this video?
Tests:
- iOS 16.1 (didn't work)
- iOS 15.0 (didn't work)
- iOS 14.0 (didn't work)
- iOS 13.0 (didn't work)
Note 1: -> Others formats did work, only the h265 with .mp4 that don't work
Note 2: -> Downloading the client video from my server, the video was played normally
Note 3: -> I can execute this video with VLC, but I want to execute it with AVFoundation which is the pattern of the project.