So I know how to add an animated overlay to a video using layers, AVMutableVideoComposition(), and instructions. How can I add an animated overlay to a still UIImage and export it as a video (similar to how a Snapchat or Instagram story animated overlay works)? Should I be converting the image to a video first and then adding overlays, or is there an easier way?
Asked
Active
Viewed 438 times
0
-
I did something like this but what I did was , I added image over video, you can try that – Shivam Gaur Jul 25 '19 at 07:15
-
I need to do the opposite. Animation over image. I know how to do image over video – connorvo Jul 25 '19 at 15:24
-
go through https://stackoverflow.com/questions/40883784/build-video-from-uiimage-using-swift , what I can think of now is convert image into video and merge both – Shivam Gaur Jul 26 '19 at 06:13
-
@ShivamGaur That is what I ended up doing. I am now having the problem where adding the overlay is killing the video quality. https://stackoverflow.com/questions/57211035/avassetexportsession-is-greatly-reducing-video-quality?noredirect=1#comment100929551_57211035 – connorvo Jul 26 '19 at 15:25