Thursday, December 22, 2016

Fixing AVPlayer Playback Transparency

Ashley Nelson-Hornstein:

To test this theory, I downloaded one of the videos made in the client’s app, dropped it into Apple’s example project, and made a couple of quick changes so that Apple’s project would use the video I added instead of one selected from Camera Roll. I ran the project and voilà, the same initial flash of transparency reproduced in the example project.

[…]

This “empty edit” sounded exactly like what was being inserted into the beginning of the client’s app-created videos. I looked at how the client’s app was appending buffers to AVAssetWriterInput and noticed that the code never ensured the first buffer appended to the file had the same time as the startTime of the video.

Comments RSS · Twitter

Leave a Comment