0

I am using PBJVideoPlayer to show videos on my iOS app, using the following code:

_videoPlayerController = [[PBJVideoPlayerController alloc] init];
_videoPlayerController.delegate = self;
_videoPlayerController.view.frame = _playerView.bounds;
[self addChildViewController:_videoPlayerController];
[_playerView addSubview:_videoPlayerController.view];
[_videoPlayerController didMoveToParentViewController:self];

_videoPlayerController.videoPath = [self finalVideoPath];

On about 50% of the time, the video is shown as black while the sound is fine.

The bounds are good (since I do see a black box) and the video path is good since I do have the correct video created.

I am using a device with iOS 10, and I still do not have a device with an older iOS to check..

Any ideas what might be the problem? I have seen other questions regarding black videos but non of them help.

Ran
  • 1,089
  • 1
  • 12
  • 30

1 Answers1

0

So, after several hours of investigating this, it seems to be an iOS10 bug.

See this: AVPlayer playback fails while AVAssetExportSession is active as of iOS 10

What worked for me, is removing the watermark layer I had on the video and then removing the animationTool property from the video composition

Community
  • 1
  • 1
Ran
  • 1,089
  • 1
  • 12
  • 30