acj / timelapsebuilder-swift Goto Github PK
View Code? Open in Web Editor NEWBuild a movie from jpeg images in Swift using AVFoundation
License: MIT License
Build a movie from jpeg images in Swift using AVFoundation
License: MIT License
Is there a simple way to include Audio from Mic or other source.. into the video file ?
This library works really well for JPG images but when trying to generate video with PNG images have some transparent pixels. The area with transparent pixels have artifacts in the final export.
I tried using HEVC encoding with Alpha support but did not work.
Has anyone tried this with PNG images with transparency?
Hi,
thanks for the nice piece of code. Just want to implement a parameter to set the duration between picture frame switch.
So I want to see a picture for 3 seconds but the framerate of the video file should be still 30 fps.
Is there a little tweak to make this possible?
Many thanks!
Since my videos can have very low frame rates (down to 1fps), I noticed that the first frame of the finished video was lasting for 2 seconds when I changed the fps to 1. This is because the 2nd frame gets added at 2 seconds, not at 1 second. Only the lastFrameTime
is needed:
let lastFrameTime = CMTimeMake(value: frameCount, timescale: fps)
if !self.appendPixelBufferForImageAtURL(nextPhotoURL, pixelBufferAdaptor: pixelBufferAdaptor, presentationTime: lastFrameTime) {
This correctly produces a video where the 1st and every frame truly lasts 1 second.
The frameDuration
variable is also not needed with this change.
Thanks for this code, BTW. I was going to try to tackle it, but good grief! Why they didn't allow image types to be used with AVURLAsset is beyond common sense.
Good day,
I'm currently trying to use TimeLapseBuilder in my project, but it seems like it's not running.
I have the following function that runs when the user taps a button:
private func exportSpinsToVideo() {
let timelapseBuilder = TimeLapseBuilder(photoURLs: spinURLs)
timelapseBuilder.build({ progress in
print(progress)
}, success: { url in
print(url)
}, failure: { error in
print(error)
})
}
When I tap the button I'm not getting any feedback from progress, success or failure.
The spinURLs String Array contains locations of images saved in the DocumentsDirectory.
Any idea as to what could be going wrong?
I like the small size of this code especially since I don't have a lot of experience using the AVAssetWriter. I was just wondering if you would know where I would start modifying the class so that it would loop over the array of images until it reached a certain time/maxFrames ?
I'm looking to modify this to convert an array of photos displayed in the same way as a gif into a 15 second video for instagram sharing.
Any help would be appreciated thanks !
Hey
I am creating the video from the number of image's URL. I am able to do that but I am facing a problem that when I have created the video that video content start from the top left and remaining screen shows black .
Thanks
Vijendra
when i play video video running too fast
please help me to solve this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.