I am using AVPlayer with AVPlayerViewController. I am playing video after adding watermark in the video. Sometimes it is working fine, but sometimes it shows only a black screen, and audio is fine in both cases.
vPlayer = [AVPlayer playerWithURL:_videoFilePath];
// create a player view controller
AVPlayerViewController *controller = [[AVPlayerViewController alloc]init];
controller.videoGravity=AVLayerVideoGravityResizeAspect;
controller.player = vPlayer;
[vPlayer seekToTime:kCMTimeZero];
// show the view controller
[self addChildViewController:controller];
[vPlayer play];
controller.view.frame =_imgForVidFrame.frame;
[self.view addSubview:controller.view];