Comments (3)
I tried layering GIFs with ffmpeg
and was successful:
ffmpeg -y -i dancer.gif -ignore_loop 0 -i sunset.gif -filter_complex "[0][1]overlay=format=auto:shortest=1,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gif
Overlay filter docs: https://ffmpeg.org/ffmpeg-filters.html#overlay-1
from loopygen.
For metadata generation of MP4s, we should generate a GIF out of it for image
until explorer can handle non-images in image
, or until we get marketplace
from loopygen.
Turns out MP4 (aka h.264) does not support alpha channels.
The recommended video format with alpha for web is WebM with VP9 codec. https://pixelbakery.co/recipes/list-of-video-image-formats-in-2021-supporting-alpha-channels
ffmpeg supports WebM with VP9. Example command for conversion with alpha channel:
ffmpeg -y -i sunset.gif -c:v libvpx-vp9 -b:v 0 -crf 30 -row-mt 1 -pix_fmt yuva420p sunset.webm
-c:v libvpx-vp9
forces the libvpx VP9 codec
-b:v 0 -crf 30
forces variable bitrate with constant quality (good for final export) of 30 (0-63, lower is higher quality)
For intermediate steps, I'm thinking of using -lossless
instead. Both for speed and to limit the quality loss with high layer counts
-row-mt 1
is using row multithreading. To be confirmed if this speeds conversions up or not
-pix_fmt yuva420p
uses YUVA (YUV+Alpha) 4:2:0 pixel format. 4:2:0 is the most used on the web
from loopygen.
Related Issues (20)
- companion: Add a "Open collections folder" button
- php: simplify maintenance for traits setup/edit pages
- Batch Mint folder of already uploaded metadata
- If a whole layer is skipped, it should still be added to the metadata
- Animated PNG
- generate: choose correct framerate for GIF compositing
- Is minting with hashlips build folder assets possible?
- [UI] Prevent creation of collection with duplicate layer names or variation names
- [transfer][mint] Add "waiting for gas to drop" feature when minting or transferring
- [transfer] Add optional quantity in wallets list for random mode
- [transfer] Optimize transfers by grouping by `to` address and `nftid`
- python: metadata generation fails without thumbnails
- ui: modal stays open when going back HOT 1
- Option to choose nftFactory address HOT 1
- Variation conditionals HOT 5
- Export Stats Button HOT 1
- MintTracker HOT 1
- Rarity Percentage doesn't handle float values
- ui: Fill variation name (if empty) with file name HOT 1
- python/ui: whole layer rarity
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loopygen.