All Projects → elliotwaite → pycairo-animations

elliotwaite / pycairo-animations

Licence: MIT license
Pycairo Animation Library

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pycairo-animations

React Spinners Css
Amazing collection of React spinners components with pure css
Stars: ✭ 232 (+1121.05%)
Mutual labels:  animations
MainScreenShow
Android,动态壁纸,锁屏动画,来电秀等。桌面秀集此于一身。
Stars: ✭ 77 (+305.26%)
Mutual labels:  animations
Wortuhr ESP8266
Wortuhr mit ESP8266 WeMos D1 mini und NeoPixel WS2812B LEDs mit mp3 Sounds, Animationen, Transitions, Events und Spiele
Stars: ✭ 33 (+73.68%)
Mutual labels:  animations
Motion Shapeofview
Explain how to use MotionLayout with ShapeOfView
Stars: ✭ 236 (+1142.11%)
Mutual labels:  animations
Flutter-animations
A collection of Animations that aims to improve the user experience for your next flutter project.
Stars: ✭ 137 (+621.05%)
Mutual labels:  animations
generative-art
Generative art experiments
Stars: ✭ 113 (+494.74%)
Mutual labels:  pycairo
Lottie React Native
Lottie wrapper for React Native.
Stars: ✭ 14,707 (+77305.26%)
Mutual labels:  animations
Material-BottomBarLayout
🎉A material navigation bar library which has pretty animations and different ways of arrangement.
Stars: ✭ 56 (+194.74%)
Mutual labels:  animations
VinylShop
https://dribbble.com/shots/4996346-Vinyl-Shop-mobile-app
Stars: ✭ 30 (+57.89%)
Mutual labels:  animations
particle-animations
Animate your iOS app with particle systems
Stars: ✭ 14 (-26.32%)
Mutual labels:  animations
Editly
Slick, declarative command line video editing & API
Stars: ✭ 3,162 (+16542.11%)
Mutual labels:  animations
flutter dribble login challenge
A flutter animation UI challenge.
Stars: ✭ 51 (+168.42%)
Mutual labels:  animations
Generative-Art
A selection of generative art scripts written in Python
Stars: ✭ 284 (+1394.74%)
Mutual labels:  pycairo
Tourism Demo
Flutter app backed by Redux, shows animations, internationalization (i18n), ClipPath, fonts and others...
Stars: ✭ 232 (+1121.05%)
Mutual labels:  animations
react-bones
💀 Dead simple content loading components for React and React-Native. 💀
Stars: ✭ 42 (+121.05%)
Mutual labels:  animations
Primer
Intro Animation like Google Primer
Stars: ✭ 230 (+1110.53%)
Mutual labels:  animations
CameraButton
No description or website provided.
Stars: ✭ 31 (+63.16%)
Mutual labels:  animations
DearPyGui Animate
DearPyGui_Animate is an add-on to bring DearPyGUI to life.
Stars: ✭ 34 (+78.95%)
Mutual labels:  animations
helium-animated-pages
A light spiritual succesor to neon-animated-pages using only css animations
Stars: ✭ 17 (-10.53%)
Mutual labels:  animations
flip view
A Flutter app with flip animation to view profiles of friends. 🌟
Stars: ✭ 69 (+263.16%)
Mutual labels:  animations

Pycairo Animation Library

A library for generating animations using Pycairo (the Python version of Cairo) and ffmpeg. Pycairo is used to generate each frame of the animation and then an ffmpeg process is called to merge all those frames into a ProRes (.mov) video file.

Requirements

  • pycairo - conda install pycairo or pip install pycairo * Pillow - conda install pillow or pip install Pillow * ffmpeg - brew install ffmpeg * To use a different version of ffmpeg (A non-Homebrew version), just specify the ffmpeg_path argument when initializing an instance of VideoWriter (it should be the path to the ffmpeg bin file that you want to use).

Overview

The anim directory contains two classes, Frame and VideoWriter. The Frame class manages a Cairo surface (the image data) and a Cairo context (what Cairo uses to update the image data). The Frame class has methods for drawing lines, writing text, applying a blur, and clearing parts or all of the image. A Frame instance can be passed to a VideoWriter instance using video_writer.add_frame(frame) to write that frame to disk as a PNG image file in a temporary directory. Once all the frames have been written to disk, call video_writer.write_video('output_path.mov') to run the ffmpeg process that merges all those frames into a video file.

The examples directory contains two examples (hello_world.py and random_walks.py) which demonstrate how to use the library.

The video generated by hello_world.py (converted to a GIF, the actual video is smoother):

The video generated by random_walks.py (converted to a GIF):

⚠️ There are currently very few methods available on the Frame class. I've only added the methods that I've needed for my personal use cases. But you can easily extend the class to meet your needs. If you want to extend the class, but you're not familiar with Pycairo, here's a great tutorial that explains how Pycairo works: Cairo Tutorial for Python Programmers (Note: this link is to an archived version of the original since the original site is currently down).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].