airbnb / lottie-web

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
MIT License
30.53k stars 2.87k forks source link

Can't export .json | After giving my . aep file to export . json, the progress bar is full, but there is no finish button, there is only a cancel button. #2431

Open kabirshshryar opened 3 years ago

kabirshshryar commented 3 years ago

Here is the aep file - https://drive.google.com/file/d/1h1ZHlhIFNpmGdNt7k7VDo4nL0VF7Z0Sq/view?usp=drivesdk

I want to use the .json file in a android game tutorial. I'm using latest version of bodymovin to export json.

After Effects version : CC 2017

bodymovin commented 3 years ago

Hi, can you share a screenshot of what you're seeing when render is done?

kabirshshryar commented 3 years ago

Hi, can you share a screenshot of what you're seeing when render is done?

fc878970b83465c17260a56c6a32c08a 0

henriqrossatto commented 3 years ago

Hi @kabirshshryar

I got export your file. Not so sure but can be some bug related to images. As you are working with psd and png you have to wait render all the images. Try to work with shape layers inside the AE. If you have an AI file, convert for shape layers too and take care with merge paths or artboards that can be important. Mainly if you are working with gradient.

Attached the zip file with the json exportation. I export the json with the images inside them.

data_2431.zip

bodymovin commented 3 years ago

Can you try using version 5.7.6? The issue should be fixed.

henriqrossatto commented 3 years ago

selected settings image

fail render image

New comp created after the render image

bodymovin commented 3 years ago

@henriqrossatto once the render fails, can you try going in your browser to http://localhost:8092/ Select React App then on the right panel selecting Console and sharing a screenshot of that view?

henriqrossatto commented 3 years ago

@bodymovin here the screenshot

image

bodymovin commented 3 years ago

@henriqrossatto you're getting an error related to Chrome's API, but not related to this problem. There is another way more complex way of doing this: In Chrome, you'll need to go to chrome://inspect/#devices click the Configure button, and add an item localhost:8092 then select Done after some seconds, if bodymovin is open in AE, you should see an element on the list below Remote Target. click on inspect, and then take another screenshot of the new panel that opens, on the Console tab.

henriqrossatto commented 3 years ago

Like this? image

bodymovin commented 3 years ago

@henriqrossatto yes, thanks. It seems to be an issue with the position of the audio on the timeline. It might be related to having an audio layer that starts before the zero time of the composition, or some rounding problem when moving it to a new composition. If you can share the .aep I'll take a look and try to have a fix soon. In the meantime, you can try moving the audio layer in the timeline and see if it gets fixed.

henriqrossatto commented 3 years ago

Yes, this time works. Thank you!

Now what should I do to test the file with the sound?

henriqrossatto commented 3 years ago

Hi @bodymovin any thoughts?

bodymovin commented 3 years ago

the easiest way is to add the howler library to the global scope. Did you try any of these options? https://github.com/airbnb/lottie-web/wiki/Audio

henriqrossatto commented 3 years ago

Hmm... I don't so familiar with this code part, I work in motion part.

If I try to adjust it inside the demo.html it can work?

bodymovin commented 3 years ago

yes, it should work adding this line at the beggining <script>https://cdnjs.cloudflare.com/ajax/libs/howler/2.2.0/howler.min.js</script> also keep in mind that browsers request user input to play sounds, so you might need to click anywhere on the screen

henriqrossatto commented 3 years ago

Ok. I will test it. Thank you!

Sorry to disturb you again but I'm with another problem. If I export with an audio, when I open the demo.html there is nothing in the screen but when I export withou the audio, the animation appear

bodymovin commented 3 years ago

@henriqrossatto can your .aep with the related files?

henriqrossatto commented 3 years ago

Yes, here lottie_error.zip