Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for video Export usage #1001

Closed
tawhidkuet04 opened this issue Aug 4, 2019 · 12 comments
Closed

Add support for video Export usage #1001

tawhidkuet04 opened this issue Aug 4, 2019 · 12 comments

Comments

@tawhidkuet04
Copy link

I can export animation with video but the problem is animation speed is variable in different device while exporting .the animation is actually not rendered correctly depending on
device etc.The animation timespace is not linked to the video timespace . Any suggestion for this issue ?

@damikdk
Copy link

damikdk commented Aug 8, 2019

I got the same issue. The faster device the slower animation.

In my case animation looks perfect on iPhone 6 with animationView.respectAnimationFrameRate = true. Any other device (XR, iPad Pro, iPhone 7/8) records it much slower.

According this question (4 years ago, btw), I decide to hardcode constants for each device for now :(

@tawhidkuet04
Copy link
Author

tawhidkuet04 commented Aug 8, 2019

@damikdk Thanks for the reply . How to set the hardcore constants for each device , I mean what constants i need to add to match the video timing ?
Btw i am using version 2.5.3

@tawhidkuet04
Copy link
Author

tawhidkuet04 commented Aug 18, 2019

I am using version 2.5.3 and project is in objective C . Can't find this functions . which version are you using ?

@damikdk
Copy link

damikdk commented Sep 2, 2019

@tawhidkuet04 I use last one and Swift, sorry. It doesn't matter, because even my awful code above can't save us. Because current export depends on both device AND animation.

It will be super useful if somebody point us to some CoreAnimation primitive that we can use for export with AVVideoCompositionCoreAnimationTool and AVAssetExportSession. Doesn't matter public or private, we can fork and get it.

This setup can export animation, but I got the same problems @spykr describe in #30

let animationView = AnimationView()
animationView.animation = Animation()
let animationLayer = animationView.layer

animationLayer.repeatCount = .greatestFiniteMagnitude
animationLayer.beginTime = AVCoreAnimationBeginTimeAtZero

animationLayer.frame = CGRect(x:0, y:0, width: 50, height: 50)
parentLayer.addSublayer(animationLayer)

animationView.play()

But animation renders in result video, albeit wrong. So there is some logic above native primitives. I just started digging, but help is super welcome.

UPD:
Demo repo

@buba447
Copy link
Collaborator

buba447 commented Nov 25, 2019

Adding to feature requests

@MikhailZimin
Copy link

MikhailZimin commented Dec 28, 2020

Hello there.
I ran into this problem. Has anyone solved it? Or can @buba447 tell a deadline for when it will be implemented?

@olivierlesnicki
Copy link

+1

@suxinde2009
Copy link

Ran into the same problem.

@namdhis
Copy link

namdhis commented Nov 19, 2021

Please help us.

@deven-youpi
Copy link

Is this problem solved yet?

@calda
Copy link
Member

calda commented Jul 13, 2022

Just curious, why are folks interested in exporting Lottie animations to video files?

@calda calda closed this as completed Jul 13, 2022
@calda calda reopened this Jul 13, 2022
@calda
Copy link
Member

calda commented Nov 3, 2022

Thanks all for the suggestion. We don't plan on adding support for video exports at this time. This seems like something that could be made available as a separate library on top of this one.

@calda calda closed this as completed Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants