swift-video-generator icon indicating copy to clipboard operation
swift-video-generator copied to clipboard

How to set audio url to nil

Open abeticlairon opened this issue 5 years ago • 2 comments

Thank you for this library! I want to create a video from a UIImage array but with no audio. I am unable to set andAudios to nil; how can I create a video without audio?

abeticlairon avatar Jul 10 '20 12:07 abeticlairon

Please, read through the README.md - it’s there for a reason and there are examples and/or explanations for all features.

If you leave the audio array empty and implement videoDurationInSeconds, the generated video contains only the images without audio.

tgeorgieva avatar Jul 10 '20 12:07 tgeorgieva

If you want to create a video without audio, you need to specify video duration, and send empty array to the andAudios parameter.

VideoGenerator.videoDurationInSeconds = 10
VideoGenerator.current.generate(withImages: [image1, image2,...], andAudios: [], andType: .multiple)

hamzaozturk avatar Oct 22 '20 06:10 hamzaozturk