Coder Social home page Coder Social logo

Comments (3)

MobileAppVault avatar MobileAppVault commented on September 15, 2024

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.

tgeorgieva avatar tgeorgieva commented on September 15, 2024

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.

tgeorgieva avatar tgeorgieva commented on September 15, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.