How do I add a still image to an AVComposition?

后端 未结 2 690
小蘑菇
小蘑菇 2021-01-31 22:16

I have an AVMutableComposition with a video track and I would like to add a still image into the video track, to be displayed for some given time. The still image i

2条回答
  •  醉梦人生
    2021-01-31 22:50

    I also need still images in my composition. My line of thinking is a little different. Insert on-the-fly movies of black in place of when images should be appearing (possibly one such video would suffice). Add a dictionary reference to each such insert, linking composition time-ranges to bona-fide desired images. When the correct time range arrives in my full-time custom compositor, pull out the desired image and paint that into the output pixel buffer, ignoring the incoming black frames from the composition. I think that'd be another way of doing it.

提交回复
热议问题