简体   繁体   中英

How to access avplayer video buffer frames while video is playing

If I have a video file that is playing, what is the most efficient way to add a video filter? I know I can use generateCGImagesAsynchronouslyForTimes, but I'd like to do it in real time.

RosyWriter in Apple's Docs show how you can do it for live video before the buffer frame is displayed to the user. I'd like to do the same thing for a video that is already recorded, while it is playing

I use "SCPlayer" - subclass of AVPlayer from https://github.com/rFlex/SCRecorder It provides great way to perform groups of CIFilters, so you can even change it when video is playing :) Here you also can find custom ExportSession to save video with filter. To use this you need to init your video as AVAsset.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM