Comments (3)
I saw you've implemented minSingleVideoDuration
variable.
Is this the value which I need to enhance?
/// private property to store the minimum duration for a single video
fileprivate var minSingleVideoDuration: Double = 3.0`
Many Thanks!
from swift-video-generator.
As it says, the minSingleVideoDuration
is a property which indicates the minimum duration for a single video, not for a frame. It means that every generated video is at least 3 seconds long.
To implement what you're saying will take some tinkering but you can look at open func generate()
In the cycle while (videoWriterInput.isReadyForMoreMediaData && frameCount < numImages)
I go through all the images and set them up as frames along with their duration based on the provided audio files. That's where you can change those settings and apply your own custom timing.
I will look into this, although I don't think I will have time before New Years, but you can start with the function I mentioned and go from there if you need it in a hurry.
Thank you for your interest, I'm very happy to know you're finding this library useful. I will keep the issue open to add as a future customisation option.
from swift-video-generator.
@MobileAppVault You can now do this with the new singleAudioMultipleImage type.
So for the first example:
You need 100 images and an audio that's number of images * custom image duration seconds long.
So in this case 1 image every 2 seconds means 200 seconds audio.
from swift-video-generator.
Related Issues (20)
- Problem while generating video for 5 =< images.
- videoDurationInSeconds has no affect HOT 3
- App crashes when converting images with different height or width
- How to set audio url to nil HOT 2
- Suggestion: Output File Type as Input
- Can this library generate a series of images from a video?
- [improvement] thumbnail generation HOT 1
- Bug when merging two videos of different aspect ratios. HOT 1
- StartWriting() to generate video fail (IPhone 12)
- SPM Needs OS Version definitions
- Crash on generating video from photos & audio. HOT 2
- Is customization of FPS possible?
- Video size issue
- UIImage.imageOrientation not honored HOT 1
- Video Reverse but No Audio Found
- If I am creating video from multiple images, video generate missing on image from list
- Compile Error: 'h264' is only available in iOS 11.0 or newer
- 4K 60 video crashes during reverse HOT 1
- Merge Image Video not Getting played in VLC or any other Android devices
- Merge Multiple Videos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-video-generator.