What player can be used to play transparent video in xcode for playing it in ipad?

后端 未结 3 1381
梦毁少年i
梦毁少年i 2020-12-07 05:47

I have a video, which is transparent in some portion. When I try to play this video using AVPlayer or MPMoviePlayer, It is not getting played.

Can anyone suggest wh

相关标签:
3条回答
  • 2020-12-07 06:20

    You have run into a limitation with the video support provided by Apple under iOS. Specifically, there is no builtin support for video that contains an alpha channel. It is possible to work around this limitation, as shown in this blog post h-264-video-with-an-alpha-channel. If you are not concerned about download size of your app, then you could encode video frames as a series of PNG images. But, be aware that app download size can grow quickly with a series of PNG images. Using h.264 encoded video is a lot more complex but it means that your app download size will be a lot smaller.

    0 讨论(0)
  • 2020-12-07 06:33

    Use AVAnimator - http://www.modejong.com/AVAnimator/

    It requires you to transcode it to APNG or their proprietary format, but it works well.

    0 讨论(0)
  • 2020-12-07 06:35

    Suresh

    You can try AVPlayerLayer. If you are new to Core Animation you can read a programming guide.

    Good luck with your project!

    0 讨论(0)
提交回复
热议问题